forked from qt-creator/qt-creator
debugger: don't show the <global> frame in qml stack
This commit is contained in:
@@ -693,6 +693,8 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
|||||||
for (int i = 0; i != stackFrames.size(); ++i)
|
for (int i = 0; i != stackFrames.size(); ++i)
|
||||||
stackFrames[i].level = i + 1;
|
stackFrames[i].level = i + 1;
|
||||||
|
|
||||||
|
if (stackFrames.size() && stackFrames.back().function == "<global>")
|
||||||
|
stackFrames.takeLast();
|
||||||
stackHandler()->setFrames(stackFrames);
|
stackHandler()->setFrames(stackFrames);
|
||||||
|
|
||||||
watchHandler()->beginCycle();
|
watchHandler()->beginCycle();
|
||||||
@@ -735,8 +737,10 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
|||||||
logString += QLatin1String(" ") + error;
|
logString += QLatin1String(" ") + error;
|
||||||
logMessage(LogReceive, logString);
|
logMessage(LogReceive, logString);
|
||||||
|
|
||||||
QString msg =
|
QString msg = stackFrames.isEmpty()
|
||||||
tr("<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>")
|
? tr("<p>An Uncaught Exception occured:</p><p>%2</p>")
|
||||||
|
.arg(Qt::escape(error))
|
||||||
|
: tr("<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>")
|
||||||
.arg(stackFrames.value(0).file, Qt::escape(error));
|
.arg(stackFrames.value(0).file, Qt::escape(error));
|
||||||
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
|
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user