forked from qt-creator/qt-creator
Android: Do not instantiate the DeviceManager in initialize().
It is not guaranteed that all device creation factories have been set up at that point, meaning that some devices will not be loaded from the settings. Change-Id: Ibce0e6c125980b1807efca4ce97693f9af7ab79a Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
889f16c345
commit
87529e30e3
@@ -71,14 +71,15 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
|
||||
addAutoReleasedObject(new Internal::AndroidToolChainFactory);
|
||||
addAutoReleasedObject(new Internal::AndroidDeployConfigurationFactory);
|
||||
addAutoReleasedObject(new Internal::AndroidDeviceFactory);
|
||||
ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
|
||||
if (dm->find(Core::Id(Constants::ANDROID_DEVICE_ID)).isNull())
|
||||
dm->addDevice(ProjectExplorer::IDevice::Ptr(new Internal::AndroidDevice));
|
||||
return true;
|
||||
}
|
||||
|
||||
void AndroidPlugin::extensionsInitialized()
|
||||
{ }
|
||||
{
|
||||
ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
|
||||
if (dm->find(Core::Id(Constants::ANDROID_DEVICE_ID)).isNull())
|
||||
dm->addDevice(ProjectExplorer::IDevice::Ptr(new Internal::AndroidDevice));
|
||||
}
|
||||
|
||||
} // namespace Android
|
||||
|
||||
|
Reference in New Issue
Block a user