summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-01-22 17:01:31 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-02-03 07:16:46 +0000
commit6aa611609955e4dc84d5d4f094f81fc9e93c6661 (patch)
tree9f129f39fdf1df83bd22028e27c456ee9a9720de
parente4ba1c1d81a740778813345cb3dacb4ba33df9db (diff)
Fix EnvironmentVariableOp undo behavior with non-persistent variables
The return value for undoOperation() was incorrect when dealing with non-persistent variable, causing an empty installer error dialog to appear if the current env does not contain exactly same variable value as on installation. The return value inside !isPersistent condition scope should always be true regardless of if the temporary variable set on installation still exists on current environment or contains the same value. Change-Id: If7deaa310d73a371194138fa1e2c382614452e26 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--src/libs/installer/environmentvariablesoperation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp
index 1f3b56d52..0cb4aac27 100644
--- a/src/libs/installer/environmentvariablesoperation.cpp
+++ b/src/libs/installer/environmentvariablesoperation.cpp
@@ -238,7 +238,7 @@ bool EnvironmentVariableOperation::undoOperation()
const bool doUndo = actual == value;
if (doUndo)
Environment::instance().setTemporaryValue(name, oldvalue);
- return doUndo;
+ return true;
}
#ifdef Q_OS_WIN