summaryrefslogtreecommitdiff
path: root/src/plugins/help
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-04-22 16:15:26 +0200
committerEike Ziller <eike.ziller@qt.io>2021-04-26 08:03:47 +0000
commitc1f90aeca2a921397c36f53fd8d6a834b79e0b0d (patch)
treeb32416613d15ad3cfe201e8ed4c08ce882f838c2 /src/plugins/help
parentb2c05547333444859941b584f3f30c9cfac6815a (diff)
downloadqt-creator-c1f90aeca2a921397c36f53fd8d6a834b79e0b0d.tar.gz
ICore: Change some path API to use FilePath
Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/help')
-rw-r--r--src/plugins/help/helpmanager.cpp3
-rw-r--r--src/plugins/help/helpplugin.cpp10
-rw-r--r--src/plugins/help/macwebkithelpviewer.mm5
3 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/help/helpmanager.cpp b/src/plugins/help/helpmanager.cpp
index 91b2f2b640..77c7bf2815 100644
--- a/src/plugins/help/helpmanager.cpp
+++ b/src/plugins/help/helpmanager.cpp
@@ -125,8 +125,7 @@ HelpManager *HelpManager::instance()
QString HelpManager::collectionFilePath()
{
- return QDir::cleanPath(ICore::userResourcePath()
- + QLatin1String("/helpcollection.qhc"));
+ return ICore::userResourcePath().pathAppended("helpcollection.qhc").toString();
}
void HelpManager::registerDocumentation(const QStringList &files)
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 00a1b28e5a..8dbccfa88d 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -189,14 +189,14 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
HelpPluginPrivate::HelpPluginPrivate()
{
- const QString &locale = ICore::userInterfaceLanguage();
+ const QString locale = ICore::userInterfaceLanguage();
if (!locale.isEmpty()) {
auto qtr = new QTranslator(this);
auto qhelptr = new QTranslator(this);
- const QString &creatorTrPath = ICore::resourcePath() + "/translations";
- const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
- const QString &trFile = QLatin1String("assistant_") + locale;
- const QString &helpTrFile = QLatin1String("qt_help_") + locale;
+ const QString creatorTrPath = ICore::resourcePath().pathAppended("translations").toString();
+ const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ const QString trFile = QLatin1String("assistant_") + locale;
+ const QString helpTrFile = QLatin1String("qt_help_") + locale;
if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath))
QCoreApplication::installTranslator(qtr);
if (qhelptr->load(helpTrFile, qtTrPath) || qhelptr->load(helpTrFile, creatorTrPath))
diff --git a/src/plugins/help/macwebkithelpviewer.mm b/src/plugins/help/macwebkithelpviewer.mm
index 1cb2aa2596..be8a1c1c17 100644
--- a/src/plugins/help/macwebkithelpviewer.mm
+++ b/src/plugins/help/macwebkithelpviewer.mm
@@ -584,8 +584,9 @@ void MacWebKitHelpViewer::setHtml(const QString &html)
{
@autoreleasepool {
[m_widget->webView().mainFrame
- loadHTMLString:html.toNSString()
- baseURL:[NSURL fileURLWithPath:Core::ICore::resourcePath().toNSString()]];
+ loadHTMLString:html.toNSString()
+ baseURL:[NSURL
+ fileURLWithPath:Core::ICore::resourcePath().toString().toNSString()]];
}
}