Commit 1bff9f82 authored by Tobias Hunger's avatar Tobias Hunger

Devicemanager: Do not ruin device settings when closing optionspage

Change-Id: I3684422f9d41eba3bda8532c58242eca7edef67b
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent c708944a
...@@ -135,6 +135,8 @@ void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, boo ...@@ -135,6 +135,8 @@ void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, boo
void DeviceManager::save() void DeviceManager::save()
{ {
if (d->clonedInstance == this)
return;
QVariantMap data; QVariantMap data;
data.insert(QLatin1String(DeviceManagerKey), toMap()); data.insert(QLatin1String(DeviceManagerKey), toMap());
d->writer->save(data, Core::ICore::mainWindow()); d->writer->save(data, Core::ICore::mainWindow());
...@@ -342,7 +344,8 @@ DeviceManager::DeviceManager(bool isInstance) : d(new DeviceManagerPrivate) ...@@ -342,7 +344,8 @@ DeviceManager::DeviceManager(bool isInstance) : d(new DeviceManagerPrivate)
DeviceManager::~DeviceManager() DeviceManager::~DeviceManager()
{ {
delete d->writer; if (d->clonedInstance != this)
delete d->writer;
delete d; delete d;
} }
......
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