forked from qt-creator/qt-creator
Android: Cosmetics for AndroidDevice interface
Change-Id: I291f51a3baeb3768428485c63914627c0d91037b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1297,7 +1297,7 @@ void AndroidConfigurations::updateAndroidDevice()
|
||||
{
|
||||
DeviceManager * const devMgr = DeviceManager::instance();
|
||||
if (m_instance->m_config.adbToolPath().exists())
|
||||
devMgr->addDevice(IDevice::Ptr(new AndroidDevice));
|
||||
devMgr->addDevice(AndroidDevice::create());
|
||||
else if (devMgr->find(Constants::ANDROID_DEVICE_ID))
|
||||
devMgr->removeDevice(Core::Id(Constants::ANDROID_DEVICE_ID));
|
||||
}
|
||||
|
||||
@@ -60,8 +60,6 @@ AndroidDevice::AndroidDevice()
|
||||
setQmlsceneCommand(activityPath);
|
||||
}
|
||||
|
||||
AndroidDevice::AndroidDevice(const AndroidDevice &other) = default;
|
||||
|
||||
IDevice::DeviceInfo AndroidDevice::deviceInformation() const
|
||||
{
|
||||
return IDevice::DeviceInfo();
|
||||
|
||||
@@ -28,13 +28,16 @@
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
namespace Android {
|
||||
class AndroidConfigurations; // needed for friend declaration
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class AndroidDevice : public ProjectExplorer::IDevice
|
||||
{
|
||||
public:
|
||||
static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); };
|
||||
|
||||
private:
|
||||
AndroidDevice();
|
||||
|
||||
ProjectExplorer::IDevice::DeviceInfo deviceInformation() const override;
|
||||
|
||||
QString displayType() const override;
|
||||
@@ -45,12 +48,6 @@ public:
|
||||
|
||||
ProjectExplorer::IDevice::Ptr clone() const override;
|
||||
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
||||
|
||||
protected:
|
||||
friend class AndroidDeviceFactory;
|
||||
friend class Android::AndroidConfigurations;
|
||||
AndroidDevice();
|
||||
AndroidDevice(const AndroidDevice &other);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -38,7 +38,7 @@ AndroidDeviceFactory::AndroidDeviceFactory()
|
||||
setDisplayName(tr("Android Device"));
|
||||
setCombinedIcon(":/android/images/androiddevicesmall.png",
|
||||
":/android/images/androiddevice.png");
|
||||
setConstructionFunction([] { return ProjectExplorer::IDevice::Ptr(new AndroidDevice); });
|
||||
setConstructionFunction(&AndroidDevice::create);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user