summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-04-27 10:19:51 +0300
committerKatja Marttila <katja.marttila@qt.io>2020-04-27 15:22:39 +0300
commita05dc40daa16819823eeddb50a9fcc4656eb8f3b (patch)
tree0a239d0a4ee207632dd069b861f167a687ab250e
parent6586c4abce30301afa1f3f9ed32ad468447ed03f (diff)
Fix installationlog.txt writing
Fixes also remoterepo deletion from tmp folder Task-number: QTIFW-1664 Task-number: QTIFW-1683 Change-Id: I8485eb63c4ec5a30c04f4177922bb60f2176ce37 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
-rw-r--r--src/sdk/commandlineinterface.cpp5
-rw-r--r--src/sdk/commandlineinterface.h3
-rw-r--r--src/sdk/sdkapp.h40
3 files changed, 27 insertions, 21 deletions
diff --git a/src/sdk/commandlineinterface.cpp b/src/sdk/commandlineinterface.cpp
index f64f41834..1b55b5979 100644
--- a/src/sdk/commandlineinterface.cpp
+++ b/src/sdk/commandlineinterface.cpp
@@ -47,6 +47,11 @@ CommandLineInterface::CommandLineInterface(int &argc, char *argv[])
m_parser.parse(arguments());
}
+CommandLineInterface::~CommandLineInterface()
+{
+ delete m_core;
+}
+
bool CommandLineInterface::initialize()
{
QString errorMessage;
diff --git a/src/sdk/commandlineinterface.h b/src/sdk/commandlineinterface.h
index 7b5053253..9833ad871 100644
--- a/src/sdk/commandlineinterface.h
+++ b/src/sdk/commandlineinterface.h
@@ -38,6 +38,9 @@ class CommandLineInterface : public SDKApp<QCoreApplication>
public:
CommandLineInterface(int &argc, char *argv[]);
+ ~CommandLineInterface();
+
+public:
int checkUpdates();
int listInstalledPackages();
int searchAvailablePackages();
diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h
index 57a141f69..c72ec60bb 100644
--- a/src/sdk/sdkapp.h
+++ b/src/sdk/sdkapp.h
@@ -133,7 +133,6 @@ public:
if (magicMarker != QInstaller::BinaryContent::MagicInstallerMarker)
binary.close();
- QString loggingRules(QLatin1String("ifw.* = false")); // disable all by default
bool isCommandLineInterface = false;
foreach (const QString &option, CommandLineOptions::scCommandLineInterfaceOptions) {
if (m_parser.positionalArguments().contains(option)) {
@@ -141,26 +140,25 @@ public:
break;
}
}
- if (QInstaller::isVerbose()) {
- if (m_parser.isSet(CommandLineOptions::scLoggingRulesLong)) {
- loggingRules = m_parser.value(CommandLineOptions::scLoggingRulesLong)
- .split(QLatin1Char(','), QString::SkipEmptyParts)
- .join(QLatin1Char('\n')); // take rules from command line
- } else if (isCommandLineInterface) {
- loggingRules = QLatin1String("ifw.* = false\n"
- "ifw.installer.* = true\n"
- "ifw.server = true\n"
- "ifw.package.name = true\n"
- "ifw.package.version = true\n"
- "ifw.package.displayname = true\n");
- } else {
- // enable all in verbose mode except detailed package information
- loggingRules = QLatin1String("ifw.* = true\n"
- "ifw.package.* = false\n"
- "ifw.package.name = true\n"
- "ifw.package.version = true\n"
- "ifw.package.displayname = true\n");
- }
+ QString loggingRules;
+ if (m_parser.isSet(CommandLineOptions::scLoggingRulesLong)) {
+ loggingRules = m_parser.value(CommandLineOptions::scLoggingRulesLong)
+ .split(QLatin1Char(','), QString::SkipEmptyParts)
+ .join(QLatin1Char('\n')); // take rules from command line
+ } else if (isCommandLineInterface) {
+ loggingRules = QLatin1String("ifw.* = false\n"
+ "ifw.installer.* = true\n"
+ "ifw.server = true\n"
+ "ifw.package.name = true\n"
+ "ifw.package.version = true\n"
+ "ifw.package.displayname = true\n");
+ } else {
+ // enable all except detailed package information
+ loggingRules = QLatin1String("ifw.* = true\n"
+ "ifw.package.* = false\n"
+ "ifw.package.name = true\n"
+ "ifw.package.version = true\n"
+ "ifw.package.displayname = true\n");
}
QLoggingCategory::setFilterRules(loggingRules);