void-packages/srcpkgs/clementine/patches/clementine-sqlite-3.12.patch

20 lines
612 B
Diff
Raw Normal View History

2016-05-28 21:22:04 +02:00
--- 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
+
2016-05-28 21:22:04 +02:00
QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);
set_fts_tokenizer.bindValue(":name", "unicode");
set_fts_tokenizer.bindValue(