Commit 53702d5d authored by Christian Kandeler's avatar Christian Kandeler Committed by Tobias Hunger
Browse files

Device Support: Fix device restoring.



The S60Manager instantiated the device manager, which then tried
to restore the devices with not all factories being present, resulting
in most saved devices being lost.
That instantiation is now moved to a point in time when all plugins
have been initialized.

Change-Id: I15145bddde89dd6109e092a7b8e03bb92934a29a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent e59d06ba
......@@ -130,9 +130,6 @@ S60Manager::S60Manager(QObject *parent) : QObject(parent)
addAutoReleasedObject(new Internal::SymbianIDeviceFactory);
ProjectExplorer::IDevice::Ptr dev(new SymbianIDevice);
ProjectExplorer::DeviceManager::instance()->addDevice(dev);
connect(Core::ICore::mainWindow(), SIGNAL(deviceChange()),
SymbianUtils::SymbianDeviceManager::instance(), SLOT(update()));
......@@ -160,6 +157,12 @@ QString S60Manager::platform(const ProjectExplorer::ToolChain *tc)
return target.right(target.lastIndexOf(QLatin1Char('-')));
}
void S60Manager::addDevice()
{
ProjectExplorer::IDevice::Ptr dev(new SymbianIDevice);
ProjectExplorer::DeviceManager::instance()->addDevice(dev);
}
void S60Manager::symbianDeviceRemoved(const SymbianUtils::SymbianDevice &d)
{
handleSymbianDeviceStateChange(d, ProjectExplorer::IDevice::DeviceUnavailable);
......
......@@ -53,6 +53,8 @@ public:
static QString platform(const ProjectExplorer::ToolChain *tc);
void addDevice();
private slots:
void symbianDeviceRemoved(const SymbianUtils::SymbianDevice &d);
void symbianDeviceAdded(const SymbianUtils::SymbianDevice &d);
......
......@@ -293,6 +293,12 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
return true;
}
bool Qt4ProjectManagerPlugin::delayedInitialize()
{
S60Manager::instance()->addDevice();
return true;
}
void Qt4ProjectManagerPlugin::extensionsInitialized()
{
m_qt4ProjectManager->init();
......
......@@ -67,6 +67,7 @@ public:
Qt4ProjectManagerPlugin();
~Qt4ProjectManagerPlugin();
bool initialize(const QStringList &arguments, QString *errorMessage);
bool delayedInitialize();
void extensionsInitialized();
private slots:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment