summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/licenseoperation.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2023-04-27 13:34:59 +0300
committerKatja Marttila <katja.marttila@qt.io>2023-04-28 10:02:35 +0300
commite335f3ce3f53e95c0b3989af53b51ed019762016 (patch)
tree1218cbf43ccb64c9208e6fe9ab0c874265522c70 /src/libs/installer/licenseoperation.cpp
parent65cfe8363aaa8f9c261867e26039223c5bafc201 (diff)
Fix license undo operation
Licenses value write was accidently changed from lower case to upper case, which caused that the licenses undo operation did not find a value for the license undo. Fixed the value settings, and also removed the error dialog as there is no point in showing that in undo operation as we are removing the component. Task-number: QTIFW-3013 Change-Id: I402658a05b904454da045ba3fe38c21cf4c3dd4b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/licenseoperation.cpp')
-rw-r--r--src/libs/installer/licenseoperation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/installer/licenseoperation.cpp b/src/libs/installer/licenseoperation.cpp
index 6cf0c8e3e..c87348351 100644
--- a/src/libs/installer/licenseoperation.cpp
+++ b/src/libs/installer/licenseoperation.cpp
@@ -31,6 +31,7 @@
#include "packagemanagercore.h"
#include "settings.h"
#include "fileutils.h"
+#include "globals.h"
#include <QtCore/QDir>
#include <QtCore/QFile>
@@ -56,7 +57,7 @@ void LicenseOperation::backup()
bool LicenseOperation::performOperation()
{
- QVariantMap licenses = value(scLicenses).toMap();
+ QVariantMap licenses = value(scLicensesValue).toMap();
if (licenses.isEmpty()) {
setError(UserDefinedError);
setErrorString(tr("No license files found to copy."));
@@ -96,11 +97,10 @@ bool LicenseOperation::performOperation()
bool LicenseOperation::undoOperation()
{
- const QVariantMap licenses = value(scLicenses).toMap();
+ const QVariantMap licenses = value(scLicensesValue).toMap();
if (licenses.isEmpty()) {
- setError(UserDefinedError);
- setErrorString(tr("No license files found to delete."));
- return false;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "No license files found to delete.";
+ return true;
}
QString targetDir = arguments().value(0);