diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-21 17:33:53 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-25 14:42:22 +0000 |
commit | b5717a5315fb40b03f3d0b6b274a563381eb1ec0 (patch) | |
tree | 10b5a2b9984d70701795688211c1e7a793218fb8 /src/plugins/debugger/qml/qmlengineutils.cpp | |
parent | 0b3283281292848fe2bdab376ebc9ef8518ad265 (diff) | |
download | qt-creator-b5717a5315fb40b03f3d0b6b274a563381eb1ec0.tar.gz |
QmlJS: Lazy-load console items to allow for recursion
Using Utils:TreeView automatically gives us the capability for loading
item as they are expanded. This way we can show recursive structure in
the console as well as load data from the debug server on demand.
Also, properly print error messages received from unsuccessful
command evaluations.
Task-number: QTCREATORBUG-14931
Change-Id: I66d440eedd9723b04670169b27db1ee18f3f2891
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengineutils.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlengineutils.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/debugger/qml/qmlengineutils.cpp b/src/plugins/debugger/qml/qmlengineutils.cpp index 08670f46e9..bdd36e24e4 100644 --- a/src/plugins/debugger/qml/qmlengineutils.cpp +++ b/src/plugins/debugger/qml/qmlengineutils.cpp @@ -250,12 +250,9 @@ void appendDebugOutput(QtMsgType type, const QString &message, const QDebugConte return; } - if (auto consoleManager = ConsoleManagerInterface::instance()) { - ConsoleItem *item = new ConsoleItem(consoleManager->rootItem(), itemType, message); - item->file = info.file; - item->line = info.line; - consoleManager->printToConsolePane(item); - } + if (auto consoleManager = ConsoleManagerInterface::instance()) + consoleManager->printToConsolePane(new ConsoleItem(itemType, message, info.file, + info.line)); } void clearExceptionSelection() |