From 67b2f9a474d320bafa8cd21de129ef2cc138bebe Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 13 Nov 2013 16:33:51 +0100 Subject: 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 --- tools/assistant/lib/qhelpdbreader.cpp | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v0.12