diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-11-13 16:33:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-19 14:03:35 +0100 |
commit | 67b2f9a474d320bafa8cd21de129ef2cc138bebe (patch) | |
tree | 6f3969b3ca0e80d1c84134b6a1abf537c345138b /tools | |
parent | 15ecf1ee9e30a8911546969e76d53eda1b6a78af (diff) | |
download | qt4-tools-67b2f9a474d320bafa8cd21de129ef2cc138bebe.tar.gz |
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.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp index 14078b70a9..459eb0cf4d 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 |