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 - -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 - -#include -#include - -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 #include #include +#include #include #include #include @@ -52,38 +50,47 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include +#include #include #include -#include -#include -#include - +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -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