summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-02-05 14:20:18 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-02-07 08:51:12 +0100
commitf1cf59001adaf4d49001a5b457bd0d650b7a4a9f (patch)
tree7649c7c7aaee3bb6adca69be2407f15b0f6a44b2
parentbf8cf6f054d696a82bb4728cb4bcd9259674aa95 (diff)
QtHelp: Cleanup includes
Get rid of unused includes and forward declarations. Order includes and forward declarations alphabetically. Replace some includes with forward declarations. Task-number: QTBUG-122025 Change-Id: I224dc5371c982137b33f5b63c54f5da6cd435ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/assistant/help/qcompressedhelpinfo.h2
-rw-r--r--src/assistant/help/qfilternamedialog.cpp4
-rw-r--r--src/assistant/help/qfilternamedialog_p.h3
-rw-r--r--src/assistant/help/qhelp_global.cpp6
-rw-r--r--src/assistant/help/qhelp_global.h3
-rw-r--r--src/assistant/help/qhelpcollectionhandler.cpp8
-rw-r--r--src/assistant/help/qhelpcollectionhandler_p.h15
-rw-r--r--src/assistant/help/qhelpcontentwidget.cpp10
-rw-r--r--src/assistant/help/qhelpcontentwidget.h7
-rw-r--r--src/assistant/help/qhelpdbreader.cpp2
-rw-r--r--src/assistant/help/qhelpdbreader_p.h4
-rw-r--r--src/assistant/help/qhelpengine.cpp11
-rw-r--r--src/assistant/help/qhelpengine.h1
-rw-r--r--src/assistant/help/qhelpengine_p.h12
-rw-r--r--src/assistant/help/qhelpenginecore.cpp10
-rw-r--r--src/assistant/help/qhelpenginecore.h3
-rw-r--r--src/assistant/help/qhelpfilterdata.cpp1
-rw-r--r--src/assistant/help/qhelpfilterengine.cpp3
-rw-r--r--src/assistant/help/qhelpfilterengine.h7
-rw-r--r--src/assistant/help/qhelpfiltersettings_p.h4
-rw-r--r--src/assistant/help/qhelpfiltersettingswidget.cpp4
-rw-r--r--src/assistant/help/qhelpfiltersettingswidget.h5
-rw-r--r--src/assistant/help/qhelpindexwidget.cpp9
-rw-r--r--src/assistant/help/qhelpindexwidget.h6
-rw-r--r--src/assistant/help/qhelpsearchengine.cpp2
-rw-r--r--src/assistant/help/qhelpsearchengine.h6
-rw-r--r--src/assistant/help/qhelpsearchindexreader_default_p.h4
-rw-r--r--src/assistant/help/qhelpsearchindexreader_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_default.cpp3
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_default_p.h7
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.cpp5
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.h5
-rw-r--r--src/assistant/help/qhelpsearchresultwidget.cpp8
-rw-r--r--src/assistant/help/qhelpsearchresultwidget.h8
-rw-r--r--src/assistant/help/qoptionswidget.cpp3
-rw-r--r--src/assistant/help/qoptionswidget_p.h3
36 files changed, 68 insertions, 128 deletions
diff --git a/src/assistant/help/qcompressedhelpinfo.h b/src/assistant/help/qcompressedhelpinfo.h
index 18f2a89b0..978f4f2d7 100644
--- a/src/assistant/help/qcompressedhelpinfo.h
+++ b/src/assistant/help/qcompressedhelpinfo.h
@@ -10,8 +10,8 @@
QT_BEGIN_NAMESPACE
-class QVersionNumber;
class QCompressedHelpInfoPrivate;
+class QVersionNumber;
class QHELP_EXPORT QCompressedHelpInfo final
{
diff --git a/src/assistant/help/qfilternamedialog.cpp b/src/assistant/help/qfilternamedialog.cpp
index c64a37d85..77ad98826 100644
--- a/src/assistant/help/qfilternamedialog.cpp
+++ b/src/assistant/help/qfilternamedialog.cpp
@@ -1,10 +1,10 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-#include <QtWidgets/QPushButton>
-
#include "qfilternamedialog_p.h"
+#include <QtWidgets/QPushButton>
+
QT_BEGIN_NAMESPACE
QFilterNameDialog::QFilterNameDialog(QWidget *parent)
diff --git a/src/assistant/help/qfilternamedialog_p.h b/src/assistant/help/qfilternamedialog_p.h
index 9836066cb..18ce4a931 100644
--- a/src/assistant/help/qfilternamedialog_p.h
+++ b/src/assistant/help/qfilternamedialog_p.h
@@ -15,9 +15,10 @@
// We mean it.
//
-#include <QtWidgets/QDialog>
#include "ui_qfilternamedialog.h"
+#include <QtWidgets/QDialog>
+
QT_BEGIN_NAMESPACE
class QFilterNameDialog : public QDialog
diff --git a/src/assistant/help/qhelp_global.cpp b/src/assistant/help/qhelp_global.cpp
index 585f99a6e..26332eb04 100644
--- a/src/assistant/help/qhelp_global.cpp
+++ b/src/assistant/help/qhelp_global.cpp
@@ -1,14 +1,14 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+#include "qhelp_global.h"
+
#include <QtCore/QCoreApplication>
#include <QtCore/QHash>
-#include <QtCore/QRegularExpression>
#include <QtCore/QMutexLocker>
+#include <QtCore/QRegularExpression>
#include <QtGui/QTextDocument>
-#include "qhelp_global.h"
-
QString QHelpGlobal::uniquifyConnectionName(const QString &name, void *pointer)
{
static QMutex mutex;
diff --git a/src/assistant/help/qhelp_global.h b/src/assistant/help/qhelp_global.h
index 6a6fc5147..64c158e78 100644
--- a/src/assistant/help/qhelp_global.h
+++ b/src/assistant/help/qhelp_global.h
@@ -5,11 +5,10 @@
#define QHELP_GLOBAL_H
#include <QtCore/qglobal.h>
-#include <QtCore/QString>
-#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
+class QString;
#ifdef QT_STATIC
# define QHELP_EXPORT
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp
index 1116f750f..f708fe4a9 100644
--- a/src/assistant/help/qhelpcollectionhandler.cpp
+++ b/src/assistant/help/qhelpcollectionhandler.cpp
@@ -5,21 +5,19 @@
#include "qhelp_global.h"
#include "qhelpdbreader_p.h"
#include "qhelpfilterdata.h"
+#include "qhelplink.h"
#include <QtCore/QDataStream>
#include <QtCore/QDateTime>
#include <QtCore/QDir>
-#include <QtCore/QFile>
#include <QtCore/QFileInfo>
-#include <QtCore/QList>
#include <QtCore/QMultiMap>
#include <QtCore/QTimer>
#include <QtCore/QVersionNumber>
-#include <QtHelp/QHelpLink>
-
-#include <QtSql/QSqlError>
#include <QtSql/QSqlDriver>
+#include <QtSql/QSqlError>
+#include <QtSql/QSqlQuery>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpcollectionhandler_p.h b/src/assistant/help/qhelpcollectionhandler_p.h
index c2e89b60f..a3fabc785 100644
--- a/src/assistant/help/qhelpcollectionhandler_p.h
+++ b/src/assistant/help/qhelpcollectionhandler_p.h
@@ -15,21 +15,18 @@
// We mean it.
//
-#include <QtCore/QList>
-#include <QtCore/QString>
-#include <QtCore/QObject>
-#include <QtCore/QVariant>
-#include <QtCore/QStringList>
-
-#include <QtSql/QSqlQuery>
-
#include "qhelpdbreader_p.h"
#include "qhelplink.h"
+#include <QtCore/QObject>
+#include <QtCore/QStringList>
+
QT_BEGIN_NAMESPACE
-class QVersionNumber;
class QHelpFilterData;
+class QSqlQuery;
+class QVariant;
+class QVersionNumber;
class QHelpCollectionHandler : public QObject
{
diff --git a/src/assistant/help/qhelpcontentwidget.cpp b/src/assistant/help/qhelpcontentwidget.cpp
index c958cf9a3..c2e68b92f 100644
--- a/src/assistant/help/qhelpcontentwidget.cpp
+++ b/src/assistant/help/qhelpcontentwidget.cpp
@@ -2,14 +2,14 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpcontentwidget.h"
+#include "qhelpcollectionhandler_p.h"
#include "qhelpenginecore.h"
#include "qhelpengine_p.h"
-#include "qhelpcollectionhandler_p.h"
-#include <QDir>
-#include <QtCore/QStack>
-#include <QtCore/QThread>
+#include <QtCore/QDir>
#include <QtCore/QMutex>
+#include <QtCore/QThread>
+#include <QtCore/QStack>
#include <QtWidgets/QHeaderView>
QT_BEGIN_NAMESPACE
@@ -62,8 +62,6 @@ public:
QHelpContentProvider *qhelpContentProvider;
};
-
-
/*!
\class QHelpContentItem
\inmodule QtHelp
diff --git a/src/assistant/help/qhelpcontentwidget.h b/src/assistant/help/qhelpcontentwidget.h
index 186aba96b..c1942b64c 100644
--- a/src/assistant/help/qhelpcontentwidget.h
+++ b/src/assistant/help/qhelpcontentwidget.h
@@ -6,18 +6,15 @@
#include <QtHelp/qhelp_global.h>
-#include <QtCore/QQueue>
-#include <QtCore/QString>
#include <QtWidgets/QTreeView>
QT_BEGIN_NAMESPACE
-
-class QHelpEnginePrivate;
class QHelpContentItemPrivate;
class QHelpContentModelPrivate;
class QHelpEngine;
-class QHelpContentProvider;
+class QHelpEnginePrivate;
+class QUrl;
class QHELP_EXPORT QHelpContentItem
{
diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp
index 9e308cdad..f80f2023d 100644
--- a/src/assistant/help/qhelpdbreader.cpp
+++ b/src/assistant/help/qhelpdbreader.cpp
@@ -5,9 +5,9 @@
#include "qhelp_global.h"
#include <QtCore/QFile>
-#include <QtCore/QList>
#include <QtCore/QMultiMap>
#include <QtCore/QVariant>
+#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
diff --git a/src/assistant/help/qhelpdbreader_p.h b/src/assistant/help/qhelpdbreader_p.h
index 22ea6150b..ddc5ace59 100644
--- a/src/assistant/help/qhelpdbreader_p.h
+++ b/src/assistant/help/qhelpdbreader_p.h
@@ -15,11 +15,9 @@
// We mean it.
//
+#include <QtCore/QByteArray>
#include <QtCore/QObject>
#include <QtCore/QStringList>
-#include <QtCore/QUrl>
-#include <QtCore/QByteArray>
-#include <QtCore/QSet>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpengine.cpp b/src/assistant/help/qhelpengine.cpp
index c9122055b..a2e888959 100644
--- a/src/assistant/help/qhelpengine.cpp
+++ b/src/assistant/help/qhelpengine.cpp
@@ -2,20 +2,13 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpengine.h"
-#include "qhelpengine_p.h"
-#include "qhelpdbreader_p.h"
#include "qhelpcontentwidget.h"
+#include "qhelpengine_p.h"
+#include "qhelpfilterengine.h"
#include "qhelpindexwidget.h"
#include "qhelpsearchengine.h"
-#include "qhelpcollectionhandler_p.h"
-#include "qhelpfilterengine.h"
-#include <QtCore/QDir>
-#include <QtCore/QFile>
-#include <QtCore/QPluginLoader>
#include <QtCore/QTimer>
-#include <QtWidgets/QApplication>
-#include <QtSql/QSqlQuery>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpengine.h b/src/assistant/help/qhelpengine.h
index 652294939..219ff3818 100644
--- a/src/assistant/help/qhelpengine.h
+++ b/src/assistant/help/qhelpengine.h
@@ -8,7 +8,6 @@
QT_BEGIN_NAMESPACE
-
class QHelpContentModel;
class QHelpContentWidget;
class QHelpIndexModel;
diff --git a/src/assistant/help/qhelpengine_p.h b/src/assistant/help/qhelpengine_p.h
index 21fe30cf6..e17ec7a84 100644
--- a/src/assistant/help/qhelpengine_p.h
+++ b/src/assistant/help/qhelpengine_p.h
@@ -15,24 +15,18 @@
// We mean it.
//
-#include <QtCore/QHash>
-#include <QtCore/QMap>
-#include <QtCore/QStringList>
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
-class QSqlQuery;
-
-class QHelpEngineCore;
-class QHelpDBReader;
+class QHelpCollectionHandler;
class QHelpContentModel;
class QHelpContentWidget;
+class QHelpEngineCore;
+class QHelpFilterEngine;
class QHelpIndexModel;
class QHelpIndexWidget;
class QHelpSearchEngine;
-class QHelpCollectionHandler;
-class QHelpFilterEngine;
class QHelpEngineCorePrivate : public QObject
{
diff --git a/src/assistant/help/qhelpenginecore.cpp b/src/assistant/help/qhelpenginecore.cpp
index 5d05e07c7..666dc9cdb 100644
--- a/src/assistant/help/qhelpenginecore.cpp
+++ b/src/assistant/help/qhelpenginecore.cpp
@@ -2,19 +2,15 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpenginecore.h"
-#include "qhelpengine_p.h"
-#include "qhelpdbreader_p.h"
#include "qhelpcollectionhandler_p.h"
+#include "qhelpdbreader_p.h"
+#include "qhelpengine_p.h"
#include "qhelpfilterengine.h"
+#include "qhelplink.h"
#include <QtCore/QDir>
-#include <QtCore/QFile>
-#include <QtCore/QPluginLoader>
#include <QtCore/QFileInfo>
#include <QtCore/QThread>
-#include <QtHelp/QHelpLink>
-#include <QtWidgets/QApplication>
-#include <QtSql/QSqlQuery>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h
index caf02fc16..faf1c5fc9 100644
--- a/src/assistant/help/qhelpenginecore.h
+++ b/src/assistant/help/qhelpenginecore.h
@@ -6,9 +6,8 @@
#include <QtHelp/qhelp_global.h>
-#include <QtCore/QUrl>
-#include <QtCore/QMap>
#include <QtCore/QObject>
+#include <QtCore/QUrl>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpfilterdata.cpp b/src/assistant/help/qhelpfilterdata.cpp
index 962708aa0..654201a11 100644
--- a/src/assistant/help/qhelpfilterdata.cpp
+++ b/src/assistant/help/qhelpfilterdata.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpfilterdata.h"
+
#include <QtCore/QVersionNumber>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpfilterengine.cpp b/src/assistant/help/qhelpfilterengine.cpp
index 596a6719b..fca81dc59 100644
--- a/src/assistant/help/qhelpfilterengine.cpp
+++ b/src/assistant/help/qhelpfilterengine.cpp
@@ -2,10 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpfilterengine.h"
+#include "qhelpcollectionhandler_p.h"
#include "qhelpenginecore.h"
#include "qhelpfilterdata.h"
-#include "qhelpdbreader_p.h"
-#include "qhelpcollectionhandler_p.h"
#include <QtCore/QThread>
#include <QtCore/QVersionNumber>
diff --git a/src/assistant/help/qhelpfilterengine.h b/src/assistant/help/qhelpfilterengine.h
index 5a2bf26fa..36c540237 100644
--- a/src/assistant/help/qhelpfilterengine.h
+++ b/src/assistant/help/qhelpfilterengine.h
@@ -10,14 +10,13 @@
QT_BEGIN_NAMESPACE
-template <class K, class T>
-class QMap;
-class QVersionNumber;
-
class QHelpCollectionHandler;
class QHelpEngineCore;
class QHelpFilterData;
class QHelpFilterEnginePrivate;
+template <class K, class T>
+class QMap;
+class QVersionNumber;
class QHELP_EXPORT QHelpFilterEngine : public QObject
{
diff --git a/src/assistant/help/qhelpfiltersettings_p.h b/src/assistant/help/qhelpfiltersettings_p.h
index 8714e96b1..81b64b01e 100644
--- a/src/assistant/help/qhelpfiltersettings_p.h
+++ b/src/assistant/help/qhelpfiltersettings_p.h
@@ -19,11 +19,11 @@
QT_BEGIN_NAMESPACE
-template <class K, class T>
-class QMap;
class QHelpFilterData;
class QHelpFilterEngine;
class QHelpFilterSettingsPrivate;
+template <class K, class T>
+class QMap;
class QHelpFilterSettings final
{
diff --git a/src/assistant/help/qhelpfiltersettingswidget.cpp b/src/assistant/help/qhelpfiltersettingswidget.cpp
index d59e7801a..a6e82b4da 100644
--- a/src/assistant/help/qhelpfiltersettingswidget.cpp
+++ b/src/assistant/help/qhelpfiltersettingswidget.cpp
@@ -2,13 +2,13 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpfilterdata.h"
+#include "qfilternamedialog_p.h"
#include "qhelpfiltersettings_p.h"
#include "qhelpfiltersettingswidget.h"
#include "ui_qhelpfiltersettingswidget.h"
-#include "qfilternamedialog_p.h"
-#include <QtWidgets/QMessageBox>
#include <QtCore/QVersionNumber>
+#include <QtWidgets/QMessageBox>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpfiltersettingswidget.h b/src/assistant/help/qhelpfiltersettingswidget.h
index db6c44639..d543c9ecc 100644
--- a/src/assistant/help/qhelpfiltersettingswidget.h
+++ b/src/assistant/help/qhelpfiltersettingswidget.h
@@ -6,14 +6,13 @@
#include <QtHelp/qhelp_global.h>
-#include <QtWidgets/qwidget.h>
+#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
-class QVersionNumber;
-
class QHelpFilterEngine;
class QHelpFilterSettingsWidgetPrivate;
+class QVersionNumber;
class QHELP_EXPORT QHelpFilterSettingsWidget : public QWidget
{
diff --git a/src/assistant/help/qhelpindexwidget.cpp b/src/assistant/help/qhelpindexwidget.cpp
index 40bf92d75..acf72ccad 100644
--- a/src/assistant/help/qhelpindexwidget.cpp
+++ b/src/assistant/help/qhelpindexwidget.cpp
@@ -2,16 +2,13 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qhelpindexwidget.h"
-#include "qhelpenginecore.h"
-#include "qhelpengine_p.h"
-#include "qhelpdbreader_p.h"
#include "qhelpcollectionhandler_p.h"
+#include "qhelpengine_p.h"
+#include "qhelpenginecore.h"
+#include "qhelplink.h"
#include <QtCore/QThread>
#include <QtCore/QMutex>
-#include <QtHelp/QHelpLink>
-#include <QtWidgets/QListView>
-#include <QtWidgets/QHeaderView>
#include <algorithm>
diff --git a/src/assistant/help/qhelpindexwidget.h b/src/assistant/help/qhelpindexwidget.h
index adc57a4ea..376db933e 100644
--- a/src/assistant/help/qhelpindexwidget.h
+++ b/src/assistant/help/qhelpindexwidget.h
@@ -6,15 +6,15 @@
#include <QtHelp/qhelp_global.h>
-#include <QtCore/QUrl>
#include <QtCore/QStringListModel>
+#include <QtCore/QUrl>
+
#include <QtWidgets/QListView>
QT_BEGIN_NAMESPACE
-
-class QHelpEnginePrivate;
class QHelpEngineCore;
+class QHelpEnginePrivate;
class QHelpIndexModelPrivate;
struct QHelpLink;
diff --git a/src/assistant/help/qhelpsearchengine.cpp b/src/assistant/help/qhelpsearchengine.cpp
index 9483a1b0f..b73fcb527 100644
--- a/src/assistant/help/qhelpsearchengine.cpp
+++ b/src/assistant/help/qhelpsearchengine.cpp
@@ -13,8 +13,6 @@
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
-#include <QtCore/QVariant>
-#include <QtCore/QThread>
#include <QtCore/QPointer>
#include <QtCore/QTimer>
diff --git a/src/assistant/help/qhelpsearchengine.h b/src/assistant/help/qhelpsearchengine.h
index b421c9547..f2c824b13 100644
--- a/src/assistant/help/qhelpsearchengine.h
+++ b/src/assistant/help/qhelpsearchengine.h
@@ -6,20 +6,18 @@
#include <QtHelp/qhelp_global.h>
-#include <QtCore/QMap>
-#include <QtCore/QUrl>
#include <QtCore/QObject>
#include <QtCore/QSharedDataPointer>
-#include <QtCore/QString>
#include <QtCore/QStringList>
QT_BEGIN_NAMESPACE
class QHelpEngineCore;
-class QHelpSearchQueryWidget;
class QHelpSearchEnginePrivate;
+class QHelpSearchQueryWidget;
class QHelpSearchResultData;
class QHelpSearchResultWidget;
+class QUrl;
class QHELP_EXPORT QHelpSearchQuery
{
diff --git a/src/assistant/help/qhelpsearchindexreader_default_p.h b/src/assistant/help/qhelpsearchindexreader_default_p.h
index b91b8be76..60e732ce2 100644
--- a/src/assistant/help/qhelpsearchindexreader_default_p.h
+++ b/src/assistant/help/qhelpsearchindexreader_default_p.h
@@ -17,10 +17,10 @@
#include "qhelpsearchindexreader_p.h"
-QT_FORWARD_DECLARE_CLASS(QSqlDatabase)
-
QT_BEGIN_NAMESPACE
+class QSqlDatabase;
+
namespace fulltextsearch {
namespace qt {
diff --git a/src/assistant/help/qhelpsearchindexreader_p.h b/src/assistant/help/qhelpsearchindexreader_p.h
index fb098e7d5..901dc839e 100644
--- a/src/assistant/help/qhelpsearchindexreader_p.h
+++ b/src/assistant/help/qhelpsearchindexreader_p.h
@@ -23,8 +23,6 @@
QT_BEGIN_NAMESPACE
-class QHelpEngineCore;
-
namespace fulltextsearch {
class QHelpSearchIndexReader : public QThread
diff --git a/src/assistant/help/qhelpsearchindexwriter_default.cpp b/src/assistant/help/qhelpsearchindexwriter_default.cpp
index 70a6ccded..132b8edbb 100644
--- a/src/assistant/help/qhelpsearchindexwriter_default.cpp
+++ b/src/assistant/help/qhelpsearchindexwriter_default.cpp
@@ -3,15 +3,14 @@
#include "qhelpsearchindexwriter_default_p.h"
#include "qhelp_global.h"
-#include "qhelpenginecore.h"
#include "qhelpdbreader_p.h"
+#include "qhelpenginecore.h"
#include <QtCore/QDataStream>
#include <QtCore/QDateTime>
#include <QtCore/QDir>
#include <QtCore/QStringDecoder>
#include <QtCore/QTextStream>
-#include <QtCore/QSet>
#include <QtCore/QUrl>
#include <QtCore/QVariant>
#include <QtSql/QSqlDatabase>
diff --git a/src/assistant/help/qhelpsearchindexwriter_default_p.h b/src/assistant/help/qhelpsearchindexwriter_default_p.h
index d9df8c542..4edcbc26b 100644
--- a/src/assistant/help/qhelpsearchindexwriter_default_p.h
+++ b/src/assistant/help/qhelpsearchindexwriter_default_p.h
@@ -18,10 +18,10 @@
#include <QtCore/QMutex>
#include <QtCore/QThread>
-QT_FORWARD_DECLARE_CLASS(QSqlDatabase)
-
QT_BEGIN_NAMESPACE
+class QSqlDatabase;
+
namespace fulltextsearch {
namespace qt {
@@ -62,7 +62,6 @@ private:
QVariantList m_contents;
};
-
class QHelpSearchIndexWriter : public QThread
{
Q_OBJECT
@@ -91,7 +90,7 @@ private:
QString m_indexFilesFolder;
};
-} // namespace std
+} // namespace qt
} // namespace fulltextsearch
QT_END_NAMESPACE
diff --git a/src/assistant/help/qhelpsearchquerywidget.cpp b/src/assistant/help/qhelpsearchquerywidget.cpp
index 4602d47bc..6eefe4783 100644
--- a/src/assistant/help/qhelpsearchquerywidget.cpp
+++ b/src/assistant/help/qhelpsearchquerywidget.cpp
@@ -4,15 +4,12 @@
#include "qhelpsearchquerywidget.h"
#include <QtCore/QAbstractListModel>
-#include <QtCore/QObject>
#include <QtCore/QStringList>
-#include <QtCore/QtGlobal>
-
+#include <QtGui/QFocusEvent>
#include <QtWidgets/QCompleter>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLayout>
#include <QtWidgets/QLineEdit>
-#include <QtGui/QFocusEvent>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QToolButton>
diff --git a/src/assistant/help/qhelpsearchquerywidget.h b/src/assistant/help/qhelpsearchquerywidget.h
index a4dbc5788..9c31b66a0 100644
--- a/src/assistant/help/qhelpsearchquerywidget.h
+++ b/src/assistant/help/qhelpsearchquerywidget.h
@@ -7,15 +7,10 @@
#include <QtHelp/qhelp_global.h>
#include <QtHelp/qhelpsearchengine.h>
-#include <QtCore/QMap>
-#include <QtCore/QString>
-#include <QtCore/QStringList>
-
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
-
class QFocusEvent;
class QHelpSearchQueryWidgetPrivate;
diff --git a/src/assistant/help/qhelpsearchresultwidget.cpp b/src/assistant/help/qhelpsearchresultwidget.cpp
index 246f8fee3..7f149caa0 100644
--- a/src/assistant/help/qhelpsearchresultwidget.cpp
+++ b/src/assistant/help/qhelpsearchresultwidget.cpp
@@ -3,21 +3,15 @@
#include "qhelpsearchresultwidget.h"
+#include <QtCore/QEvent>
#include <QtCore/QList>
-#include <QtCore/QString>
#include <QtCore/QPointer>
-#include <QtCore/QStringList>
#include <QtCore/QTextStream>
-
#include <QtWidgets/QLabel>
#include <QtWidgets/QLayout>
-#include <QtGui/QMouseEvent>
-#include <QtWidgets/QHeaderView>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QToolButton>
-#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QTextBrowser>
-#include <QtWidgets/QTreeWidgetItem>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qhelpsearchresultwidget.h b/src/assistant/help/qhelpsearchresultwidget.h
index 8e3bd5800..b2a733832 100644
--- a/src/assistant/help/qhelpsearchresultwidget.h
+++ b/src/assistant/help/qhelpsearchresultwidget.h
@@ -4,18 +4,16 @@
#ifndef QHELPSEARCHRESULTWIDGET_H
#define QHELPSEARCHRESULTWIDGET_H
-#include <QtHelp/qhelpsearchengine.h>
#include <QtHelp/qhelp_global.h>
-
-#include <QtCore/QUrl>
-#include <QtCore/QPoint>
-#include <QtCore/QObject>
+#include <QtHelp/qhelpsearchengine.h>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class QHelpSearchResultWidgetPrivate;
+class QPoint;
+class QUrl;
class QHELP_EXPORT QHelpSearchResultWidget : public QWidget
{
diff --git a/src/assistant/help/qoptionswidget.cpp b/src/assistant/help/qoptionswidget.cpp
index 01abbfdef..3e8837454 100644
--- a/src/assistant/help/qoptionswidget.cpp
+++ b/src/assistant/help/qoptionswidget.cpp
@@ -3,10 +3,9 @@
#include "qoptionswidget_p.h"
-#include <QtWidgets/QComboBox>
#include <QtWidgets/QItemDelegate>
+#include <QtWidgets/QLayout>
#include <QtWidgets/QListWidget>
-#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
diff --git a/src/assistant/help/qoptionswidget_p.h b/src/assistant/help/qoptionswidget_p.h
index e466b4654..fc9dea92c 100644
--- a/src/assistant/help/qoptionswidget_p.h
+++ b/src/assistant/help/qoptionswidget_p.h
@@ -15,9 +15,10 @@
// We mean it.
//
-#include <QtWidgets/QWidget>
#include <QtCore/QMap>
+#include <QtWidgets/QWidget>
+
QT_BEGIN_NAMESPACE
class QListWidget;