Commit 60f7f00e authored by Eike Ziller's avatar Eike Ziller

Provide ICore::documentationPath()

Change-Id: I74e4ad7650296e897edc3313904168a720c8d360
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 3bc58402
......@@ -511,6 +511,13 @@ QString ICore::userResourcePath()
return urp;
}
QString ICore::documentationPath()
{
const QString docPath = QLatin1String(Utils::HostOsInfo::isMacHost()
? "/../Resources/doc" : "/../share/doc/qtcreator");
return QDir::cleanPath(QCoreApplication::applicationDirPath() + docPath);
}
static QString compilerString()
{
#if defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too
......
......@@ -112,6 +112,7 @@ public:
static QString resourcePath();
static QString userResourcePath();
static QString documentationPath();
static QString versionString();
static QString buildCompatibilityString();
......
......@@ -105,12 +105,6 @@ const char SB_OPENPAGES[] = "OpenPages";
#define IMAGEPATH ":/help/images/"
static QString docPath()
{
return QLatin1String(Utils::HostOsInfo::isMacHost()
? "/../Resources/doc/" : "/../share/doc/qtcreator/");
}
using namespace Core;
static QToolButton *toolButton(QAction *action)
......@@ -391,7 +385,7 @@ void HelpPlugin::extensionsInitialized()
QStringList filesToRegister;
// we might need to register creators inbuild help
filesToRegister.append(QDir::cleanPath(QCoreApplication::applicationDirPath()
+ docPath() + QLatin1String("qtcreator.qch")));
+ ICore::documentationPath() + QLatin1String("/qtcreator.qch")));
Core::HelpManager::instance()->registerDocumentation(filesToRegister);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment