forked from qt-creator/qt-creator
ProjectExplorer: Make DeviceKitAspect mutable for all non-Desktop kits
Fixes: QTCREATORBUG-30031 Change-Id: I0b2dacb5977b0f8e81afd13a0a4af6354ea81915 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1404,7 +1404,6 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
|
||||
BuildDeviceKitAspect::setDeviceId(k, DeviceManager::defaultDesktopDevice()->id());
|
||||
k->setSticky(QtKitAspect::id(), true);
|
||||
k->setMutable(DeviceKitAspect::id(), true);
|
||||
k->setSticky(DeviceTypeKitAspect::id(), true);
|
||||
|
||||
QString versionStr = QLatin1String("Qt %{Qt:Version}");
|
||||
|
@@ -188,7 +188,6 @@ static void setupKit(Kit *kit, Id pDeviceType, const ToolChainPair& toolChains,
|
||||
&& debuggerId.isValid())
|
||||
DebuggerKitAspect::setDebugger(kit, debuggerId);
|
||||
|
||||
kit->setMutable(DeviceKitAspect::id(), true);
|
||||
kit->setSticky(QtKitAspect::id(), true);
|
||||
kit->setSticky(ToolchainKitAspect::id(), true);
|
||||
kit->setSticky(DeviceTypeKitAspect::id(), true);
|
||||
|
@@ -674,6 +674,8 @@ void Kit::setMutable(Id id, bool b)
|
||||
|
||||
bool Kit::isMutable(Id id) const
|
||||
{
|
||||
if (id == DeviceKitAspect::id())
|
||||
return DeviceTypeKitAspect::deviceTypeId(this) != Constants::DESKTOP_DEVICE_TYPE;
|
||||
return d->m_mutable.contains(id);
|
||||
}
|
||||
|
||||
|
@@ -806,6 +806,8 @@ void KitAspect::addToLayout(Layouting::LayoutItem &parentItem)
|
||||
void KitAspect::addMutableAction(QWidget *child)
|
||||
{
|
||||
QTC_ASSERT(child, return);
|
||||
if (factory()->id() == DeviceKitAspect::id())
|
||||
return;
|
||||
child->addAction(m_mutableAction);
|
||||
child->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
}
|
||||
|
@@ -273,7 +273,6 @@ void QnxConfiguration::createKit(const QnxTarget &target)
|
||||
|
||||
k->setAutoDetected(false);
|
||||
k->setAutoDetectionSource(m_envFile.toString());
|
||||
k->setMutable(DeviceKitAspect::id(), true);
|
||||
|
||||
k->setSticky(ToolchainKitAspect::id(), true);
|
||||
k->setSticky(DeviceTypeKitAspect::id(), true);
|
||||
|
Reference in New Issue
Block a user