logic: implemented support for non-ascii characters in fulltext search

* fixed non-ascii characters not working in normal symbol search
* implemented support for non-ascii characters in fulltext search
* fixed fulltext search not working for symbols with lowest and highest character codes in a file
* using wstring in FullTextSearchIndex (causes this index to be dependent on text encoding selected in app settings)
* implemented rebuilding FullTextSearchIndex if used text encoding changed in app settings
* added utility lib
This commit is contained in:
mlangkabel
2018-02-12 20:01:20 +01:00
parent 713754e0e6
commit 919afad03b
16 changed files with 227 additions and 97 deletions
@@ -2,18 +2,17 @@
#include <memory>
#include "utility/file/FileInfo.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/text/TextAccess.h"
#include "utility/tracing.h"
#include "utility/logging/logging.h"
#include "utility/utilityString.h"
#include "data/access/StorageAccess.h"
#include "data/location/SourceLocation.h"
#include "data/location/SourceLocationCollection.h"
#include "data/location/SourceLocationFile.h"
#include "settings/ApplicationSettings.h"
#include "utility/file/FileInfo.h"
#include "utility/logging/logging.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/text/TextAccess.h"
#include "utility/tracing.h"
#include "utility/utilityString.h"
#include "Application.h"
CodeController::CodeController(StorageAccess* storageAccess)
@@ -339,7 +338,7 @@ void CodeController::handleMessage(MessageSearchFullText* message)
saveOrRestoreViewMode(message);
m_collection = m_storageAccess->getFullTextSearchLocations(utility::encodeToUtf8(message->searchTerm), message->caseSensitive);
m_collection = m_storageAccess->getFullTextSearchLocations(message->searchTerm, message->caseSensitive);
CodeView::ScrollParams scrollParams(CodeView::ScrollParams::SCROLL_TO_DEFINITION);
getView()->scrollTo(scrollParams);