forked from qt-creator/qt-creator
ProjectExplorer: Ask for the name of the clone runconfiguration
Task-number: QTCREATORBUG-12447 Change-Id: Ib5c16d357c86cda4ceace0191727909dd032bf6c Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -332,11 +332,16 @@ void RunSettingsWidget::cloneRunConfiguration()
|
|||||||
if (!factory)
|
if (!factory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//: Title of a the cloned RunConfiguration window, text of the window
|
||||||
|
QString name = uniqueRCName(QInputDialog::getText(this, tr("Clone Configuration"), tr("New configuration name:")));
|
||||||
|
if (name.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
RunConfiguration *newRc = factory->clone(m_target, activeRunConfiguration);
|
RunConfiguration *newRc = factory->clone(m_target, activeRunConfiguration);
|
||||||
if (!newRc)
|
if (!newRc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
newRc->setDisplayName(activeRunConfiguration->displayName());
|
newRc->setDisplayName(name);
|
||||||
m_target->addRunConfiguration(newRc);
|
m_target->addRunConfiguration(newRc);
|
||||||
m_target->setActiveRunConfiguration(newRc);
|
m_target->setActiveRunConfiguration(newRc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user