logic: Fulltextsearch
* fulltextsearch enabled in sqlite * fulltextsearch start search with @ * codeview performance improved * strip sRGB profile from png files to get rid of libpng warning at runtime
This commit is contained in:
@@ -907,16 +907,9 @@ const QtCodeArea::AnnotationColor& QtCodeArea::getAnnotationColorForAnnotation(c
|
||||
if (!s_annotationColors.size())
|
||||
{
|
||||
ColorScheme* scheme = ColorScheme::getInstance().get();
|
||||
std::vector<std::string> types;
|
||||
types.push_back("token");
|
||||
types.push_back("local_symbol");
|
||||
types.push_back("scope");
|
||||
types.push_back("error");
|
||||
std::vector<std::string> types = { "token", "local_symbol", "scope", "error", "fulltextmatch"};
|
||||
|
||||
std::vector<std::string> states;
|
||||
states.push_back("normal");
|
||||
states.push_back("focus");
|
||||
states.push_back("active");
|
||||
std::vector<std::string> states = { "normal", "focus", "active"};
|
||||
|
||||
for (const std::string& type : types)
|
||||
{
|
||||
@@ -945,6 +938,10 @@ const QtCodeArea::AnnotationColor& QtCodeArea::getAnnotationColorForAnnotation(c
|
||||
{
|
||||
i = 9;
|
||||
}
|
||||
else if (annotation.locationType == LOCATION_FULLTEXTSEARCH_MATCH)
|
||||
{
|
||||
i = 12;
|
||||
}
|
||||
|
||||
if (annotation.isActive)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/messaging/type/MessageSearch.h"
|
||||
#include "utility/messaging/type/MessageSearchFullText.h"
|
||||
#include "utility/messaging/type/MessageSearchAutocomplete.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
#include "utility/utility.h"
|
||||
@@ -30,6 +31,11 @@ void QtSearchElement::onChecked(bool)
|
||||
emit wasChecked(this);
|
||||
}
|
||||
|
||||
void QtSmartSearchBox::fullTextSearch()
|
||||
{
|
||||
LOG_INFO_STREAM(<< "FullTextsearch: " << text().toStdString().substr(1));
|
||||
MessageSearchFullText(text().toStdString().substr(1)).dispatch();
|
||||
}
|
||||
|
||||
void QtSmartSearchBox::search()
|
||||
{
|
||||
@@ -144,6 +150,11 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
|
||||
if (event->key() == Qt::Key_Return)
|
||||
{
|
||||
if (text().startsWith('@'))
|
||||
{
|
||||
fullTextSearch();
|
||||
return;
|
||||
}
|
||||
if (!completer()->popup()->isVisible())
|
||||
{
|
||||
search();
|
||||
|
||||
@@ -32,6 +32,7 @@ class QtSmartSearchBox
|
||||
|
||||
public slots:
|
||||
void search();
|
||||
void fullTextSearch();
|
||||
|
||||
public:
|
||||
QtSmartSearchBox(QWidget* parent);
|
||||
|
||||
Reference in New Issue
Block a user