summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-11-13 16:33:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-14 14:22:26 +0100
commit0bf84aa7873edd7bb411fabb94481b03d1501c68 (patch)
treee8c5c11b061bef9670bcd86a8cc7c35e15a8e884
parent6ca1df22ef42ffbb86133313b86f9027c5f9de90 (diff)
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 <Friedemann.Kleint@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
-rw-r--r--src/assistant/help/qhelpdbreader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp
index 415710525..6262dfed5 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