diff options
author | Pavel Vatagin <pavelvat@gmail.com> | 2017-07-26 16:58:50 (GMT) |
---|---|---|
committer | Pavel Vatagin <pavelvat@gmail.com> | 2017-07-26 16:58:50 (GMT) |
commit | 20bdf429cb69614a251a37282ee30d9a2de0db34 (patch) | |
tree | fcad268b3444252431c056e3a3178b3df9e952ff /plugins/apps | |
parent | 7927a5469ec853026934619761a7fc5c52dbd551 (diff) | |
download | mxe-20bdf429cb69614a251a37282ee30d9a2de0db34.zip mxe-20bdf429cb69614a251a37282ee30d9a2de0db34.tar.gz mxe-20bdf429cb69614a251a37282ee30d9a2de0db34.tar.bz2 |
fix launch clementine_qt4 with clean settings
Diffstat (limited to 'plugins/apps')
-rw-r--r-- | plugins/apps/clementine_qt4-1-fixes.patch | 36 |
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( |