summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelpenginecore.h
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-08-31 15:22:37 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-09-16 14:14:33 +0200
commit15d7a30d41b423846fc74d9dd252c1e2a84769e2 (patch)
tree0f7c41b68e047c022d4ca73c73615d67f618adae /src/assistant/help/qhelpenginecore.h
parent377a9f64b0aa2d4ed4609e91aac731651bd47d65 (diff)
QtHelp: Reverse the default state for readonly property for help engine
From now the read only property is true by default. The old workaround with setting the dynamic property '_q_readonly' to true for the help engine should still work, so the change shouldn't break the user code with the workaround. This fixes the most common usage of QtHelp, when help engine is used for read only help collection files. Task-number: QTBUG-83268 Task-number: QTBUG-82126 Task-number: QTBUG-84745 Change-Id: Iee6fd18269d68f43633a5fecbb65abc60c99091a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/assistant/help/qhelpenginecore.h')
-rw-r--r--src/assistant/help/qhelpenginecore.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h
index df95c512f..dc4cd7695 100644
--- a/src/assistant/help/qhelpenginecore.h
+++ b/src/assistant/help/qhelpenginecore.h
@@ -58,6 +58,7 @@ class QHELP_EXPORT QHelpEngineCore : public QObject
Q_OBJECT
Q_PROPERTY(bool autoSaveFilter READ autoSaveFilter WRITE setAutoSaveFilter)
Q_PROPERTY(QString collectionFile READ collectionFile WRITE setCollectionFile)
+ Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
#if QT_DEPRECATED_SINCE(5, 15)
Q_PROPERTY(QString currentFilter READ currentFilter WRITE setCurrentFilter)
#endif
@@ -66,6 +67,9 @@ public:
explicit QHelpEngineCore(const QString &collectionFile, QObject *parent = nullptr);
virtual ~QHelpEngineCore();
+ bool isReadOnly() const;
+ void setReadOnly(bool enable);
+
QHelpFilterEngine *filterEngine() const;
bool setupData();