diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/android/androidconfigurations.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/android/androiddevice.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/android/androiddevice.h | 13 | ||||
| -rw-r--r-- | src/plugins/android/androiddevicefactory.cpp | 2 |
4 files changed, 7 insertions, 12 deletions
diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 47c8fe1f0b..d26ca3c191 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -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)); } diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp index 26058c6e8e..e33c3e3d12 100644 --- a/src/plugins/android/androiddevice.cpp +++ b/src/plugins/android/androiddevice.cpp @@ -60,8 +60,6 @@ AndroidDevice::AndroidDevice() setQmlsceneCommand(activityPath); } -AndroidDevice::AndroidDevice(const AndroidDevice &other) = default; - IDevice::DeviceInfo AndroidDevice::deviceInformation() const { return IDevice::DeviceInfo(); diff --git a/src/plugins/android/androiddevice.h b/src/plugins/android/androiddevice.h index 719f479cf2..22a0e53df1 100644 --- a/src/plugins/android/androiddevice.h +++ b/src/plugins/android/androiddevice.h @@ -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 diff --git a/src/plugins/android/androiddevicefactory.cpp b/src/plugins/android/androiddevicefactory.cpp index 6e6f507679..19a4679491 100644 --- a/src/plugins/android/androiddevicefactory.cpp +++ b/src/plugins/android/androiddevicefactory.cpp @@ -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 |
