mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-14 21:56:41 +01:00
6ba759aeee
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
20 lines
1.4 KiB
Diff
20 lines
1.4 KiB
Diff
--- a/src/core/database.cpp
|
|
+++ b/src/core/database.cpp
|
|
@@ -265,6 +265,16 @@
|
|
StaticInit();
|
|
|
|
{
|
|
+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
|
|
+ QVariant v = db.driver()->handle();
|
|
+ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) {
|
|
+ sqlite3* handle = *static_cast<sqlite3**>(v.data());
|
|
+ if (handle) {
|
|
+ sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
|
|
+ }
|
|
+ }
|
|
+#endif
|
|
+
|
|
QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);
|
|
set_fts_tokenizer.bindValue(":name", "unicode");
|
|
set_fts_tokenizer.bindValue(
|
|
|