From: Kai Koehne Date: Wed, 13 Nov 2013 15:33:51 +0000 (+0100) Subject: Make sure .qch file is opened read-only X-Git-Tag: accepted/tizen/20131212.181521~7^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bf84aa7873edd7bb411fabb94481b03d1501c68;p=platform%2Fupstream%2Fqttools.git 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 Change-Id: I7b1dbddb73feb34491ece5a0765a67354b937f43 Reviewed-by: Friedemann Kleint Reviewed-by: Karsten Heimrich Reviewed-by: Mark Brand --- diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp index 4157105..6262dfe 100644 --- a/src/assistant/help/qhelpdbreader.cpp +++ b/src/assistant/help/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