summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelpcollectionhandler.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2018-12-14 12:19:06 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2019-01-08 10:02:08 +0000
commit9f1f265c6d3da31f8990240ae48cc66f373aee22 (patch)
treefa80e9f22f47df3f4039cf751c3b93e5e8b7d14c /src/assistant/help/qhelpcollectionhandler.cpp
parent66fb4a7d97b8e3dd90c983a9a94c2e7352f9d5e8 (diff)
Assistant: Mark the readonly collection files
The qhc file may be installed in readonly location. Don't try to fix tables there, we leave it for the cached qhc file. Task-number: QTBUG-72174 Change-Id: I513c799d2b571a9dd9bc77b7c122e635c863fcff Reviewed-by: Kai Pastor <dg0yt@darc.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/assistant/help/qhelpcollectionhandler.cpp')
-rw-r--r--src/assistant/help/qhelpcollectionhandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp
index 32ce01bf0..4ca428657 100644
--- a/src/assistant/help/qhelpcollectionhandler.cpp
+++ b/src/assistant/help/qhelpcollectionhandler.cpp
@@ -152,6 +152,9 @@ bool QHelpCollectionHandler::openCollectionFile()
}
}
+ if (m_readOnly)
+ return true;
+
m_query->exec(QLatin1String("PRAGMA synchronous=OFF"));
m_query->exec(QLatin1String("PRAGMA cache_size=3000"));
@@ -1770,4 +1773,9 @@ QMap<QString, QUrl> QHelpCollectionHandler::linksForField(const QString &fieldNa
return linkMap;
}
+void QHelpCollectionHandler::setReadOnly(bool readOnly)
+{
+ m_readOnly = readOnly;
+}
+
QT_END_NAMESPACE