From b9e9fd5d4c078a6dffe80bbdd948103d30b56287 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 21 Feb 2013 13:06:41 +0100 Subject: no warning output if exception error is created handling that exception and showing a warning belongs to the higher level of the code. Change-Id: If529cfc5a010fa7043053ca97c33dfb554c519de Reviewed-by: Kai Koehne --- src/libs/installer/errors.h | 2 +- tests/auto/installer/settings/tst_settings.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/installer/errors.h b/src/libs/installer/errors.h index b53b112d1..7f5cc9071 100644 --- a/src/libs/installer/errors.h +++ b/src/libs/installer/errors.h @@ -54,7 +54,7 @@ class Error : public std::runtime_error public: explicit Error(const QString &message) : std::runtime_error(message.toStdString()) - , m_message (message) { qWarning() << "Error-Exception:" << message; } + , m_message (message) { qDebug() << "create Error-Exception:" << message; } virtual ~Error() throw() {} QString message() const { return m_message; } diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp index c1d607074..1cbb16a48 100644 --- a/tests/auto/installer/settings/tst_settings.cpp +++ b/tests/auto/installer/settings/tst_settings.cpp @@ -79,7 +79,7 @@ void tst_Settings::loadFullConfig() void tst_Settings::loadEmptyConfig() { - QTest::ignoreMessage(QtWarningMsg, "Error-Exception: \"Missing or empty tag in " + QTest::ignoreMessage(QtDebugMsg, "Error-Exception: \"Missing or empty tag in " ":/data/empty_config.xml.\" "); try { Settings::fromFileAndPrefix(":/data/empty_config.xml", ":/data"); @@ -92,7 +92,7 @@ void tst_Settings::loadEmptyConfig() void tst_Settings::loadNotExistingConfig() { - QTest::ignoreMessage(QtWarningMsg, "Error-Exception: \"Could not open settings file " + QTest::ignoreMessage(QtDebugMsg, "Error-Exception: \"Could not open settings file " ":/data/inexisting_config.xml for reading: " "Unknown error\" "); try { @@ -108,7 +108,7 @@ void tst_Settings::loadNotExistingConfig() void tst_Settings::loadMalformedConfig() { - QTest::ignoreMessage(QtWarningMsg, "Error-Exception: \"Error in :/data/malformed_config.xml, " + QTest::ignoreMessage(QtDebugMsg, "Error-Exception: \"Error in :/data/malformed_config.xml, " "line 9, column 0: Premature end of document.\" "); try { Settings::fromFileAndPrefix(":/data/malformed_config.xml", ":/data"); @@ -122,7 +122,7 @@ void tst_Settings::loadMalformedConfig() void tst_Settings::loadUnknownElementConfig() { - QTest::ignoreMessage(QtWarningMsg, "Error-Exception: \"Error in :/data/unknown_element_config.xml, line 5, " + QTest::ignoreMessage(QtDebugMsg, "Error-Exception: \"Error in :/data/unknown_element_config.xml, line 5, " "column 13: Unexpected element 'unknown'.\" "); try { Settings::fromFileAndPrefix(":/data/unknown_element_config.xml", ":/data"); -- cgit v1.2.3