forked from qt-creator/qt-creator
baseqtversion: commands are FilePathes
also renamed the qmlscene* qmlRuntime* Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1095,7 +1095,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
|||||||
if (!version || !version->isValid()) {
|
if (!version || !version->isValid()) {
|
||||||
addWarning(tr("CMake configuration has a path to a qmake binary set, "
|
addWarning(tr("CMake configuration has a path to a qmake binary set, "
|
||||||
"even though the kit has no valid Qt version."));
|
"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 "
|
addWarning(tr("CMake configuration has a path to a qmake binary set "
|
||||||
"that does not match the qmake binary path "
|
"that does not match the qmake binary path "
|
||||||
"configured in the Qt version."));
|
"configured in the Qt version."));
|
||||||
|
@@ -510,7 +510,7 @@ QList<BaseQtVersion *> KitDetectorPrivate::autoDetectQtVersions() const
|
|||||||
continue;
|
continue;
|
||||||
qtVersions.append(qtVersion);
|
qtVersions.append(qtVersion);
|
||||||
QtVersionManager::addVersion(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())
|
if (qtVersions.isEmpty())
|
||||||
emit q->logOutput(tr("No Qt installation found."));
|
emit q->logOutput(tr("No Qt installation found."));
|
||||||
|
@@ -181,7 +181,7 @@ void QbsProfileManager::addProfileFromKit(const ProjectExplorer::Kit *k)
|
|||||||
data = provider->properties(k, data);
|
data = provider->properties(k, data);
|
||||||
}
|
}
|
||||||
if (const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k))
|
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})) {
|
if (QbsSettings::qbsVersion() < QVersionNumber({1, 20})) {
|
||||||
const QString keyPrefix = "profiles." + name + ".";
|
const QString keyPrefix = "profiles." + name + ".";
|
||||||
|
@@ -66,14 +66,14 @@ static inline QString msgAppNotFound(const QString &id)
|
|||||||
static QString linguistBinary(const QtSupport::BaseQtVersion *qtVersion)
|
static QString linguistBinary(const QtSupport::BaseQtVersion *qtVersion)
|
||||||
{
|
{
|
||||||
if (qtVersion)
|
if (qtVersion)
|
||||||
return qtVersion->linguistCommand().toString();
|
return qtVersion->linguistFilePath().toString();
|
||||||
return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist");
|
return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist");
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString designerBinary(const QtSupport::BaseQtVersion *qtVersion)
|
static QString designerBinary(const QtSupport::BaseQtVersion *qtVersion)
|
||||||
{
|
{
|
||||||
if (qtVersion)
|
if (qtVersion)
|
||||||
return qtVersion->designerCommand().toString();
|
return qtVersion->designerFilePath().toString();
|
||||||
return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Designer" : "designer");
|
return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Designer" : "designer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -547,8 +547,8 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
|
|||||||
return MakefileIncompatible;
|
return MakefileIncompatible;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version->qmakeCommand() != parse.qmakePath()) {
|
if (version->qmakeFilePath() != parse.qmakePath()) {
|
||||||
qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeCommand().toString()
|
qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeFilePath().toString()
|
||||||
<< " Makefile:"<< parse.qmakePath().toString();
|
<< " Makefile:"<< parse.qmakePath().toString();
|
||||||
return MakefileForWrongProject;
|
return MakefileForWrongProject;
|
||||||
}
|
}
|
||||||
|
@@ -831,7 +831,7 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi
|
|||||||
m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString();
|
m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString();
|
||||||
|
|
||||||
if (qtVersion && qtVersion->isValid()) {
|
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());
|
qtVersion->applyProperties(m_qmakeGlobals.get());
|
||||||
}
|
}
|
||||||
m_qmakeGlobals->setDirectories(rootProFile()->sourceDir().toString(),
|
m_qmakeGlobals->setDirectories(rootProFile()->sourceDir().toString(),
|
||||||
|
@@ -104,7 +104,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id)
|
|||||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
||||||
if (!qtVersion)
|
if (!qtVersion)
|
||||||
return tr("<b>qmake:</b> No Qt version set. Cannot run qmake.");
|
return tr("<b>qmake:</b> No Qt version set. Cannot run qmake.");
|
||||||
const QString program = qtVersion->qmakeCommand().fileName();
|
const QString program = qtVersion->qmakeFilePath().fileName();
|
||||||
return tr("<b>qmake:</b> %1 %2").arg(program, project()->projectFilePath().fileName());
|
return tr("<b>qmake:</b> %1 %2").arg(program, project()->projectFilePath().fileName());
|
||||||
};
|
};
|
||||||
setSummaryUpdater(updateSummary);
|
setSummaryUpdater(updateSummary);
|
||||||
@@ -215,7 +215,7 @@ bool QMakeStep::init()
|
|||||||
else
|
else
|
||||||
workingDirectory = qmakeBc->buildDirectory();
|
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));
|
m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0));
|
||||||
|
|
||||||
// The Makefile is used by qmake and make on the build device, from that
|
// 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
|
QString QMakeStep::effectiveQMakeCall() const
|
||||||
{
|
{
|
||||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
||||||
QString qmake = qtVersion ? qtVersion->qmakeCommand().toUserOutput() : QString();
|
QString qmake = qtVersion ? qtVersion->qmakeFilePath().toUserOutput() : QString();
|
||||||
if (qmake.isEmpty())
|
if (qmake.isEmpty())
|
||||||
qmake = tr("<no Qt version>");
|
qmake = tr("<no Qt version>");
|
||||||
QString make = makeCommand().toUserOutput();
|
QString make = makeCommand().toUserOutput();
|
||||||
|
@@ -573,7 +573,7 @@ QString PuppetCreator::qmakeCommand() const
|
|||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||||
if (currentQtVersion)
|
if (currentQtVersion)
|
||||||
return currentQtVersion->qmakeCommand().toString();
|
return currentQtVersion->qmakeFilePath().toString();
|
||||||
|
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
@@ -185,7 +185,7 @@ void GenerateResource::generateMenuEntry()
|
|||||||
|
|
||||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||||
currentProject->activeTarget()->kit());
|
currentProject->activeTarget()->kit());
|
||||||
FilePath rccBinary = qtVersion->rccCommand();
|
FilePath rccBinary = qtVersion->rccFilePath();
|
||||||
|
|
||||||
Utils::QtcProcess rccProcess;
|
Utils::QtcProcess rccProcess;
|
||||||
rccProcess.setWorkingDirectory(projectPath);
|
rccProcess.setWorkingDirectory(projectPath);
|
||||||
@@ -362,7 +362,7 @@ void GenerateResource::generateMenuEntry()
|
|||||||
|
|
||||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||||
currentProject->activeTarget()->kit());
|
currentProject->activeTarget()->kit());
|
||||||
FilePath rccBinary = qtVersion->rccCommand();
|
FilePath rccBinary = qtVersion->rccFilePath();
|
||||||
|
|
||||||
QtcProcess rccProcess;
|
QtcProcess rccProcess;
|
||||||
rccProcess.setWorkingDirectory(projectPath);
|
rccProcess.setWorkingDirectory(projectPath);
|
||||||
|
@@ -156,7 +156,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
|
|||||||
projectInfo.qmlDumpPath.clear();
|
projectInfo.qmlDumpPath.clear();
|
||||||
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit);
|
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit);
|
||||||
if (version && projectInfo.tryQmlDump) {
|
if (version && projectInfo.tryQmlDump) {
|
||||||
projectInfo.qmlDumpPath = version->qmlplugindumpCommand().toString();
|
projectInfo.qmlDumpPath = version->qmlplugindumpFilePath().toString();
|
||||||
projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag();
|
projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -373,7 +373,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const
|
|||||||
|
|
||||||
if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
||||||
if (version->type() == QtSupport::Constants::DESKTOPQT) {
|
if (version->type() == QtSupport::Constants::DESKTOPQT) {
|
||||||
if (version->qmlsceneCommand().isEmpty()) {
|
if (version->qmlRuntimeFilePath().isEmpty()) {
|
||||||
result.append(createProjectTask(Task::TaskType::Error,
|
result.append(createProjectTask(Task::TaskType::Error,
|
||||||
tr("Qt version has no QML utility.")));
|
tr("Qt version has no QML utility.")));
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ private:
|
|||||||
bool isEnabled() const final;
|
bool isEnabled() const final;
|
||||||
|
|
||||||
QString mainScript() const;
|
QString mainScript() const;
|
||||||
FilePath qmlScenePath() const;
|
FilePath qmlRuntimeFilePath() const;
|
||||||
QString commandLineArguments() const;
|
QString commandLineArguments() const;
|
||||||
|
|
||||||
StringAspect *m_qmlViewerAspect = nullptr;
|
StringAspect *m_qmlViewerAspect = nullptr;
|
||||||
@@ -97,7 +97,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
|||||||
argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY);
|
argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY);
|
||||||
|
|
||||||
setCommandLineGetter([this] {
|
setCommandLineGetter([this] {
|
||||||
return CommandLine(qmlScenePath(), commandLineArguments(), CommandLine::Raw);
|
return CommandLine(qmlRuntimeFilePath(), commandLineArguments(), CommandLine::Raw);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_qmlMainFileAspect = addAspect<QmlMainFileAspect>(target);
|
m_qmlMainFileAspect = addAspect<QmlMainFileAspect>(target);
|
||||||
@@ -150,7 +150,7 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
|||||||
if (mainScript().isEmpty())
|
if (mainScript().isEmpty())
|
||||||
return tr("No script file to execute.");
|
return tr("No script file to execute.");
|
||||||
|
|
||||||
const FilePath viewer = qmlScenePath();
|
const FilePath viewer = qmlRuntimeFilePath();
|
||||||
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
||||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
|
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
|
||||||
&& !viewer.exists()) {
|
&& !viewer.exists()) {
|
||||||
@@ -161,7 +161,7 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
|||||||
return RunConfiguration::disabledReason();
|
return RunConfiguration::disabledReason();
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath QmlProjectRunConfiguration::qmlScenePath() const
|
FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
|
||||||
{
|
{
|
||||||
const QString qmlViewer = m_qmlViewerAspect->value();
|
const QString qmlViewer = m_qmlViewerAspect->value();
|
||||||
if (!qmlViewer.isEmpty())
|
if (!qmlViewer.isEmpty())
|
||||||
@@ -176,16 +176,16 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const
|
|||||||
if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
||||||
// If not given explicitly by Qt Version, try to pick it from $PATH.
|
// If not given explicitly by Qt Version, try to pick it from $PATH.
|
||||||
const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT;
|
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);
|
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
|
||||||
if (dev.isNull()) // No device set. We don't know where a QML utility is.
|
if (dev.isNull()) // No device set. We don't know where a QML utility is.
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const QString qmlscene = dev->qmlRunCommand();
|
const QString qmlRuntime = dev->qmlRunCommand();
|
||||||
// If not given explicitly by device, try to pick it from $PATH.
|
// 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
|
QString QmlProjectRunConfiguration::commandLineArguments() const
|
||||||
|
@@ -235,13 +235,13 @@ public:
|
|||||||
|
|
||||||
FilePath m_qmakeCommand;
|
FilePath m_qmakeCommand;
|
||||||
|
|
||||||
FilePath m_rccCommand;
|
FilePath m_rccPath;
|
||||||
FilePath m_uicCommand;
|
FilePath m_uicPath;
|
||||||
FilePath m_designerCommand;
|
FilePath m_designerPath;
|
||||||
FilePath m_linguistCommand;
|
FilePath m_linguistPath;
|
||||||
FilePath m_qscxmlcCommand;
|
FilePath m_qscxmlcPath;
|
||||||
FilePath m_qmlsceneCommand;
|
FilePath m_qmlRuntimePath;
|
||||||
FilePath m_qmlplugindumpCommand;
|
FilePath m_qmlplugindumpPath;
|
||||||
|
|
||||||
MacroExpanderWrapper m_expander;
|
MacroExpanderWrapper m_expander;
|
||||||
};
|
};
|
||||||
@@ -346,12 +346,12 @@ BaseQtVersion::~BaseQtVersion()
|
|||||||
QString BaseQtVersion::defaultUnexpandedDisplayName() const
|
QString BaseQtVersion::defaultUnexpandedDisplayName() const
|
||||||
{
|
{
|
||||||
QString location;
|
QString location;
|
||||||
if (qmakeCommand().isEmpty()) {
|
if (qmakeFilePath().isEmpty()) {
|
||||||
location = QCoreApplication::translate("QtVersion", "<unknown>");
|
location = QCoreApplication::translate("QtVersion", "<unknown>");
|
||||||
} else {
|
} else {
|
||||||
// Deduce a description from '/foo/qt-folder/[qtbase]/bin/qmake' -> '/foo/qt-folder'.
|
// Deduce a description from '/foo/qt-folder/[qtbase]/bin/qmake' -> '/foo/qt-folder'.
|
||||||
// '/usr' indicates System Qt 4.X on Linux.
|
// '/usr' indicates System Qt 4.X on Linux.
|
||||||
QDir dir = qmakeCommand().toFileInfo().absoluteDir();
|
QDir dir = qmakeFilePath().toFileInfo().absoluteDir();
|
||||||
do {
|
do {
|
||||||
const QString dirName = dir.dirName();
|
const QString dirName = dir.dirName();
|
||||||
if (dirName == "usr") { // System-installed Qt.
|
if (dirName == "usr") { // System-installed Qt.
|
||||||
@@ -755,7 +755,7 @@ void BaseQtVersion::fromMap(const QVariantMap &map)
|
|||||||
updateDefaultDisplayName();
|
updateDefaultDisplayName();
|
||||||
|
|
||||||
// Clear the cached qmlscene command, it might not match the restored path anymore.
|
// 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
|
QVariantMap BaseQtVersion::toMap() const
|
||||||
@@ -769,7 +769,7 @@ QVariantMap BaseQtVersion::toMap() const
|
|||||||
if (!d->m_overrideFeatures.isEmpty())
|
if (!d->m_overrideFeatures.isEmpty())
|
||||||
result.insert(QTVERSION_OVERRIDE_FEATURES, Utils::Id::toStringList(d->m_overrideFeatures));
|
result.insert(QTVERSION_OVERRIDE_FEATURES, Utils::Id::toStringList(d->m_overrideFeatures));
|
||||||
|
|
||||||
result.insert(QTVERSIONQMAKEPATH, qmakeCommand().toVariant());
|
result.insert(QTVERSIONQMAKEPATH, qmakeFilePath().toVariant());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ bool BaseQtVersion::isValid() const
|
|||||||
d->updateVersionInfo();
|
d->updateVersionInfo();
|
||||||
d->updateMkspec();
|
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;
|
&& !d->m_mkspecFullPath.isEmpty() && d->m_qmakeIsExecutable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -795,7 +795,7 @@ QString BaseQtVersion::invalidReason() const
|
|||||||
{
|
{
|
||||||
if (displayName().isEmpty())
|
if (displayName().isEmpty())
|
||||||
return QCoreApplication::translate("QtVersion", "Qt version has no name");
|
return QCoreApplication::translate("QtVersion", "Qt version has no name");
|
||||||
if (qmakeCommand().isEmpty())
|
if (qmakeFilePath().isEmpty())
|
||||||
return QCoreApplication::translate("QtVersion", "No qmake path set");
|
return QCoreApplication::translate("QtVersion", "No qmake path set");
|
||||||
if (!d->m_qmakeIsExecutable)
|
if (!d->m_qmakeIsExecutable)
|
||||||
return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable");
|
return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable");
|
||||||
@@ -821,7 +821,7 @@ QStringList BaseQtVersion::warningReason() const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::qmakeCommand() const
|
FilePath BaseQtVersion::qmakeFilePath() const
|
||||||
{
|
{
|
||||||
return d->m_qmakeCommand;
|
return d->m_qmakeCommand;
|
||||||
}
|
}
|
||||||
@@ -1005,41 +1005,41 @@ FilePath BaseQtVersion::qtPackageSourcePath() const
|
|||||||
return d->m_data.qtSources;
|
return d->m_data.qtSources;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::designerCommand() const
|
FilePath BaseQtVersion::designerFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
if (d->m_designerCommand.isEmpty())
|
if (d->m_designerPath.isEmpty())
|
||||||
d->m_designerCommand = d->findHostBinary(Designer);
|
d->m_designerPath = d->findHostBinary(Designer);
|
||||||
return d->m_designerCommand;
|
return d->m_designerPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::linguistCommand() const
|
FilePath BaseQtVersion::linguistFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
if (d->m_linguistCommand.isEmpty())
|
if (d->m_linguistPath.isEmpty())
|
||||||
d->m_linguistCommand = d->findHostBinary(Linguist);
|
d->m_linguistPath = d->findHostBinary(Linguist);
|
||||||
return d->m_linguistCommand;
|
return d->m_linguistPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::qscxmlcCommand() const
|
FilePath BaseQtVersion::qscxmlcFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (d->m_qscxmlcCommand.isEmpty())
|
if (d->m_qscxmlcPath.isEmpty())
|
||||||
d->m_qscxmlcCommand = d->findHostBinary(QScxmlc);
|
d->m_qscxmlcPath = d->findHostBinary(QScxmlc);
|
||||||
return d->m_qscxmlcCommand;
|
return d->m_qscxmlcPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::qmlsceneCommand() const
|
FilePath BaseQtVersion::qmlRuntimeFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (!d->m_qmlsceneCommand.isEmpty())
|
if (!d->m_qmlRuntimePath.isEmpty())
|
||||||
return d->m_qmlsceneCommand;
|
return d->m_qmlRuntimePath;
|
||||||
|
|
||||||
FilePath path = binPath();
|
FilePath path = binPath();
|
||||||
if (qtVersion() >= QtVersionNumber(6, 2, 0))
|
if (qtVersion() >= QtVersionNumber(6, 2, 0))
|
||||||
@@ -1047,23 +1047,23 @@ FilePath BaseQtVersion::qmlsceneCommand() const
|
|||||||
else
|
else
|
||||||
path = path / HostOsInfo::withExecutableSuffix("qmlscene");
|
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())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (!d->m_qmlplugindumpCommand.isEmpty())
|
if (!d->m_qmlplugindumpPath.isEmpty())
|
||||||
return d->m_qmlplugindumpCommand;
|
return d->m_qmlplugindumpPath;
|
||||||
|
|
||||||
const FilePath path = binPath() / HostOsInfo::withExecutableSuffix("qmlplugindump");
|
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
|
FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
|
||||||
@@ -1138,24 +1138,24 @@ FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::rccCommand() const
|
FilePath BaseQtVersion::rccFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
if (!d->m_rccCommand.isEmpty())
|
if (!d->m_rccPath.isEmpty())
|
||||||
return d->m_rccCommand;
|
return d->m_rccPath;
|
||||||
d->m_rccCommand = d->findHostBinary(Rcc);
|
d->m_rccPath = d->findHostBinary(Rcc);
|
||||||
return d->m_rccCommand;
|
return d->m_rccPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath BaseQtVersion::uicCommand() const
|
FilePath BaseQtVersion::uicFilePath() const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return {};
|
return {};
|
||||||
if (!d->m_uicCommand.isEmpty())
|
if (!d->m_uicPath.isEmpty())
|
||||||
return d->m_uicCommand;
|
return d->m_uicPath;
|
||||||
d->m_uicCommand = d->findHostBinary(Uic);
|
d->m_uicPath = d->findHostBinary(Uic);
|
||||||
return d->m_uicCommand;
|
return d->m_uicPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseQtVersionPrivate::updateMkspec()
|
void BaseQtVersionPrivate::updateMkspec()
|
||||||
@@ -1756,7 +1756,7 @@ Tasks BaseQtVersion::reportIssuesImpl(const QString &proFile, const QString &bui
|
|||||||
results.append(BuildSystemTask(Task::Error, msg));
|
results.append(BuildSystemTask(Task::Error, msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath qmake = qmakeCommand();
|
FilePath qmake = qmakeFilePath();
|
||||||
if (!qmake.isExecutableFile()) {
|
if (!qmake.isExecutableFile()) {
|
||||||
//: %1: Path to qmake executable
|
//: %1: Path to qmake executable
|
||||||
const QString msg = QCoreApplication::translate("QmakeProjectManager::QtVersion",
|
const QString msg = QCoreApplication::translate("QmakeProjectManager::QtVersion",
|
||||||
|
@@ -132,14 +132,14 @@ public:
|
|||||||
bool isInQtSourceDirectory(const Utils::FilePath &filePath) const;
|
bool isInQtSourceDirectory(const Utils::FilePath &filePath) const;
|
||||||
bool isQtSubProject(const Utils::FilePath &filePath) const;
|
bool isQtSubProject(const Utils::FilePath &filePath) const;
|
||||||
|
|
||||||
Utils::FilePath rccCommand() const;
|
Utils::FilePath rccFilePath() const;
|
||||||
// used by UiCodeModelSupport
|
// used by UiCodeModelSupport
|
||||||
Utils::FilePath uicCommand() const;
|
Utils::FilePath uicFilePath() const;
|
||||||
Utils::FilePath designerCommand() const;
|
Utils::FilePath designerFilePath() const;
|
||||||
Utils::FilePath linguistCommand() const;
|
Utils::FilePath linguistFilePath() const;
|
||||||
Utils::FilePath qscxmlcCommand() const;
|
Utils::FilePath qscxmlcFilePath() const;
|
||||||
Utils::FilePath qmlsceneCommand() const;
|
Utils::FilePath qmlRuntimeFilePath() const;
|
||||||
Utils::FilePath qmlplugindumpCommand() const;
|
Utils::FilePath qmlplugindumpFilePath() const;
|
||||||
|
|
||||||
QString qtVersionString() const;
|
QString qtVersionString() const;
|
||||||
QtVersionNumber qtVersion() const;
|
QtVersionNumber qtVersion() const;
|
||||||
@@ -151,7 +151,7 @@ public:
|
|||||||
bool hasDemos() const;
|
bool hasDemos() const;
|
||||||
|
|
||||||
// former local functions
|
// former local functions
|
||||||
Utils::FilePath qmakeCommand() const;
|
Utils::FilePath qmakeFilePath() const;
|
||||||
|
|
||||||
/// @returns the name of the mkspec
|
/// @returns the name of the mkspec
|
||||||
QString mkspec() const;
|
QString mkspec() const;
|
||||||
|
@@ -84,7 +84,7 @@ Utils::FilePath QScxmlcGenerator::command() const
|
|||||||
if (!version)
|
if (!version)
|
||||||
return Utils::FilePath();
|
return Utils::FilePath();
|
||||||
|
|
||||||
return version->qscxmlcCommand();
|
return version->qscxmlcFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QScxmlcGenerator::arguments() const
|
QStringList QScxmlcGenerator::arguments() const
|
||||||
|
@@ -320,7 +320,7 @@ void QtKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
|
|||||||
expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"),
|
expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"),
|
||||||
[kit]() -> QString {
|
[kit]() -> QString {
|
||||||
BaseQtVersion *version = qtVersion(kit);
|
BaseQtVersion *version = qtVersion(kit);
|
||||||
return version ? version->qmakeCommand().path() : QString();
|
return version ? version->qmakeFilePath().path() : QString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ public:
|
|||||||
if (column == 0)
|
if (column == 0)
|
||||||
return m_version->displayName();
|
return m_version->displayName();
|
||||||
if (column == 1)
|
if (column == 1)
|
||||||
return m_version->qmakeCommand().toUserOutput();
|
return m_version->qmakeFilePath().toUserOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == Qt::FontRole && m_changed) {
|
if (role == Qt::FontRole && m_changed) {
|
||||||
@@ -128,7 +128,7 @@ public:
|
|||||||
const QString row = "<tr><td>%1:</td><td>%2</td></tr>";
|
const QString row = "<tr><td>%1:</td><td>%2</td></tr>";
|
||||||
return QString("<table>"
|
return QString("<table>"
|
||||||
+ row.arg(tr("Qt Version"), m_version->qtVersionString())
|
+ 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())
|
||||||
+ "</table>");
|
+ "</table>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ void QtOptionsPageWidget::addQtDir()
|
|||||||
auto checkAlreadyExists = [qtVersion](TreeItem *parent) {
|
auto checkAlreadyExists = [qtVersion](TreeItem *parent) {
|
||||||
for (int i = 0; i < parent->childCount(); ++i) {
|
for (int i = 0; i < parent->childCount(); ++i) {
|
||||||
auto item = static_cast<QtVersionItem *>(parent->childAt(i));
|
auto item = static_cast<QtVersionItem *>(parent->childAt(i));
|
||||||
if (item->version()->qmakeCommand() == qtVersion) {
|
if (item->version()->qmakeFilePath() == qtVersion) {
|
||||||
return std::make_pair(true, item->version()->displayName());
|
return std::make_pair(true, item->version()->displayName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -672,7 +672,7 @@ void QtOptionsPageWidget::removeQtDir()
|
|||||||
void QtOptionsPageWidget::editPath()
|
void QtOptionsPageWidget::editPath()
|
||||||
{
|
{
|
||||||
BaseQtVersion *current = currentVersion();
|
BaseQtVersion *current = currentVersion();
|
||||||
QString dir = currentVersion()->qmakeCommand().toFileInfo().absolutePath();
|
QString dir = currentVersion()->qmakeFilePath().toFileInfo().absolutePath();
|
||||||
FilePath qtVersion = FilePath::fromString(
|
FilePath qtVersion = FilePath::fromString(
|
||||||
QFileDialog::getOpenFileName(this,
|
QFileDialog::getOpenFileName(this,
|
||||||
tr("Select a qmake Executable"),
|
tr("Select a qmake Executable"),
|
||||||
@@ -770,7 +770,7 @@ void QtOptionsPageWidget::updateWidgets()
|
|||||||
BaseQtVersion *version = currentVersion();
|
BaseQtVersion *version = currentVersion();
|
||||||
if (version) {
|
if (version) {
|
||||||
m_versionUi.nameEdit->setText(version->unexpandedDisplayName());
|
m_versionUi.nameEdit->setText(version->unexpandedDisplayName());
|
||||||
m_versionUi.qmakePath->setText(version->qmakeCommand().toUserOutput());
|
m_versionUi.qmakePath->setText(version->qmakeFilePath().toUserOutput());
|
||||||
m_configurationWidget = version->createConfigurationWidget();
|
m_configurationWidget = version->createConfigurationWidget();
|
||||||
if (m_configurationWidget) {
|
if (m_configurationWidget) {
|
||||||
m_versionUi.formLayout->addRow(m_configurationWidget);
|
m_versionUi.formLayout->addRow(m_configurationWidget);
|
||||||
|
@@ -55,7 +55,7 @@ QtProjectImporter::QtVersionData
|
|||||||
QtProjectImporter::findOrCreateQtVersion(const Utils::FilePath &qmakePath) const
|
QtProjectImporter::findOrCreateQtVersion(const Utils::FilePath &qmakePath) const
|
||||||
{
|
{
|
||||||
QtVersionData result;
|
QtVersionData result;
|
||||||
result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeCommand, qmakePath));
|
result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeFilePath, qmakePath));
|
||||||
if (result.qt) {
|
if (result.qt) {
|
||||||
// Check if version is a temporary qt
|
// Check if version is a temporary qt
|
||||||
const int qtId = result.qt->uniqueId();
|
const int qtId = result.qt->uniqueId();
|
||||||
|
@@ -265,7 +265,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
|||||||
if (log().isDebugEnabled()) {
|
if (log().isDebugEnabled()) {
|
||||||
qCDebug(log) << "======= Existing Qt versions =======";
|
qCDebug(log) << "======= Existing Qt versions =======";
|
||||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
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) << " autodetection source:"<< version->autodetectionSource();
|
||||||
qCDebug(log) << "";
|
qCDebug(log) << "";
|
||||||
}
|
}
|
||||||
@@ -341,7 +341,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
|||||||
if (log().isDebugEnabled()) {
|
if (log().isDebugEnabled()) {
|
||||||
qCDebug(log) << "======= Before removing outdated sdk versions =======";
|
qCDebug(log) << "======= Before removing outdated sdk versions =======";
|
||||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
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) << " autodetection source:"<< version->autodetectionSource();
|
||||||
qCDebug(log) << "";
|
qCDebug(log) << "";
|
||||||
}
|
}
|
||||||
@@ -360,7 +360,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
|||||||
if (log().isDebugEnabled()) {
|
if (log().isDebugEnabled()) {
|
||||||
qCDebug(log)<< "======= End result =======";
|
qCDebug(log)<< "======= End result =======";
|
||||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
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) << " autodetection source:"<< version->autodetectionSource();
|
||||||
qCDebug(log) << "";
|
qCDebug(log) << "";
|
||||||
}
|
}
|
||||||
@@ -443,7 +443,7 @@ static void findSystemQt()
|
|||||||
continue;
|
continue;
|
||||||
const auto isSameQmake = [qmakePath](const BaseQtVersion *version) {
|
const auto isSameQmake = [qmakePath](const BaseQtVersion *version) {
|
||||||
return Environment::systemEnvironment().
|
return Environment::systemEnvironment().
|
||||||
isSameExecutable(qmakePath.toString(), version->qmakeCommand().toString());
|
isSameExecutable(qmakePath.toString(), version->qmakeFilePath().toString());
|
||||||
};
|
};
|
||||||
if (contains(m_versions, isSameQmake))
|
if (contains(m_versions, isSameQmake))
|
||||||
continue;
|
continue;
|
||||||
|
@@ -62,7 +62,7 @@ QStringList DesktopQtVersion::warningReason() const
|
|||||||
{
|
{
|
||||||
QStringList ret = BaseQtVersion::warningReason();
|
QStringList ret = BaseQtVersion::warningReason();
|
||||||
if (qtVersion() >= QtVersionNumber(5, 0, 0)) {
|
if (qtVersion() >= QtVersionNumber(5, 0, 0)) {
|
||||||
if (qmlsceneCommand().isEmpty())
|
if (qmlRuntimeFilePath().isEmpty())
|
||||||
ret << QCoreApplication::translate("QtVersion", "No QML utility installed.");
|
ret << QCoreApplication::translate("QtVersion", "No QML utility installed.");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -62,7 +62,7 @@ Utils::FilePath UicGenerator::command() const
|
|||||||
if (!version)
|
if (!version)
|
||||||
return Utils::FilePath();
|
return Utils::FilePath();
|
||||||
|
|
||||||
return version->uicCommand();
|
return version->uicFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList UicGenerator::arguments() const
|
QStringList UicGenerator::arguments() const
|
||||||
|
Reference in New Issue
Block a user