From 6a03d300be399a09de6cc02a6e3731b51ed5c6da Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 23 Apr 2019 15:20:15 +0200 Subject: qml runtime tool: --quiet disables categorized logging too [ChangeLog][QtQml][qml] The QML Runtime tool --quiet option now disables categorized logging in addition to qDebug, qInfo, qWarning and qFatal, except for some early QPA-level categorized logging that occurs during application construction. You can still override specific categories by setting QT_LOGGING_CONF or QT_LOGGING_RULES. Change-Id: Icf986a7fa9980d07beed308df8f69fcc4da9d771 Reviewed-by: Ulf Hermann --- tools/qml/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index e70dcb7fa7..1d520b8fde 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -304,8 +305,8 @@ void quietMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const Q exit(-1); case QtCriticalMsg: case QtDebugMsg: + case QtInfoMsg: case QtWarningMsg: - default: ; } } @@ -551,8 +552,10 @@ int main(int argc, char *argv[]) printf("qml: Translation file specified, but Qt built without translation support.\n"); #endif - if (quietMode) + if (quietMode) { qInstallMessageHandler(quietMessageHandler); + QLoggingCategory::setFilterRules(QStringLiteral("*=false")); + } if (files.count() <= 0) { #if defined(Q_OS_DARWIN) -- cgit v1.2.3