Debugger: use FilePath in stack frames

Change-Id: I98b6aa60e1b72be3482916446b87cee89e6cf2a4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-10-26 10:48:43 +02:00
parent 67607e4bc6
commit bc55c7cc70
12 changed files with 55 additions and 50 deletions

View File

@@ -2036,8 +2036,9 @@ StackFrame QmlEnginePrivate::extractStackFrame(const QVariant &bodyVal)
stackFrame.function = extractString(body.value("func"));
if (stackFrame.function.isEmpty())
stackFrame.function = QCoreApplication::translate("QmlEngine", "Anonymous Function");
stackFrame.file = engine->toFileInProject(extractString(body.value("script")));
stackFrame.usable = QFileInfo(stackFrame.file).isReadable();
stackFrame.file = FilePath::fromString(
engine->toFileInProject(extractString(body.value("script"))));
stackFrame.usable = stackFrame.file.isReadableFile();
stackFrame.receiver = extractString(body.value("receiver"));
stackFrame.line = body.value("line").toInt() + 1;