summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-07-27 04:47:37 (GMT)
committerGitHub <noreply@github.com>2017-07-27 04:47:37 (GMT)
commit030efef3b646e9c23c23c76341ac1ce53342073a (patch)
treefcad268b3444252431c056e3a3178b3df9e952ff
parent7927a5469ec853026934619761a7fc5c52dbd551 (diff)
parent20bdf429cb69614a251a37282ee30d9a2de0db34 (diff)
downloadmxe-030efef3b646e9c23c23c76341ac1ce53342073a.zip
mxe-030efef3b646e9c23c23c76341ac1ce53342073a.tar.gz
mxe-030efef3b646e9c23c23c76341ac1ce53342073a.tar.bz2
Merge pull request #1861 from pavelvat/fix-clementine-qt4
fix launch clementine_qt4 with clean settings
-rw-r--r--plugins/apps/clementine_qt4-1-fixes.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/apps/clementine_qt4-1-fixes.patch b/plugins/apps/clementine_qt4-1-fixes.patch
index 3abec0d..1039896 100644
--- a/plugins/apps/clementine_qt4-1-fixes.patch
+++ b/plugins/apps/clementine_qt4-1-fixes.patch
@@ -76,3 +76,39 @@ index 1111111..2222222 100644
)
endif (WIN32)
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Alexander Golubev <fatzer2@gmail.com>
+Date: Thu, 16 Mar 2017 14:54:55 +0300
+Subject: [PATCH] core/database: configure fts3 tokenizer support
+
+Original patch by Arfrever
+This fixes https://github.com/clementine-player/Clementine/issues/5297
+https://github.com/clementine-player/Clementine/pull/5669
+
+
+diff --git a/src/core/database.cpp b/src/core/database.cpp
+index 1111111..2222222 100644
+--- a/src/core/database.cpp
++++ b/src/core/database.cpp
+@@ -265,6 +265,20 @@ QSqlDatabase Database::Connect() {
+ StaticInit();
+
+ {
++
++#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
++ // In case sqlite>=3.12 is compiled without -DSQLITE_ENABLE_FTS3_TOKENIZER (generally a good idea
++ // due to security reasons) the fts3 support should be enabled explicitly.
++ // see https://github.com/clementine-player/Clementine/issues/5297
++ 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(