summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelpenginecore.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-02-07 11:28:27 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-02-09 15:13:54 +0100
commite110ffdc176eb4f5cc90d2a2daca9c841fb3dcb8 (patch)
tree426f996cac03157e8ead588832fa281caf1f5c99 /src/assistant/help/qhelpenginecore.cpp
parent14f26553af74fc77a1c5b3475715714f7c07def3 (diff)
QtHelp: Dismantle qhelpenginecore_p.h
De-qobject-ify QHelpEngineCorePrivate. Task-number: QTBUG-122025 Change-Id: I1efaa7a1ecc6b43d4a5df2cb4f9da6dcff86c0f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/assistant/help/qhelpenginecore.cpp')
-rw-r--r--src/assistant/help/qhelpenginecore.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/assistant/help/qhelpenginecore.cpp b/src/assistant/help/qhelpenginecore.cpp
index 7cc0af3bb..f16951638 100644
--- a/src/assistant/help/qhelpenginecore.cpp
+++ b/src/assistant/help/qhelpenginecore.cpp
@@ -4,7 +4,6 @@
#include "qhelpenginecore.h"
#include "qhelpcollectionhandler_p.h"
#include "qhelpdbreader_p.h"
-#include "qhelpenginecore_p.h"
#include "qhelpfilterengine.h"
#include "qhelplink.h"
@@ -14,6 +13,27 @@
QT_BEGIN_NAMESPACE
+class QHelpEngineCorePrivate
+{
+public:
+ QHelpEngineCorePrivate(const QString &collectionFile, QHelpEngineCore *helpEngineCore);
+ ~QHelpEngineCorePrivate();
+
+ void init(const QString &collectionFile);
+ bool setup();
+
+ QHelpCollectionHandler *collectionHandler = nullptr;
+ QHelpFilterEngine *filterEngine = nullptr;
+ QString currentFilter;
+ QString error;
+ bool needsSetup = true;
+ bool autoSaveFilter = true;
+ bool usesFilterEngine = false;
+ bool readOnly = true;
+
+ QHelpEngineCore *q;
+};
+
QHelpEngineCorePrivate::QHelpEngineCorePrivate(const QString &collectionFile,
QHelpEngineCore *helpEngineCore)
{
@@ -32,8 +52,8 @@ void QHelpEngineCorePrivate::init(const QString &collectionFile)
if (collectionHandler)
delete collectionHandler;
collectionHandler = new QHelpCollectionHandler(collectionFile, q);
- connect(collectionHandler, &QHelpCollectionHandler::error,
- this, &QHelpEngineCorePrivate::errorReceived);
+ QObject::connect(collectionHandler, &QHelpCollectionHandler::error, q,
+ [this](const QString &msg) { error = msg; });
filterEngine->setCollectionHandler(collectionHandler);
needsSetup = true;
}
@@ -60,11 +80,6 @@ bool QHelpEngineCorePrivate::setup()
return opened;
}
-void QHelpEngineCorePrivate::errorReceived(const QString &msg)
-{
- error = msg;
-}
-
/*!
\class QHelpEngineCore
\since 4.4