From 89d32d1efdb10b0926dfbe98e929357269596fc1 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 27 Mar 2018 12:17:09 +0200 Subject: [PATCH] QML Debugger: Handle QtInfoMsg messages in console Before those were ignored. Also add a soft assert that will trigger if we forget to add some other category here. Change-Id: Iff3b33ab6c8defe935b681dd80bf185cd95e54f7 Task-number: QTCREATORBUG-20117 Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengineutils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/qml/qmlengineutils.cpp b/src/plugins/debugger/qml/qmlengineutils.cpp index 563a4724506..455a559e314 100644 --- a/src/plugins/debugger/qml/qmlengineutils.cpp +++ b/src/plugins/debugger/qml/qmlengineutils.cpp @@ -210,6 +210,7 @@ void appendDebugOutput(QtMsgType type, const QString &message, const QDebugConte { ConsoleItem::ItemType itemType; switch (type) { + case QtInfoMsg: case QtDebugMsg: itemType = ConsoleItem::DebugType; break; @@ -220,11 +221,10 @@ void appendDebugOutput(QtMsgType type, const QString &message, const QDebugConte case QtFatalMsg: itemType = ConsoleItem::ErrorType; break; - default: - //This case is not possible - return; } + QTC_ASSERT(itemType != ConsoleItem::DefaultType, return); + debuggerConsole()->printItem(new ConsoleItem(itemType, message, info.file, info.line)); }