From 26296c06badf25e412b2641ea301a02e8bdd531b Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 19 Jan 2011 19:16:34 +0100 Subject: [PATCH] debugger: don't show the frame in qml stack --- src/plugins/debugger/qml/qmlengine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 6243a23d342..f4ba5b48183 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -693,6 +693,8 @@ void QmlEngine::messageReceived(const QByteArray &message) for (int i = 0; i != stackFrames.size(); ++i) stackFrames[i].level = i + 1; + if (stackFrames.size() && stackFrames.back().function == "") + stackFrames.takeLast(); stackHandler()->setFrames(stackFrames); watchHandler()->beginCycle(); @@ -735,8 +737,10 @@ void QmlEngine::messageReceived(const QByteArray &message) logString += QLatin1String(" ") + error; logMessage(LogReceive, logString); - QString msg = - tr("

An Uncaught Exception occured in %1:

%2

") + QString msg = stackFrames.isEmpty() + ? tr("

An Uncaught Exception occured:

%2

") + .arg(Qt::escape(error)) + : tr("

An Uncaught Exception occured in %1:

%2

") .arg(stackFrames.value(0).file, Qt::escape(error)); showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg); } else {