From 22121885feb7c686eb640362025ce97e5fb1af08 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 13 Jul 2021 09:41:26 +0200 Subject: [PATCH] baseqtversion: commands are FilePathes also renamed the qmlscene* qmlRuntime* Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4 Reviewed-by: hjk Reviewed-by: Tim Jenssen --- .../cmakekitinformation.cpp | 2 +- src/plugins/docker/dockerdevice.cpp | 2 +- .../qbsprojectmanager/qbsprofilemanager.cpp | 2 +- .../qmakeprojectmanager/externaleditors.cpp | 4 +- .../qmakebuildconfiguration.cpp | 4 +- .../qmakeprojectmanager/qmakeproject.cpp | 2 +- src/plugins/qmakeprojectmanager/qmakestep.cpp | 6 +- .../designercore/instances/puppetcreator.cpp | 2 +- src/plugins/qmldesigner/generateresource.cpp | 4 +- src/plugins/qmljstools/qmljsmodelmanager.cpp | 2 +- src/plugins/qmlprojectmanager/qmlproject.cpp | 2 +- .../qmlprojectrunconfiguration.cpp | 14 +-- src/plugins/qtsupport/baseqtversion.cpp | 94 +++++++++---------- src/plugins/qtsupport/baseqtversion.h | 16 ++-- src/plugins/qtsupport/qscxmlcgenerator.cpp | 2 +- src/plugins/qtsupport/qtkitinformation.cpp | 2 +- src/plugins/qtsupport/qtoptionspage.cpp | 10 +- src/plugins/qtsupport/qtprojectimporter.cpp | 2 +- src/plugins/qtsupport/qtversionmanager.cpp | 8 +- src/plugins/qtsupport/qtversions.cpp | 2 +- src/plugins/qtsupport/uicgenerator.cpp | 2 +- 21 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index e058e11b8c0..1a279e93adc 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -1095,7 +1095,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const if (!version || !version->isValid()) { addWarning(tr("CMake configuration has a path to a qmake binary set, " "even though the kit has no valid Qt version.")); - } else if (qmakePath != version->qmakeCommand() && isQt4) { + } else if (qmakePath != version->qmakeFilePath() && isQt4) { addWarning(tr("CMake configuration has a path to a qmake binary set " "that does not match the qmake binary path " "configured in the Qt version.")); diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 00353cd96c7..67333f75229 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -510,7 +510,7 @@ QList KitDetectorPrivate::autoDetectQtVersions() const continue; qtVersions.append(qtVersion); QtVersionManager::addVersion(qtVersion); - emit q->logOutput(tr("Found Qt: %1").arg(qtVersion->qmakeCommand().toUserOutput())); + emit q->logOutput(tr("Found Qt: %1").arg(qtVersion->qmakeFilePath().toUserOutput())); } if (qtVersions.isEmpty()) emit q->logOutput(tr("No Qt installation found.")); diff --git a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp index 96527ad3007..08e41558e82 100644 --- a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp @@ -181,7 +181,7 @@ void QbsProfileManager::addProfileFromKit(const ProjectExplorer::Kit *k) data = provider->properties(k, data); } if (const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k)) - data.insert("moduleProviders.Qt.qmakeFilePaths", qt->qmakeCommand().toString()); + data.insert("moduleProviders.Qt.qmakeFilePaths", qt->qmakeFilePath().toString()); if (QbsSettings::qbsVersion() < QVersionNumber({1, 20})) { const QString keyPrefix = "profiles." + name + "."; diff --git a/src/plugins/qmakeprojectmanager/externaleditors.cpp b/src/plugins/qmakeprojectmanager/externaleditors.cpp index 453ee727863..538740e0804 100644 --- a/src/plugins/qmakeprojectmanager/externaleditors.cpp +++ b/src/plugins/qmakeprojectmanager/externaleditors.cpp @@ -66,14 +66,14 @@ static inline QString msgAppNotFound(const QString &id) static QString linguistBinary(const QtSupport::BaseQtVersion *qtVersion) { if (qtVersion) - return qtVersion->linguistCommand().toString(); + return qtVersion->linguistFilePath().toString(); return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist"); } static QString designerBinary(const QtSupport::BaseQtVersion *qtVersion) { if (qtVersion) - return qtVersion->designerCommand().toString(); + return qtVersion->designerFilePath().toString(); return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Designer" : "designer"); } diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index b84aa0036bf..11a17c186ab 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -547,8 +547,8 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF return MakefileIncompatible; } - if (version->qmakeCommand() != parse.qmakePath()) { - qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeCommand().toString() + if (version->qmakeFilePath() != parse.qmakePath()) { + qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeFilePath().toString() << " Makefile:"<< parse.qmakePath().toString(); return MakefileForWrongProject; } diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 83377bc987e..82a403bfd0d 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -831,7 +831,7 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString(); if (qtVersion && qtVersion->isValid()) { - m_qmakeGlobals->qmake_abslocation = QDir::cleanPath(qtVersion->qmakeCommand().toString()); + m_qmakeGlobals->qmake_abslocation = QDir::cleanPath(qtVersion->qmakeFilePath().toString()); qtVersion->applyProperties(m_qmakeGlobals.get()); } m_qmakeGlobals->setDirectories(rootProFile()->sourceDir().toString(), diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index ef2ab71b06e..94adb3279df 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -104,7 +104,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id) BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit()); if (!qtVersion) return tr("qmake: No Qt version set. Cannot run qmake."); - const QString program = qtVersion->qmakeCommand().fileName(); + const QString program = qtVersion->qmakeFilePath().fileName(); return tr("qmake: %1 %2").arg(program, project()->projectFilePath().fileName()); }; setSummaryUpdater(updateSummary); @@ -215,7 +215,7 @@ bool QMakeStep::init() else workingDirectory = qmakeBc->buildDirectory(); - m_qmakeCommand = CommandLine{qtVersion->qmakeCommand(), allArguments(qtVersion), CommandLine::Raw}; + m_qmakeCommand = CommandLine{qtVersion->qmakeFilePath(), allArguments(qtVersion), CommandLine::Raw}; m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0)); // The Makefile is used by qmake and make on the build device, from that @@ -433,7 +433,7 @@ QString QMakeStep::makeArguments(const QString &makefile) const QString QMakeStep::effectiveQMakeCall() const { BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit()); - QString qmake = qtVersion ? qtVersion->qmakeCommand().toUserOutput() : QString(); + QString qmake = qtVersion ? qtVersion->qmakeFilePath().toUserOutput() : QString(); if (qmake.isEmpty()) qmake = tr(""); QString make = makeCommand().toUserOutput(); diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 7051164bb1a..25d1203590a 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -573,7 +573,7 @@ QString PuppetCreator::qmakeCommand() const { QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit()); if (currentQtVersion) - return currentQtVersion->qmakeCommand().toString(); + return currentQtVersion->qmakeFilePath().toString(); return QString(); } diff --git a/src/plugins/qmldesigner/generateresource.cpp b/src/plugins/qmldesigner/generateresource.cpp index fdef3228eaa..ccf39af0cb6 100644 --- a/src/plugins/qmldesigner/generateresource.cpp +++ b/src/plugins/qmldesigner/generateresource.cpp @@ -185,7 +185,7 @@ void GenerateResource::generateMenuEntry() QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion( currentProject->activeTarget()->kit()); - FilePath rccBinary = qtVersion->rccCommand(); + FilePath rccBinary = qtVersion->rccFilePath(); Utils::QtcProcess rccProcess; rccProcess.setWorkingDirectory(projectPath); @@ -362,7 +362,7 @@ void GenerateResource::generateMenuEntry() QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion( currentProject->activeTarget()->kit()); - FilePath rccBinary = qtVersion->rccCommand(); + FilePath rccBinary = qtVersion->rccFilePath(); QtcProcess rccProcess; rccProcess.setWorkingDirectory(projectPath); diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index c3092bf1cbb..341043dcf9c 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -156,7 +156,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.qmlDumpPath.clear(); const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit); if (version && projectInfo.tryQmlDump) { - projectInfo.qmlDumpPath = version->qmlplugindumpCommand().toString(); + projectInfo.qmlDumpPath = version->qmlplugindumpFilePath().toString(); projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag(); } diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 6b9d6f56396..bc830a28327 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -373,7 +373,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { if (version->type() == QtSupport::Constants::DESKTOPQT) { - if (version->qmlsceneCommand().isEmpty()) { + if (version->qmlRuntimeFilePath().isEmpty()) { result.append(createProjectTask(Task::TaskType::Error, tr("Qt version has no QML utility."))); } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index c7722051ca4..c9929d0158c 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -76,7 +76,7 @@ private: bool isEnabled() const final; QString mainScript() const; - FilePath qmlScenePath() const; + FilePath qmlRuntimeFilePath() const; QString commandLineArguments() const; StringAspect *m_qmlViewerAspect = nullptr; @@ -97,7 +97,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY); setCommandLineGetter([this] { - return CommandLine(qmlScenePath(), commandLineArguments(), CommandLine::Raw); + return CommandLine(qmlRuntimeFilePath(), commandLineArguments(), CommandLine::Raw); }); m_qmlMainFileAspect = addAspect(target); @@ -150,7 +150,7 @@ QString QmlProjectRunConfiguration::disabledReason() const if (mainScript().isEmpty()) return tr("No script file to execute."); - const FilePath viewer = qmlScenePath(); + const FilePath viewer = qmlRuntimeFilePath(); if (DeviceTypeKitAspect::deviceTypeId(kit()) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE && !viewer.exists()) { @@ -161,7 +161,7 @@ QString QmlProjectRunConfiguration::disabledReason() const return RunConfiguration::disabledReason(); } -FilePath QmlProjectRunConfiguration::qmlScenePath() const +FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const { const QString qmlViewer = m_qmlViewerAspect->value(); if (!qmlViewer.isEmpty()) @@ -176,16 +176,16 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { // If not given explicitly by Qt Version, try to pick it from $PATH. const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT; - return isDesktop ? version->qmlsceneCommand() : FilePath::fromString("qmlscene"); + return isDesktop ? version->qmlRuntimeFilePath() : FilePath::fromString("qmlscene"); } IDevice::ConstPtr dev = DeviceKitAspect::device(kit); if (dev.isNull()) // No device set. We don't know where a QML utility is. return {}; - const QString qmlscene = dev->qmlRunCommand(); + const QString qmlRuntime = dev->qmlRunCommand(); // If not given explicitly by device, try to pick it from $PATH. - return FilePath::fromString(qmlscene.isEmpty() ? QString("qmlscene") : qmlscene); + return FilePath::fromString(qmlRuntime.isEmpty() ? QString("qmlscene") : qmlRuntime); } QString QmlProjectRunConfiguration::commandLineArguments() const diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 03a10483d43..b82e0e5783e 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -235,13 +235,13 @@ public: FilePath m_qmakeCommand; - FilePath m_rccCommand; - FilePath m_uicCommand; - FilePath m_designerCommand; - FilePath m_linguistCommand; - FilePath m_qscxmlcCommand; - FilePath m_qmlsceneCommand; - FilePath m_qmlplugindumpCommand; + FilePath m_rccPath; + FilePath m_uicPath; + FilePath m_designerPath; + FilePath m_linguistPath; + FilePath m_qscxmlcPath; + FilePath m_qmlRuntimePath; + FilePath m_qmlplugindumpPath; MacroExpanderWrapper m_expander; }; @@ -346,12 +346,12 @@ BaseQtVersion::~BaseQtVersion() QString BaseQtVersion::defaultUnexpandedDisplayName() const { QString location; - if (qmakeCommand().isEmpty()) { + if (qmakeFilePath().isEmpty()) { location = QCoreApplication::translate("QtVersion", ""); } else { // Deduce a description from '/foo/qt-folder/[qtbase]/bin/qmake' -> '/foo/qt-folder'. // '/usr' indicates System Qt 4.X on Linux. - QDir dir = qmakeCommand().toFileInfo().absoluteDir(); + QDir dir = qmakeFilePath().toFileInfo().absoluteDir(); do { const QString dirName = dir.dirName(); if (dirName == "usr") { // System-installed Qt. @@ -755,7 +755,7 @@ void BaseQtVersion::fromMap(const QVariantMap &map) updateDefaultDisplayName(); // Clear the cached qmlscene command, it might not match the restored path anymore. - d->m_qmlsceneCommand.clear(); + d->m_qmlRuntimePath.clear(); } QVariantMap BaseQtVersion::toMap() const @@ -769,7 +769,7 @@ QVariantMap BaseQtVersion::toMap() const if (!d->m_overrideFeatures.isEmpty()) result.insert(QTVERSION_OVERRIDE_FEATURES, Utils::Id::toStringList(d->m_overrideFeatures)); - result.insert(QTVERSIONQMAKEPATH, qmakeCommand().toVariant()); + result.insert(QTVERSIONQMAKEPATH, qmakeFilePath().toVariant()); return result; } @@ -780,7 +780,7 @@ bool BaseQtVersion::isValid() const d->updateVersionInfo(); d->updateMkspec(); - return !qmakeCommand().isEmpty() && d->m_data.installed && !binPath().isEmpty() + return !qmakeFilePath().isEmpty() && d->m_data.installed && !binPath().isEmpty() && !d->m_mkspecFullPath.isEmpty() && d->m_qmakeIsExecutable; } @@ -795,7 +795,7 @@ QString BaseQtVersion::invalidReason() const { if (displayName().isEmpty()) return QCoreApplication::translate("QtVersion", "Qt version has no name"); - if (qmakeCommand().isEmpty()) + if (qmakeFilePath().isEmpty()) return QCoreApplication::translate("QtVersion", "No qmake path set"); if (!d->m_qmakeIsExecutable) return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable"); @@ -821,7 +821,7 @@ QStringList BaseQtVersion::warningReason() const return ret; } -FilePath BaseQtVersion::qmakeCommand() const +FilePath BaseQtVersion::qmakeFilePath() const { return d->m_qmakeCommand; } @@ -1005,41 +1005,41 @@ FilePath BaseQtVersion::qtPackageSourcePath() const return d->m_data.qtSources; } -FilePath BaseQtVersion::designerCommand() const +FilePath BaseQtVersion::designerFilePath() const { if (!isValid()) return {}; - if (d->m_designerCommand.isEmpty()) - d->m_designerCommand = d->findHostBinary(Designer); - return d->m_designerCommand; + if (d->m_designerPath.isEmpty()) + d->m_designerPath = d->findHostBinary(Designer); + return d->m_designerPath; } -FilePath BaseQtVersion::linguistCommand() const +FilePath BaseQtVersion::linguistFilePath() const { if (!isValid()) return {}; - if (d->m_linguistCommand.isEmpty()) - d->m_linguistCommand = d->findHostBinary(Linguist); - return d->m_linguistCommand; + if (d->m_linguistPath.isEmpty()) + d->m_linguistPath = d->findHostBinary(Linguist); + return d->m_linguistPath; } -FilePath BaseQtVersion::qscxmlcCommand() const +FilePath BaseQtVersion::qscxmlcFilePath() const { if (!isValid()) return {}; - if (d->m_qscxmlcCommand.isEmpty()) - d->m_qscxmlcCommand = d->findHostBinary(QScxmlc); - return d->m_qscxmlcCommand; + if (d->m_qscxmlcPath.isEmpty()) + d->m_qscxmlcPath = d->findHostBinary(QScxmlc); + return d->m_qscxmlcPath; } -FilePath BaseQtVersion::qmlsceneCommand() const +FilePath BaseQtVersion::qmlRuntimeFilePath() const { if (!isValid()) return {}; - if (!d->m_qmlsceneCommand.isEmpty()) - return d->m_qmlsceneCommand; + if (!d->m_qmlRuntimePath.isEmpty()) + return d->m_qmlRuntimePath; FilePath path = binPath(); if (qtVersion() >= QtVersionNumber(6, 2, 0)) @@ -1047,23 +1047,23 @@ FilePath BaseQtVersion::qmlsceneCommand() const else path = path / HostOsInfo::withExecutableSuffix("qmlscene"); - d->m_qmlsceneCommand = path.isExecutableFile() ? path : FilePath(); + d->m_qmlRuntimePath = path.isExecutableFile() ? path : FilePath(); - return d->m_qmlsceneCommand; + return d->m_qmlRuntimePath; } -FilePath BaseQtVersion::qmlplugindumpCommand() const +FilePath BaseQtVersion::qmlplugindumpFilePath() const { if (!isValid()) return {}; - if (!d->m_qmlplugindumpCommand.isEmpty()) - return d->m_qmlplugindumpCommand; + if (!d->m_qmlplugindumpPath.isEmpty()) + return d->m_qmlplugindumpPath; const FilePath path = binPath() / HostOsInfo::withExecutableSuffix("qmlplugindump"); - d->m_qmlplugindumpCommand = path.isExecutableFile() ? path : FilePath(); + d->m_qmlplugindumpPath = path.isExecutableFile() ? path : FilePath(); - return d->m_qmlplugindumpCommand; + return d->m_qmlplugindumpPath; } FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const @@ -1138,24 +1138,24 @@ FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const return {}; } -FilePath BaseQtVersion::rccCommand() const +FilePath BaseQtVersion::rccFilePath() const { if (!isValid()) return {}; - if (!d->m_rccCommand.isEmpty()) - return d->m_rccCommand; - d->m_rccCommand = d->findHostBinary(Rcc); - return d->m_rccCommand; + if (!d->m_rccPath.isEmpty()) + return d->m_rccPath; + d->m_rccPath = d->findHostBinary(Rcc); + return d->m_rccPath; } -FilePath BaseQtVersion::uicCommand() const +FilePath BaseQtVersion::uicFilePath() const { if (!isValid()) return {}; - if (!d->m_uicCommand.isEmpty()) - return d->m_uicCommand; - d->m_uicCommand = d->findHostBinary(Uic); - return d->m_uicCommand; + if (!d->m_uicPath.isEmpty()) + return d->m_uicPath; + d->m_uicPath = d->findHostBinary(Uic); + return d->m_uicPath; } void BaseQtVersionPrivate::updateMkspec() @@ -1756,7 +1756,7 @@ Tasks BaseQtVersion::reportIssuesImpl(const QString &proFile, const QString &bui results.append(BuildSystemTask(Task::Error, msg)); } - FilePath qmake = qmakeCommand(); + FilePath qmake = qmakeFilePath(); if (!qmake.isExecutableFile()) { //: %1: Path to qmake executable const QString msg = QCoreApplication::translate("QmakeProjectManager::QtVersion", diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 7c333b63fad..b722b2fcb86 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -132,14 +132,14 @@ public: bool isInQtSourceDirectory(const Utils::FilePath &filePath) const; bool isQtSubProject(const Utils::FilePath &filePath) const; - Utils::FilePath rccCommand() const; + Utils::FilePath rccFilePath() const; // used by UiCodeModelSupport - Utils::FilePath uicCommand() const; - Utils::FilePath designerCommand() const; - Utils::FilePath linguistCommand() const; - Utils::FilePath qscxmlcCommand() const; - Utils::FilePath qmlsceneCommand() const; - Utils::FilePath qmlplugindumpCommand() const; + Utils::FilePath uicFilePath() const; + Utils::FilePath designerFilePath() const; + Utils::FilePath linguistFilePath() const; + Utils::FilePath qscxmlcFilePath() const; + Utils::FilePath qmlRuntimeFilePath() const; + Utils::FilePath qmlplugindumpFilePath() const; QString qtVersionString() const; QtVersionNumber qtVersion() const; @@ -151,7 +151,7 @@ public: bool hasDemos() const; // former local functions - Utils::FilePath qmakeCommand() const; + Utils::FilePath qmakeFilePath() const; /// @returns the name of the mkspec QString mkspec() const; diff --git a/src/plugins/qtsupport/qscxmlcgenerator.cpp b/src/plugins/qtsupport/qscxmlcgenerator.cpp index 98be1fd99e8..2705250b8e9 100644 --- a/src/plugins/qtsupport/qscxmlcgenerator.cpp +++ b/src/plugins/qtsupport/qscxmlcgenerator.cpp @@ -84,7 +84,7 @@ Utils::FilePath QScxmlcGenerator::command() const if (!version) return Utils::FilePath(); - return version->qscxmlcCommand(); + return version->qscxmlcFilePath(); } QStringList QScxmlcGenerator::arguments() const diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp index 9cd3b949468..b66efe72bfd 100644 --- a/src/plugins/qtsupport/qtkitinformation.cpp +++ b/src/plugins/qtsupport/qtkitinformation.cpp @@ -320,7 +320,7 @@ void QtKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"), [kit]() -> QString { BaseQtVersion *version = qtVersion(kit); - return version ? version->qmakeCommand().path() : QString(); + return version ? version->qmakeFilePath().path() : QString(); }); } diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index f6d03ff19c6..ebc9a441746 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -112,7 +112,7 @@ public: if (column == 0) return m_version->displayName(); if (column == 1) - return m_version->qmakeCommand().toUserOutput(); + return m_version->qmakeFilePath().toUserOutput(); } if (role == Qt::FontRole && m_changed) { @@ -128,7 +128,7 @@ public: const QString row = "%1:%2"; return QString("" + row.arg(tr("Qt Version"), m_version->qtVersionString()) - + row.arg(tr("Location of qmake"), m_version->qmakeCommand().toUserOutput()) + + row.arg(tr("Location of qmake"), m_version->qmakeFilePath().toUserOutput()) + "
"); } @@ -619,7 +619,7 @@ void QtOptionsPageWidget::addQtDir() auto checkAlreadyExists = [qtVersion](TreeItem *parent) { for (int i = 0; i < parent->childCount(); ++i) { auto item = static_cast(parent->childAt(i)); - if (item->version()->qmakeCommand() == qtVersion) { + if (item->version()->qmakeFilePath() == qtVersion) { return std::make_pair(true, item->version()->displayName()); } } @@ -672,7 +672,7 @@ void QtOptionsPageWidget::removeQtDir() void QtOptionsPageWidget::editPath() { BaseQtVersion *current = currentVersion(); - QString dir = currentVersion()->qmakeCommand().toFileInfo().absolutePath(); + QString dir = currentVersion()->qmakeFilePath().toFileInfo().absolutePath(); FilePath qtVersion = FilePath::fromString( QFileDialog::getOpenFileName(this, tr("Select a qmake Executable"), @@ -770,7 +770,7 @@ void QtOptionsPageWidget::updateWidgets() BaseQtVersion *version = currentVersion(); if (version) { m_versionUi.nameEdit->setText(version->unexpandedDisplayName()); - m_versionUi.qmakePath->setText(version->qmakeCommand().toUserOutput()); + m_versionUi.qmakePath->setText(version->qmakeFilePath().toUserOutput()); m_configurationWidget = version->createConfigurationWidget(); if (m_configurationWidget) { m_versionUi.formLayout->addRow(m_configurationWidget); diff --git a/src/plugins/qtsupport/qtprojectimporter.cpp b/src/plugins/qtsupport/qtprojectimporter.cpp index 4ee36992938..2ed2a6ac6bb 100644 --- a/src/plugins/qtsupport/qtprojectimporter.cpp +++ b/src/plugins/qtsupport/qtprojectimporter.cpp @@ -55,7 +55,7 @@ QtProjectImporter::QtVersionData QtProjectImporter::findOrCreateQtVersion(const Utils::FilePath &qmakePath) const { QtVersionData result; - result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeCommand, qmakePath)); + result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeFilePath, qmakePath)); if (result.qt) { // Check if version is a temporary qt const int qtId = result.qt->uniqueId(); diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp index f7fc7b94d55..7996bebf8bb 100644 --- a/src/plugins/qtsupport/qtversionmanager.cpp +++ b/src/plugins/qtsupport/qtversionmanager.cpp @@ -265,7 +265,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log) << "======= Existing Qt versions ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:"<uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:"<uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -341,7 +341,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log) << "======= Before removing outdated sdk versions ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:"<uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:"<uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -360,7 +360,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log)<< "======= End result ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:" << version->uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:" << version->uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -443,7 +443,7 @@ static void findSystemQt() continue; const auto isSameQmake = [qmakePath](const BaseQtVersion *version) { return Environment::systemEnvironment(). - isSameExecutable(qmakePath.toString(), version->qmakeCommand().toString()); + isSameExecutable(qmakePath.toString(), version->qmakeFilePath().toString()); }; if (contains(m_versions, isSameQmake)) continue; diff --git a/src/plugins/qtsupport/qtversions.cpp b/src/plugins/qtsupport/qtversions.cpp index 9e62bbfc485..98e028125e2 100644 --- a/src/plugins/qtsupport/qtversions.cpp +++ b/src/plugins/qtsupport/qtversions.cpp @@ -62,7 +62,7 @@ QStringList DesktopQtVersion::warningReason() const { QStringList ret = BaseQtVersion::warningReason(); if (qtVersion() >= QtVersionNumber(5, 0, 0)) { - if (qmlsceneCommand().isEmpty()) + if (qmlRuntimeFilePath().isEmpty()) ret << QCoreApplication::translate("QtVersion", "No QML utility installed."); } return ret; diff --git a/src/plugins/qtsupport/uicgenerator.cpp b/src/plugins/qtsupport/uicgenerator.cpp index 454dcad35fb..d7a9c90ef57 100644 --- a/src/plugins/qtsupport/uicgenerator.cpp +++ b/src/plugins/qtsupport/uicgenerator.cpp @@ -62,7 +62,7 @@ Utils::FilePath UicGenerator::command() const if (!version) return Utils::FilePath(); - return version->uicCommand(); + return version->uicFilePath(); } QStringList UicGenerator::arguments() const