forked from qt-creator/qt-creator
Update run configuration after device change
The run configuration name defaults to "<executable> (on <device>)". When another device is selected e.g. using the MiniProjectTargetSelector or Kits->Device option, the <device> part in run configuration name is not updated and keeps referring to the initially selected device. Change-Id: Idda828b7f33b754d3b50268d7417c9a2790db30e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -429,10 +429,10 @@ QString RunConfigurationFactory::decoratedTargetName(const QString &targetName,
|
||||
if (IDevice::ConstPtr dev = DeviceKitAspect::device(target->kit())) {
|
||||
if (displayName.isEmpty()) {
|
||||
//: Shown in Run configuration if no executable is given, %1 is device name
|
||||
displayName = RunConfiguration::tr("Run on %1").arg(dev->displayName());
|
||||
displayName = RunConfiguration::tr("Run on %{Device:Name}");
|
||||
} else {
|
||||
//: Shown in Run configuration, Add menu: "name of runnable (on device name)"
|
||||
displayName = RunConfiguration::tr("%1 (on %2)").arg(displayName, dev->displayName());
|
||||
displayName = RunConfiguration::tr("%1 (on %{Device:Name})").arg(displayName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user