summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels Weber <niels.weber@digia.com>2013-02-27 13:32:40 +0100
committerNiels Weber <niels.weber@digia.com>2013-02-27 17:25:00 +0100
commit0eb397ba65a23a09eb3673bd4fbe3e3248ceb00a (patch)
tree2babf8f3d7d6fd86cdb18e961f243245aa80e12e
parent7627f4cb189c1e94c78bc64d5affaa632a0e3fcc (diff)
Fix incorrect error message in binarycreator.
This happened when calling binarycreator with -i and -n at the same time. Also fix a similar error when calling with -f -n. Also improve the error message when using -n together with -i or -e. Task-number: QTIFW-189 Change-Id: I369b218172997d2b46b3209ab13dfc4101767a5c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
-rw-r--r--tools/binarycreator/binarycreator.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp
index 33fd8175a..ac160d57c 100644
--- a/tools/binarycreator/binarycreator.cpp
+++ b/tools/binarycreator/binarycreator.cpp
@@ -621,17 +621,12 @@ int main(int argc, char **argv)
QInstaller::setVerbose(true);
} else if (*it == QLatin1String("-n") || *it == QLatin1String("--online-only")) {
if (!filteredPackages.isEmpty()) {
- return printErrorAndUsageAndExit(QString::fromLatin1("for the --include and --exclude case you also "
- "have to ensure that online-only==false, as that means include nothing"));
+ return printErrorAndUsageAndExit(QString::fromLatin1("Error: 'online-only' option cannot be used "
+ "in conjunction with the 'include' or 'exclude' option. An 'online-only' installer will never "
+ "contain any components apart from the root component."));
}
- filteredPackages.append(QLatin1String("XXXXXXXXXXXXXXXXX_online_XXXXXXXXXXXXXXXXX"));
- ftype = QInstallerTools::Include;
onlineOnly = true;
} else if (*it == QLatin1String("-f") || *it == QLatin1String("--offline-only")) {
- if (onlineOnly) {
- return printErrorAndUsageAndExit(QString::fromLatin1("You cannot use --online-only and "
- "--offline-only at the same time."));
- }
offlineOnly = true;
} else if (*it == QLatin1String("-t") || *it == QLatin1String("--template")) {
++it;
@@ -691,6 +686,16 @@ int main(int argc, char **argv)
}
}
+ if (onlineOnly && offlineOnly) {
+ return printErrorAndUsageAndExit(QString::fromLatin1("You cannot use --online-only and "
+ "--offline-only at the same time."));
+ }
+
+ if (onlineOnly) {
+ filteredPackages.append(QLatin1String("XXXXXXXXXXXXXXXXX_online_XXXXXXXXXXXXXXXXX"));
+ ftype = QInstallerTools::Include;
+ }
+
if (target.isEmpty())
return printErrorAndUsageAndExit(QString::fromLatin1("Error: Target parameter missing."));