summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2021-08-05 12:19:33 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-18 22:40:04 +0000
commit68a8a107462e3f2afb423488f7ad8f69e8b8d1c0 (patch)
tree1dc5a5316fff47215e18cc3f52bb2afbe9aea032
parentbcfe9e7f9043cc6217ecde6cd17ffafc99383662 (diff)
Don't embed Assistant doc in Assistant
Fixes: QTBUG-65810 Change-Id: Iaa8c1e79811cd3edc121851bcbc7e01906deae04 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit d93f59c6c0c40dd13540b56896debf6cd4b149a5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/assistant/assistant/CMakeLists.txt10
-rw-r--r--src/assistant/assistant/assistant.qchbin352256 -> 0 bytes
-rw-r--r--src/assistant/assistant/assistant.qrc5
-rw-r--r--src/assistant/assistant/mainwindow.cpp40
4 files changed, 2 insertions, 53 deletions
diff --git a/src/assistant/assistant/CMakeLists.txt b/src/assistant/assistant/CMakeLists.txt
index d54b6f294..69470c509 100644
--- a/src/assistant/assistant/CMakeLists.txt
+++ b/src/assistant/assistant/CMakeLists.txt
@@ -55,16 +55,6 @@ qt_internal_add_app(assistant
)
# Resources:
-set(assistant_resource_files
- "assistant.qch"
-)
-
-qt_internal_add_resource(assistant "assistant"
- PREFIX
- "/qt-project.org/assistant"
- FILES
- ${assistant_resource_files}
-)
set(assistant_images_resource_files
"images/assistant-128.png"
"images/assistant.png"
diff --git a/src/assistant/assistant/assistant.qch b/src/assistant/assistant/assistant.qch
deleted file mode 100644
index 5c36d0c01..000000000
--- a/src/assistant/assistant/assistant.qch
+++ /dev/null
Binary files differ
diff --git a/src/assistant/assistant/assistant.qrc b/src/assistant/assistant/assistant.qrc
deleted file mode 100644
index 568ecffe7..000000000
--- a/src/assistant/assistant/assistant.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/qt-project.org/assistant" >
- <file>assistant.qch</file>
- </qresource>
-</RCC>
diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp
index cd748da32..dbc1debc0 100644
--- a/src/assistant/assistant/mainwindow.cpp
+++ b/src/assistant/assistant/mainwindow.cpp
@@ -318,45 +318,9 @@ bool MainWindow::initHelpDB(bool registerInternalDoc)
if (!helpEngineWrapper.setupData())
return false;
- if (!registerInternalDoc) {
- if (helpEngineWrapper.defaultHomePage() == QLatin1String("help"))
- helpEngineWrapper.setDefaultHomePage(QLatin1String("about:blank"));
- return true;
- }
- bool assistantInternalDocRegistered = false;
- QString intern(QLatin1String("org.qt-project.assistantinternal-"));
- for (const QString &ns : helpEngineWrapper.registeredDocumentations()) {
- if (ns.startsWith(intern)) {
- intern = ns;
- assistantInternalDocRegistered = true;
- break;
- }
- }
-
- const QString &collectionFile = helpEngineWrapper.collectionFile();
- QFileInfo fi(collectionFile);
- QString helpFile;
- QTextStream(&helpFile) << fi.absolutePath() << QDir::separator()
- << QLatin1String("assistant.qch.") << (QT_VERSION >> 16)
- << QLatin1Char('.') << ((QT_VERSION >> 8) & 0xFF);
-
- bool needsSetup = false;
- if (!assistantInternalDocRegistered || !QFile::exists(helpFile)) {
- QFile file(helpFile);
- if (file.open(QIODevice::WriteOnly)) {
- QResource res(QLatin1String(":/qt-project.org/assistant/assistant.qch"));
- if (file.write((const char*)res.data(), res.size()) != res.size())
- qDebug() << QLatin1String("could not write assistant.qch...");
-
- file.close();
- }
- helpEngineWrapper.unregisterDocumentation(intern);
- helpEngineWrapper.registerDocumentation(helpFile);
- needsSetup = true;
- }
+ if (!registerInternalDoc && helpEngineWrapper.defaultHomePage() == QLatin1String("help"))
+ helpEngineWrapper.setDefaultHomePage(QLatin1String("about:blank"));
- if (needsSetup)
- helpEngineWrapper.setupData();
return true;
}