From faf7e8f49ac33e1d65d2ec70cf8ccf6a371dce38 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 18 Feb 2020 17:08:36 +0100 Subject: QbsProjectManager: Do not store expanded qbs executable path ... unless it was explicitly set by the user. Otherwise, e.g. the derived Creator-internal path will end up verbatim in the settings, and this value will be wrong when switching the build dir etc. Change-Id: I89818e683f403e28855934e42b56f59892f260cc Reviewed-by: hjk --- src/plugins/qbsprojectmanager/qbssettings.cpp | 9 +++++++-- src/plugins/qbsprojectmanager/qbssettings.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/plugins/qbsprojectmanager') diff --git a/src/plugins/qbsprojectmanager/qbssettings.cpp b/src/plugins/qbsprojectmanager/qbssettings.cpp index 22d5059f4b3..34831b6cbe1 100644 --- a/src/plugins/qbsprojectmanager/qbssettings.cpp +++ b/src/plugins/qbsprojectmanager/qbssettings.cpp @@ -103,6 +103,11 @@ void QbsSettings::setSettingsData(const QbsSettingsData &settings) } } +QbsSettingsData QbsSettings::rawSettingsData() +{ + return instance().m_settings; +} + QbsSettings::QbsSettings() { loadSettings(); @@ -148,8 +153,8 @@ public: void apply() { - QbsSettingsData settings; - if (m_qbsExePathChooser.isValid()) + QbsSettingsData settings = QbsSettings::rawSettingsData(); + if (m_qbsExePathChooser.fileName() != QbsSettings::qbsExecutableFilePath()) settings.qbsExecutableFilePath = m_qbsExePathChooser.fileName(); settings.defaultInstallDirTemplate = m_defaultInstallDirLineEdit.text(); settings.useCreatorSettings = m_settingsDirCheckBox.isChecked(); diff --git a/src/plugins/qbsprojectmanager/qbssettings.h b/src/plugins/qbsprojectmanager/qbssettings.h index f5e2bd343c3..490c9c57433 100644 --- a/src/plugins/qbsprojectmanager/qbssettings.h +++ b/src/plugins/qbsprojectmanager/qbssettings.h @@ -54,6 +54,7 @@ public: static QString qbsSettingsBaseDir(); static void setSettingsData(const QbsSettingsData &settings); + static QbsSettingsData rawSettingsData(); signals: void settingsChanged(); -- cgit v1.2.3 From 65e244b2381fb3945efb838cf85c51aa4cfe2141 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 20 Feb 2020 15:21:27 +0100 Subject: Qbs: Use more sensible build step summaries It makes no sense to use the "equivalent command line" value as the step summary. It's much too long and will never fit into that label. Change-Id: I55f291c370c97481d37e9f9ba9baec48d7215774 Reviewed-by: hjk --- src/plugins/qbsprojectmanager/qbsbuildstep.cpp | 3 +-- src/plugins/qbsprojectmanager/qbscleanstep.cpp | 2 +- src/plugins/qbsprojectmanager/qbsinstallstep.cpp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/plugins/qbsprojectmanager') diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp index dea23b0453f..9827cf672fb 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp @@ -671,6 +671,7 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) : connect(forceProbesCheckBox, &QCheckBox::toggled, this, &QbsBuildStepConfigWidget::changeForceProbes); updateState(); + setSummaryText(tr("Qbs: %1").arg("build")); } void QbsBuildStepConfigWidget::updateState() @@ -716,8 +717,6 @@ void QbsBuildStepConfigWidget::updateState() Constants::QBS_CONFIG_QUICK_COMPILER_KEY); commandLineTextEdit->setPlainText(command); - - setSummaryText(tr("Qbs: %1").arg(command)); } diff --git a/src/plugins/qbsprojectmanager/qbscleanstep.cpp b/src/plugins/qbsprojectmanager/qbscleanstep.cpp index ddecb793dcd..f6753fa411f 100644 --- a/src/plugins/qbsprojectmanager/qbscleanstep.cpp +++ b/src/plugins/qbsprojectmanager/qbscleanstep.cpp @@ -74,7 +74,7 @@ QbsCleanStep::QbsCleanStep(BuildStepList *bsl, Core::Id id) QString command = static_cast(buildConfiguration()) ->equivalentCommandLine(data); effectiveCommandAspect->setValue(command); - return tr("Qbs: %1").arg(command); + return tr("Qbs: %1").arg("clean"); }); } diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp index 1f414749bdd..371cf4c8d63 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp @@ -324,6 +324,7 @@ QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) : this, &QbsInstallStepConfigWidget::updateState); updateState(); + setSummaryText(QbsInstallStep::tr("Qbs: %1").arg("install")); } void QbsInstallStepConfigWidget::updateState() @@ -338,8 +339,6 @@ void QbsInstallStepConfigWidget::updateState() QString command = m_step->buildConfig()->equivalentCommandLine(m_step->stepData()); m_commandLineTextEdit->setPlainText(command); - - setSummaryText(QbsInstallStep::tr("Qbs: %1").arg(command)); } // -------------------------------------------------------------------- -- cgit v1.2.3 From 61932b5d4b16eb2d6c4bf70d8b7138b1c21f0f40 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 18 Feb 2020 15:07:53 +0100 Subject: QbsProjectManager: Use the same build key as in previous versions We changed the build key derivation method in commit 6913947986 under the assumption that it doesn't really matter as long as it's unique. However, this value gets serialized, so the change broke restoring existing qbs run configurations. As we don't want users to lose all their run configs when upgrading to 4.12, we switch back to the old pattern. Change-Id: Ia4a353af08cca33dbc3c60bd9fc0e28f42dcfe20 Reviewed-by: hjk --- src/plugins/qbsprojectmanager/qbsproject.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/qbsprojectmanager') diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index b915107202a..3bbf4501283 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -1069,12 +1069,13 @@ void QbsBuildSystem::updateApplicationTargets() } } BuildTargetInfo bti; - bti.buildKey = productData.value("full-display-name").toString(); + bti.buildKey = productData.value("name").toString() + '.' + + productData.value("multiplex-configuration-id").toString(); bti.targetFilePath = FilePath::fromString(targetFile); bti.projectFilePath = FilePath::fromString(projectFile); bti.isQtcRunnable = isQtcRunnable; // Fixed up below. bti.usesTerminal = usesTerminal; - bti.displayName = bti.buildKey; + bti.displayName = productData.value("full-display-name").toString(); bti.runEnvModifier = [targetFile, productData, this](Utils::Environment &env, bool usingLibraryPaths) { const QString productName = productData.value("full-display-name").toString(); if (session()->projectData().isEmpty()) -- cgit v1.2.3