forked from qt-creator/qt-creator
Move documentationPath() from Core::ICore to Core::HelpManager
It is documentation related API, so it belongs there. Change-Id: I5d1676f251e6deb92050ddedac19bf3c332aab54 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include <extensionsystem/pluginspec.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QUrl>
|
||||
|
||||
namespace Core {
|
||||
@@ -67,6 +69,11 @@ Implementation::~Implementation()
|
||||
m_instance = nullptr;
|
||||
}
|
||||
|
||||
QString documentationPath()
|
||||
{
|
||||
return QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DOC_PATH);
|
||||
}
|
||||
|
||||
void registerDocumentation(const QStringList &files)
|
||||
{
|
||||
if (checkInstance())
|
||||
|
||||
@@ -58,6 +58,8 @@ enum HelpViewerLocation {
|
||||
ExternalHelpAlways = 3
|
||||
};
|
||||
|
||||
CORE_EXPORT QString documentationPath();
|
||||
|
||||
CORE_EXPORT void registerDocumentation(const QStringList &fileNames);
|
||||
CORE_EXPORT void unregisterDocumentation(const QStringList &nameSpaces);
|
||||
|
||||
|
||||
@@ -445,11 +445,6 @@ QString ICore::installerResourcePath()
|
||||
+ Constants::IDE_ID;
|
||||
}
|
||||
|
||||
QString ICore::documentationPath()
|
||||
{
|
||||
return QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DOC_PATH);
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the path to the command line tools that are shipped with \QC (corresponding
|
||||
to the IDE_LIBEXEC_PATH qmake variable).
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
static QString resourcePath();
|
||||
static QString userResourcePath();
|
||||
static QString installerResourcePath();
|
||||
static QString documentationPath();
|
||||
static QString libexecPath();
|
||||
static QString clangExecutable(const QString &clangBinDirectory);
|
||||
static QString clangIncludeDirectory(const QString &clangVersion,
|
||||
|
||||
@@ -329,7 +329,7 @@ void HelpPlugin::extensionsInitialized()
|
||||
{
|
||||
QStringList filesToRegister;
|
||||
// we might need to register creators inbuild help
|
||||
filesToRegister.append(ICore::documentationPath() + "/qtcreator.qch");
|
||||
filesToRegister.append(Core::HelpManager::documentationPath() + "/qtcreator.qch");
|
||||
Core::HelpManager::registerDocumentation(filesToRegister);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
||||
const Core::Context projectContext(::QbsProjectManager::Constants::PROJECT_ID);
|
||||
|
||||
Core::FileIconProvider::registerIconOverlayForSuffix(ProjectExplorer::Constants::FILEOVERLAY_QT, "qbs");
|
||||
Core::HelpManager::registerDocumentation({Core::ICore::documentationPath() + "/qbs.qch"});
|
||||
Core::HelpManager::registerDocumentation({Core::HelpManager::documentationPath() + "/qbs.qch"});
|
||||
|
||||
ProjectManager::registerProjectType<QbsProject>(QmlJSTools::Constants::QBS_MIMETYPE);
|
||||
KitManager::registerKitInformation<QbsKitInformation>();
|
||||
|
||||
Reference in New Issue
Block a user