Fix cloning DesktopQmakeRunConfiguration

The value of a terminal aspect is not exported in toMap() unless it was
set by the user, so we need help from the project manager to get the
default value. The QbsRunConfiguration already works this way.
Maybe the terminal aspect could export all of its information and we
could drop the fromMap() override from both run configs, but that should
be a different patch.

Fixes: QTCREATORBUG-21918
Change-Id: I712158f4bcb4dbd3827568dd4e1fe8b21d802f47
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Kandeler
2019-02-08 13:35:55 +01:00
parent 1f804e7fc7
commit 037ab39cb8
2 changed files with 9 additions and 0 deletions

View File

@@ -105,6 +105,14 @@ void DesktopQmakeRunConfiguration::updateTargetInformation()
aspect<ExecutableAspect>()->setExecutable(bti.targetFilePath);
}
bool DesktopQmakeRunConfiguration::fromMap(const QVariantMap &map)
{
if (!RunConfiguration::fromMap(map))
return false;
updateTargetInformation();
return true;
}
void DesktopQmakeRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
{
updateTargetInformation();

View File

@@ -43,6 +43,7 @@ public:
private:
void updateTargetInformation();
bool fromMap(const QVariantMap &map) final;
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &info) final;
QString defaultDisplayName();