summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-11-13 15:33:51 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-19 13:03:35 (GMT)
commit67b2f9a474d320bafa8cd21de129ef2cc138bebe (patch)
tree6f3969b3ca0e80d1c84134b6a1abf537c345138b /tools
parent15ecf1ee9e30a8911546969e76d53eda1b6a78af (diff)
downloadQt-67b2f9a474d320bafa8cd21de129ef2cc138bebe.zip
Qt-67b2f9a474d320bafa8cd21de129ef2cc138bebe.tar.gz
Qt-67b2f9a474d320bafa8cd21de129ef2cc138bebe.tar.bz2
Make sure .qch file is opened read-only
So far qsqlite tried to open the file first read/write, and falling back to read access only if this fails. This has resulted in excessively long loading times e.g. on Windows XP. Task-number: QTCREATORBUG-10697 (cherry-picked from commit 0bf84aa7873edd7bb411fabb94481b03d1501c68 in qttools.git) Change-Id: I94be15e2d7c5845bcadf6b32e54462a7c1bcb98a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpdbreader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp
index 14078b7..459eb0c 100644
--- a/tools/assistant/lib/qhelpdbreader.cpp
+++ b/tools/assistant/lib/qhelpdbreader.cpp
@@ -90,6 +90,7 @@ bool QHelpDBReader::init()
return false;
QSqlDatabase db = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), m_uniqueId);
+ db.setConnectOptions(QLatin1String("QSQLITE_OPEN_READONLY"));
db.setDatabaseName(m_dbName);
if (!db.open()) {
/*: The placeholders are: %1 - The name of the database which cannot be opened