summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-10-09 15:07:31 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-11-05 11:18:01 +0200
commita5025ddb30b6ae6423a41ac2323e1b902ae0dd8f (patch)
treeca2c752a962cf535fc150aa6e6b4ddf66738aa19
parentbf1c27905ef7d110c22b4a5592596576d70aa3b6 (diff)
CLI: Tidy up progress message print
The debug print does not look very nice when the string contains escape characters for quotes or extra spaces. Change-Id: I9428d3aef4e3ebd693f66083447430e4e2600098 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--src/libs/installer/progresscoordinator.cpp2
-rw-r--r--tests/auto/installer/cliinterface/tst_cliinterface.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/installer/progresscoordinator.cpp b/src/libs/installer/progresscoordinator.cpp
index 91fa9671e..7af24cb77 100644
--- a/src/libs/installer/progresscoordinator.cpp
+++ b/src/libs/installer/progresscoordinator.cpp
@@ -329,5 +329,5 @@ void ProgressCoordinator::printProgressPercentage(int progress)
void ProgressCoordinator::printProgressMessage(const QString &message)
{
- qCDebug(QInstaller::lcInstallerInstallLog) << message;
+ qCDebug(QInstaller::lcInstallerInstallLog).nospace().noquote() << message;
}
diff --git a/tests/auto/installer/cliinterface/tst_cliinterface.cpp b/tests/auto/installer/cliinterface/tst_cliinterface.cpp
index 9932adb41..08214a906 100644
--- a/tests/auto/installer/cliinterface/tst_cliinterface.cpp
+++ b/tests/auto/installer/cliinterface/tst_cliinterface.cpp
@@ -94,22 +94,22 @@ private slots:
QLoggingCategory::setFilterRules(loggingRules);
- QTest::ignoreMessage(QtDebugMsg, "\"Preparing meta information download...\"");
+ QTest::ignoreMessage(QtDebugMsg, "Preparing meta information download...");
QTest::ignoreMessage(QtDebugMsg, "Cannot install component A. Component is installed only as automatic dependency to autoDep.");
QCOMPARE(PackageManagerCore::Success, core->installSelectedComponentsSilently(QStringList()
<< QLatin1String("A")));
- QTest::ignoreMessage(QtDebugMsg, "\"Preparing meta information download...\"");
+ QTest::ignoreMessage(QtDebugMsg, "Preparing meta information download...");
QTest::ignoreMessage(QtDebugMsg, "Cannot install component AB. Component is not checkable meaning you have to select one of the subcomponents.");
QCOMPARE(PackageManagerCore::Success, core->installSelectedComponentsSilently(QStringList()
<< QLatin1String("AB")));
- QTest::ignoreMessage(QtDebugMsg, "\"Preparing meta information download...\"");
+ QTest::ignoreMessage(QtDebugMsg, "Preparing meta information download...");
QTest::ignoreMessage(QtDebugMsg, "Cannot install B. Component is virtual.");
QCOMPARE(PackageManagerCore::Success, core->installSelectedComponentsSilently(QStringList()
<< QLatin1String("B")));
- QTest::ignoreMessage(QtDebugMsg, "\"Preparing meta information download...\"");
+ QTest::ignoreMessage(QtDebugMsg, "Preparing meta information download...");
QTest::ignoreMessage(QtDebugMsg, "Cannot install MissingComponent. Component not found.");
QCOMPARE(PackageManagerCore::Success, core->installSelectedComponentsSilently(QStringList()
<< QLatin1String("MissingComponent")));