summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/registerqtvqnxoperation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/registerqtvqnxoperation.cpp')
-rw-r--r--src/libs/installer/registerqtvqnxoperation.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/libs/installer/registerqtvqnxoperation.cpp b/src/libs/installer/registerqtvqnxoperation.cpp
index c7cdb8c4f..1b0a6ab68 100644
--- a/src/libs/installer/registerqtvqnxoperation.cpp
+++ b/src/libs/installer/registerqtvqnxoperation.cpp
@@ -32,7 +32,6 @@
#include "registerqtvqnxoperation.h"
-#include "constants.h"
#include "packagemanagercore.h"
#include "qtcreator_constants.h"
#include "persistentsettings.h"
@@ -104,15 +103,14 @@ bool RegisterQtInCreatorQNXOperation::performOperation()
setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
return false;
}
- const QString &rootInstallPath = core->value(scTargetDir);
- if (rootInstallPath.isEmpty() || !QDir(rootInstallPath).exists()) {
+
+ if (core->value(scQtCreatorInstallerQtVersionFile).isEmpty()) {
setError(UserDefinedError);
- setErrorString(tr("The given TargetDir %1 is not a valid/existing dir.").arg(rootInstallPath));
+ setErrorString(tr("There is no value set for %1 on the installer object.").arg(
+ scQtCreatorInstallerQtVersionFile));
return false;
}
-
- const QString qtVersionsFileName = rootInstallPath
- + QLatin1String(QtVersionSettingsSuffixPath);
+ const QString qtVersionsFileName = core->value(scQtCreatorInstallerQtVersionFile);
int argCounter = 0;
const QString &versionName = args.at(argCounter++);
const QString &path = QDir::toNativeSeparators(args.value(argCounter++));
@@ -185,10 +183,7 @@ bool RegisterQtInCreatorQNXOperation::undoOperation()
setErrorString(tr("Needed installer object in \"%1\" operation is empty.").arg(name()));
return false;
}
- const QString &rootInstallPath = core->value(scTargetDir);
-
- const QString qtVersionsFileName = rootInstallPath
- + QLatin1String(QtVersionSettingsSuffixPath);
+ const QString qtVersionsFileName = core->value(scQtCreatorInstallerQtVersionFile);
ProjectExplorer::PersistentSettingsReader reader;
// If no file, then it has been removed already