diff options
Diffstat (limited to 'installerbuilder/libinstaller/environmentvariablesoperation.cpp')
-rw-r--r-- | installerbuilder/libinstaller/environmentvariablesoperation.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/installerbuilder/libinstaller/environmentvariablesoperation.cpp b/installerbuilder/libinstaller/environmentvariablesoperation.cpp index aa00bc3df..6dff3f860 100644 --- a/installerbuilder/libinstaller/environmentvariablesoperation.cpp +++ b/installerbuilder/libinstaller/environmentvariablesoperation.cpp @@ -112,10 +112,10 @@ UpdateOperation::Error writeSetting(const QString ®Path, template <typename SettingsType> UpdateOperation::Error undoSetting(const QString ®Path, - const QString &name, - const QString &value, - const QString &oldValue, - QString *errorString) + const QString &name, + const QString &value, + const QString &oldValue, + QString *errorString) { QString actual; { @@ -124,13 +124,11 @@ UpdateOperation::Error undoSetting(const QString ®Path, } if (actual != value) //key changed, don't undo return UpdateOperation::UserDefinedError; - else { - QString dontcare; - return writeSetting<SettingsType>(regPath, name, oldValue, errorString, &dontcare); - } + QString dontcare; + return writeSetting<SettingsType>(regPath, name, oldValue, errorString, &dontcare); } -} +} // namespace bool EnvironmentVariableOperation::performOperation() { @@ -231,7 +229,7 @@ bool EnvironmentVariableOperation::testOperation() return true; } -Operation* EnvironmentVariableOperation::clone() const +Operation *EnvironmentVariableOperation::clone() const { return new EnvironmentVariableOperation(); } |