forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
private:
|
||||
void updateTargetInformation();
|
||||
bool fromMap(const QVariantMap &map) final;
|
||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &info) final;
|
||||
|
||||
QString defaultDisplayName();
|
||||
|
Reference in New Issue
Block a user