diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-01-22 15:22:15 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-01-26 12:14:23 +0100 |
commit | 9fa2911fde84d1c3d353bac5a4dd45b9d97c3f6e (patch) | |
tree | 3043116ec6aa95d6de5994d907126a4d5094ca14 /src/libs/installer/settingsoperation.cpp | |
parent | 95be6b2569187b83a3d056451244c06e68b9c3de (diff) |
Fix deadlock in elevated Settings operation
There are cases where using the RemoteFileEngine through QSettings will
dead-lock. Avoid this by using QSettingsWrapper directly, like we
already do in the rest of the code.
Change-Id: I2e00e107c5ab471ddd6cd79fed96417bf4351c1e
Task-number: QTIFW-618
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/settingsoperation.cpp')
-rw-r--r-- | src/libs/installer/settingsoperation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/installer/settingsoperation.cpp b/src/libs/installer/settingsoperation.cpp index 506e5469f..8b12b6269 100644 --- a/src/libs/installer/settingsoperation.cpp +++ b/src/libs/installer/settingsoperation.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Installer Framework. @@ -34,8 +34,8 @@ #include "settingsoperation.h" #include "packagemanagercore.h" #include "kdupdaterupdateoperations.h" +#include "qsettingswrapper.h" -#include <QSettings> #include <QDir> #include <QDebug> @@ -118,7 +118,7 @@ bool SettingsOperation::performOperation() } setValue(QLatin1String("createddir"), mkDirOperation.value(QLatin1String("createddir"))); - QSettings settings(path, QSettings::IniFormat); + QSettingsWrapper settings(path, QSettingsWrapper::IniFormat); if (method == QLatin1String("set")) settings.setValue(key, aValue); else if (method == QLatin1String("remove")) @@ -160,7 +160,7 @@ bool SettingsOperation::undoOperation() bool cleanUp = false; { // kill the scope to kill settings object, else remove file will not work - QSettings settings(path, QSettings::IniFormat); + QSettingsWrapper settings(path, QSettingsWrapper::IniFormat); if (method == QLatin1String("set")) { settings.remove(key); } else if (method == QLatin1String("add_array_value")) { |