diff --git a/src/app/main.cpp b/src/app/main.cpp index 3a2cb5bfaae..ec401522928 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -647,7 +647,7 @@ int main(int argc, char **argv) for (QString locale : std::as_const(uiLanguages)) { locale = QLocale(locale).name(); if (translator.load("qtcreator_" + locale, creatorTrPath)) { - const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + const QString &qtTrPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); const QString &qtTrFile = QLatin1String("qt_") + locale; // Binary installer puts Qt tr files into creatorTrPath if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) { diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index ae2dbf8903b..b567d753250 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -399,7 +399,7 @@ static QString filled(const QString &s, int min) QString PluginManager::systemInformation() { QString result; - CommandLine qtDiag(FilePath::fromString(QLibraryInfo::location(QLibraryInfo::BinariesPath)) + CommandLine qtDiag(FilePath::fromString(QLibraryInfo::path(QLibraryInfo::BinariesPath)) .pathAppended("qtdiag").withExecutableSuffix()); Process qtDiagProc; qtDiagProc.setCommand(qtDiag); diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index 6bcfe7ee25c..66a670d1b8a 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -114,9 +114,9 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent) qRegisterMetaType("QmlJS::PathsAndLanguages"); m_defaultProjectInfo.qtQmlPath = - FilePath::fromUserInput(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + FilePath::fromUserInput(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); m_defaultProjectInfo.qmllsPath = ModelManagerInterface::qmllsForBinPath( - FilePath::fromUserInput(QLibraryInfo::location(QLibraryInfo::BinariesPath)), + FilePath::fromUserInput(QLibraryInfo::path(QLibraryInfo::BinariesPath)), QLibraryInfo::version()); m_defaultProjectInfo.qtVersionString = QLibraryInfo::version().toString(); diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 7b14eb07baf..eab29faf7d6 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -152,7 +152,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q) static bool hasQmFilesForLocale(const QString &locale, const QString &creatorTrPath) { - static const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + static const QString qtTrPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); const QString trFile = QLatin1String("/qt_") + locale + QLatin1String(".qm"); return QFile::exists(qtTrPath + trFile) || QFile::exists(creatorTrPath + trFile); diff --git a/src/plugins/coreplugin/loggingmanager.cpp b/src/plugins/coreplugin/loggingmanager.cpp index 665bf425568..608e7ce4706 100644 --- a/src/plugins/coreplugin/loggingmanager.cpp +++ b/src/plugins/coreplugin/loggingmanager.cpp @@ -105,7 +105,7 @@ static QList fetchOriginalRules() }; Utils::FilePath iniFile = Utils::FilePath::fromString( - QLibraryInfo::location(QLibraryInfo::DataPath)).pathAppended("qtlogging.ini"); + QLibraryInfo::path(QLibraryInfo::DataPath)).pathAppended("qtlogging.ini"); if (iniFile.exists()) appendRulesFromFile(iniFile.toString()); diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 881e6a30eb5..fd9a78187c5 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -86,7 +86,7 @@ void FormEditorPlugin::initialize() if (!locale.isEmpty()) { auto qtr = new QTranslator(this); const QString creatorTrPath = ICore::resourcePath("translations").toString(); - const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + const QString qtTrPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); const QString trFile = "designer_" + locale; if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath)) QCoreApplication::installTranslator(qtr); diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 7329b3dad67..9ad90528676 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -182,7 +182,7 @@ HelpPluginPrivate::HelpPluginPrivate() auto qtr = new QTranslator(this); auto qhelptr = new QTranslator(this); const QString creatorTrPath = ICore::resourcePath("translations").toString(); - const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + const QString qtTrPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); const QString trFile = QLatin1String("assistant_") + locale; const QString helpTrFile = QLatin1String("qt_help_") + locale; if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath)) diff --git a/src/plugins/qmldesigner/puppetenvironmentbuilder.cpp b/src/plugins/qmldesigner/puppetenvironmentbuilder.cpp index 079cc0a326b..e52c0c70581 100644 --- a/src/plugins/qmldesigner/puppetenvironmentbuilder.cpp +++ b/src/plugins/qmldesigner/puppetenvironmentbuilder.cpp @@ -205,7 +205,7 @@ void PuppetEnvironmentBuilder::addImportPaths() const } if (m_availablePuppetType == PuppetType::Fallback) - importPaths.prepend(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + importPaths.prepend(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); constexpr auto pathSep = Utils::HostOsInfo::pathListSeparator(); m_environment.appendOrSet("QML2_IMPORT_PATH", importPaths.join(pathSep), pathSep); diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index 914a4f77945..23834e82aa4 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -201,9 +201,9 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.qmllsPath = ModelManagerInterface::qmllsForBinPath(qtVersion->hostBinPath(), v); projectInfo.qtVersionString = qtVersion->qtVersionString(); } else if (!activeKit || !activeKit->value(QtSupport::SuppliesQtQuickImportPath::id(), false).toBool()) { - projectInfo.qtQmlPath = FilePath::fromUserInput(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + projectInfo.qtQmlPath = FilePath::fromUserInput(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); projectInfo.qmllsPath = ModelManagerInterface::qmllsForBinPath( - FilePath::fromUserInput(QLibraryInfo::location(QLibraryInfo::BinariesPath)), QLibraryInfo::version()); + FilePath::fromUserInput(QLibraryInfo::path(QLibraryInfo::BinariesPath)), QLibraryInfo::version()); projectInfo.qtVersionString = QLatin1String(qVersion()); } diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp index d71836319cc..4cf135f0be7 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp @@ -177,7 +177,7 @@ void QmlProfilerDetailsRewriterTest::seedRewriter() QmlJS::PathsAndLanguages lPaths; lPaths.maybeInsert( - Utils::FilePath::fromString(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)), + Utils::FilePath::fromString(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)), QmlJS::Dialect::Qml); QmlJS::ModelManagerInterface::importScan(QmlJS::ModelManagerInterface::workingCopy(), lPaths, m_modelManager, false); diff --git a/src/tools/qml2puppet/qml2puppet/instances/objectnodeinstance.cpp b/src/tools/qml2puppet/qml2puppet/instances/objectnodeinstance.cpp index 8a982f5cdd5..88689d4c304 100644 --- a/src/tools/qml2puppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/src/tools/qml2puppet/qml2puppet/instances/objectnodeinstance.cpp @@ -851,7 +851,7 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component if (componentPath.contains(importString)) { int index = componentPath.indexOf(importString) + 8; const QString relativeImportPath = componentPath.right(componentPath.length() - index); - QString fixedComponentPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + relativeImportPath; + QString fixedComponentPath = QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath) + relativeImportPath; fixedComponentPath.replace(QLatin1Char('\\'), QLatin1Char('/')); if (QFileInfo::exists(fixedComponentPath)) return fixedComponentPath; diff --git a/tests/auto/qml/codemodel/check/tst_check.cpp b/tests/auto/qml/codemodel/check/tst_check.cpp index 56ccdfd2a37..befb363ae4c 100644 --- a/tests/auto/qml/codemodel/check/tst_check.cpp +++ b/tests/auto/qml/codemodel/check/tst_check.cpp @@ -73,7 +73,7 @@ void tst_Check::initTestCase() ModelManagerInterface *modelManager = ModelManagerInterface::instance(); PathsAndLanguages lPaths; - QStringList paths(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); + QStringList paths(QLibraryInfo::path(QLibraryInfo::Qml2ImportsPath)); for (auto p: paths) lPaths.maybeInsert(Utils::FilePath::fromString(p), Dialect::Qml); ModelManagerInterface::importScan(ModelManagerInterface::workingCopy(), lPaths,