diff options
author | hjk <[email protected]> | 2023-02-16 16:11:17 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2023-02-17 08:26:00 +0000 |
commit | a382be045417cd1403d1e593613f34ee74091936 (patch) | |
tree | e2700f5e233354c80531ec514ac9ad35b5ac4b05 | |
parent | 4e9309f923161589c0d59d57e5e049286b6a6914 (diff) |
Help: Merge helpmode.{h,cpp} into helpplugin.cpp
Never re-used and tiny. Not worth a file pair.
Change-Id: Idc5b2f4080b7140dee4f32fd834f4c76a7abc4b4
Reviewed-by: <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
-rw-r--r-- | src/plugins/help/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/plugins/help/help.qbs | 1 | ||||
-rw-r--r-- | src/plugins/help/helpmode.cpp | 24 | ||||
-rw-r--r-- | src/plugins/help/helpmode.h | 21 | ||||
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 52 |
5 files changed, 29 insertions, 70 deletions
diff --git a/src/plugins/help/CMakeLists.txt b/src/plugins/help/CMakeLists.txt index 76a680c7595..c25f0b6cd5b 100644 --- a/src/plugins/help/CMakeLists.txt +++ b/src/plugins/help/CMakeLists.txt @@ -12,7 +12,6 @@ add_qtc_plugin(Help helpfindsupport.cpp helpfindsupport.h helpindexfilter.cpp helpindexfilter.h helpmanager.cpp helpmanager.h - helpmode.cpp helpmode.h helpplugin.cpp helpplugin.h helpviewer.cpp helpviewer.h helpwidget.cpp helpwidget.h diff --git a/src/plugins/help/help.qbs b/src/plugins/help/help.qbs index 25d85bdc37e..d96cfa154e7 100644 --- a/src/plugins/help/help.qbs +++ b/src/plugins/help/help.qbs @@ -43,7 +43,6 @@ Project { "helpfindsupport.cpp", "helpfindsupport.h", "helpindexfilter.cpp", "helpindexfilter.h", "helpmanager.cpp", "helpmanager.h", - "helpmode.cpp", "helpmode.h", "helpplugin.cpp", "helpplugin.h", "helpviewer.cpp", "helpviewer.h", "helpwidget.cpp", "helpwidget.h", diff --git a/src/plugins/help/helpmode.cpp b/src/plugins/help/helpmode.cpp deleted file mode 100644 index 2e2ee468939..00000000000 --- a/src/plugins/help/helpmode.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -#include "helpmode.h" -#include "helpconstants.h" -#include "helpicons.h" -#include "helptr.h" - -#include <QCoreApplication> - -using namespace Help; -using namespace Help::Internal; - -HelpMode::HelpMode(QObject *parent) - : Core::IMode(parent) -{ - setObjectName("HelpMode"); - setContext(Core::Context(Constants::C_MODE_HELP)); - setIcon(Utils::Icon::modeIcon(Icons::MODE_HELP_CLASSIC, - Icons::MODE_HELP_FLAT, Icons::MODE_HELP_FLAT_ACTIVE)); - setDisplayName(Tr::tr("Help")); - setPriority(Constants::P_MODE_HELP); - setId(Constants::ID_MODE_HELP); -} diff --git a/src/plugins/help/helpmode.h b/src/plugins/help/helpmode.h deleted file mode 100644 index fbe69f08bca..00000000000 --- a/src/plugins/help/helpmode.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -#pragma once - -#include <coreplugin/imode.h> - -#include <QString> -#include <QIcon> - -namespace Help { -namespace Internal { - -class HelpMode : public Core::IMode -{ -public: - explicit HelpMode(QObject *parent = nullptr); -}; - -} // namespace Internal -} // namespace Help diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 56126372476..de055889edb 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -4,7 +4,6 @@ #include "helpplugin.h" #include "bookmarkmanager.h" -#include "contentwindow.h" #include "docsettingspage.h" #include "filtersettingspage.h" #include "generalsettingspage.h" @@ -13,11 +12,9 @@ #include "helpicons.h" #include "helpindexfilter.h" #include "helpmanager.h" -#include "helpmode.h" #include "helptr.h" #include "helpviewer.h" #include "helpwidget.h" -#include "indexwindow.h" #include "localhelpmanager.h" #include "openpagesmanager.h" #include "searchtaskhandler.h" @@ -35,6 +32,7 @@ #include <coreplugin/findplaceholder.h> #include <coreplugin/helpitem.h> #include <coreplugin/icore.h> +#include <coreplugin/imode.h> #include <coreplugin/minisplitter.h> #include <coreplugin/modemanager.h> #include <coreplugin/rightpane.h> @@ -52,38 +50,47 @@ #include <utils/theme/theme.h> #include <utils/tooltip/tooltip.h> +#include <QAction> #include <QApplication> +#include <QComboBox> +#include <QDesktopServices> #include <QDialog> #include <QDialogButtonBox> -#include <QDir> -#include <QFileInfo> +#include <QHelpEngine> #include <QLabel> #include <QLibraryInfo> +#include <QMenu> #include <QPlainTextEdit> -#include <QTimer> -#include <QTranslator> -#include <qplugin.h> #include <QRegularExpression> - -#include <QAction> -#include <QComboBox> -#include <QDesktopServices> -#include <QMenu> -#include <QStackedLayout> #include <QSplitter> - -#include <QHelpEngine> +#include <QStackedLayout> +#include <QTimer> +#include <QTranslator> #include <functional> -static const char kExternalWindowStateKey[] = "Help/ExternalWindowState"; -static const char kToolTipHelpContext[] = "Help.ToolTip"; - using namespace Core; using namespace Utils; -namespace Help { -namespace Internal { +namespace Help::Internal { + +const char kExternalWindowStateKey[] = "Help/ExternalWindowState"; +const char kToolTipHelpContext[] = "Help.ToolTip"; + +class HelpMode : public IMode +{ +public: + HelpMode() + { + setObjectName("HelpMode"); + setContext(Core::Context(Constants::C_MODE_HELP)); + setIcon(Icon::modeIcon(Icons::MODE_HELP_CLASSIC, + Icons::MODE_HELP_FLAT, Icons::MODE_HELP_FLAT_ACTIVE)); + setDisplayName(Tr::tr("Help")); + setPriority(Constants::P_MODE_HELP); + setId(Constants::ID_MODE_HELP); + } +}; class HelpPluginPrivate : public QObject { @@ -641,5 +648,4 @@ void HelpPluginPrivate::doSetupIfNeeded() } } -} // Internal -} // Help +} // Help::Internal |