forked from qt-creator/qt-creator
AppMan: Remove automatic B2Qt Device cloning code
Change-Id: I3d2c39be9ae95f016197a388af44055c9c454e3b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -15,61 +15,9 @@
|
|||||||
#include "appmanagercmakepackagestep.h"
|
#include "appmanagercmakepackagestep.h"
|
||||||
#include "appmanagerrunconfiguration.h"
|
#include "appmanagerrunconfiguration.h"
|
||||||
#include "appmanagerruncontrol.h"
|
#include "appmanagerruncontrol.h"
|
||||||
#include "appmanagerutilities.h"
|
|
||||||
|
|
||||||
#include <coreplugin/helpmanager.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/kitmanager.h>
|
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
|
||||||
|
|
||||||
#include <qtsupport/qtkitaspect.h>
|
|
||||||
|
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
|
||||||
|
|
||||||
using namespace Core;
|
|
||||||
using namespace ProjectExplorer;
|
|
||||||
using namespace QtSupport;
|
|
||||||
|
|
||||||
namespace AppManager::Internal {
|
namespace AppManager::Internal {
|
||||||
|
|
||||||
const char QdbLinuxOsType[] = "QdbLinuxOsType";
|
|
||||||
const char QdbLinuxEmulatorOsType[] = "QdbLinuxEmulatorOsType";
|
|
||||||
|
|
||||||
void cloneAutodetectedBoot2QtKits()
|
|
||||||
{
|
|
||||||
if (auto kitManager = KitManager::instance()) {
|
|
||||||
QHash<QtVersion *, Kit *> boot2QtKits;
|
|
||||||
QHash<QtVersion *, Kit *> genericLinuxDeviceKits;
|
|
||||||
for (auto kit : kitManager->kits()) {
|
|
||||||
if (auto qtVersion = QtKitAspect::qtVersion(kit)) {
|
|
||||||
const auto deviceTypeId = DeviceTypeKitAspect::deviceTypeId(kit);
|
|
||||||
if (deviceTypeId == RemoteLinux::Constants::GenericLinuxOsType) {
|
|
||||||
genericLinuxDeviceKits[qtVersion] = kit;
|
|
||||||
} else if (kit->isAutoDetected()) {
|
|
||||||
if (deviceTypeId == QdbLinuxOsType) {
|
|
||||||
boot2QtKits[qtVersion] = kit;
|
|
||||||
} else if (deviceTypeId == QdbLinuxEmulatorOsType) {
|
|
||||||
boot2QtKits[qtVersion] = kit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (auto it = boot2QtKits.cbegin(); it != boot2QtKits.cend(); ++it) {
|
|
||||||
if (!genericLinuxDeviceKits.contains(it.key())) {
|
|
||||||
const auto copyIntoKit = [boot2QtKit = *it](Kit *k) {
|
|
||||||
k->copyFrom(boot2QtKit);
|
|
||||||
k->setAutoDetected(false);
|
|
||||||
k->setUnexpandedDisplayName(QString("%1 for Generic Linux Devices").arg(boot2QtKit->unexpandedDisplayName()));
|
|
||||||
DeviceTypeKitAspect::setDeviceTypeId(k, RemoteLinux::Constants::GenericLinuxOsType);
|
|
||||||
};
|
|
||||||
if (auto genericLinuxDeviceKit = KitManager::instance()->registerKit(copyIntoKit)) {
|
|
||||||
genericLinuxDeviceKit->setup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AppManagerPluginPrivate
|
class AppManagerPluginPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -97,10 +45,6 @@ void AppManagerPlugin::initialize()
|
|||||||
|
|
||||||
d = new AppManagerPluginPrivate;
|
d = new AppManagerPluginPrivate;
|
||||||
d->deployConfigurationAutoSwitcher.initialize();
|
d->deployConfigurationAutoSwitcher.initialize();
|
||||||
|
|
||||||
if (auto kitManager = KitManager::instance()) {
|
|
||||||
connect(kitManager, &KitManager::kitsLoaded, &cloneAutodetectedBoot2QtKits);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // AppManager::Internal
|
} // AppManager::Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user