forked from qt-creator/qt-creator
Refactor: add userResourcePath() accessor to ICore.
Access to the users private resource path (derived from the settings path) has been used in quite some places, so it's worth moving it to the core interface centrally. Reviewed-By: Thorbjorn Lindeijer
This commit is contained in:
@@ -94,11 +94,7 @@ HelpManager* HelpManager::instance()
|
||||
|
||||
QString HelpManager::collectionFilePath()
|
||||
{
|
||||
const QFileInfo fi(Core::ICore::instance()->settings()->fileName());
|
||||
const QDir directory(fi.absolutePath() + QLatin1String("/qtcreator"));
|
||||
if (!directory.exists())
|
||||
directory.mkpath(directory.absolutePath());
|
||||
return QDir::cleanPath(directory.absolutePath() + QLatin1String("/helpcollection.qhc"));
|
||||
return QDir::cleanPath(Core::ICore::instance()->userResourcePath() + QLatin1String("/helpcollection.qhc"));
|
||||
}
|
||||
|
||||
void HelpManager::registerDocumentation(const QStringList &files)
|
||||
|
||||
Reference in New Issue
Block a user