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:
Andreas Stallinger
2016-05-10 11:10:13 +02:00
parent 30faa7e52f
commit e775ae1ecd
84 changed files with 455 additions and 111 deletions
@@ -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();