diff options
author | hjk <hjk@qt.io> | 2023-03-14 18:18:39 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-03-15 12:34:58 +0000 |
commit | 0dc61f55c3919765ae0fd453de2719daeb4f0718 (patch) | |
tree | 79d183e86d69def224de407b1c0c431a94432e8c /src/plugins/debugger/qml/qmlengineutils.cpp | |
parent | 47ed25e95dd1e7a5c0ac937785e7127dd7592cd0 (diff) | |
download | qt-creator-0dc61f55c3919765ae0fd453de2719daeb4f0718.tar.gz |
Debugger: Use more FilePath in source file handling
Needed for the double-remote case.
With this we have proper breakpoint markers in the text editor for a remotely
running gdb on a remotely loaded project.
Change-Id: If80e4a4108a4a0bcdd7612a59e2bd695213f5ea5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengineutils.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlengineutils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/debugger/qml/qmlengineutils.cpp b/src/plugins/debugger/qml/qmlengineutils.cpp index 7e304d3c92..80e0ac98f1 100644 --- a/src/plugins/debugger/qml/qmlengineutils.cpp +++ b/src/plugins/debugger/qml/qmlengineutils.cpp @@ -20,6 +20,7 @@ using namespace QmlDebug; using namespace QmlJS; using namespace QmlJS::AST; using namespace TextEditor; +using namespace Utils; namespace Debugger::Internal { @@ -218,11 +219,10 @@ void clearExceptionSelection() } } -QStringList highlightExceptionCode(int lineNumber, const QString &filePath, const QString &errorMessage) +QStringList highlightExceptionCode(int lineNumber, const FilePath &filePath, const QString &errorMessage) { QStringList messages; - const QList<IEditor *> editors = DocumentModel::editorsForFilePath( - Utils::FilePath::fromString(filePath)); + const QList<IEditor *> editors = DocumentModel::editorsForFilePath(filePath); const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::fontSettings(); QTextCharFormat errorFormat = fontSettings.toTextCharFormat(TextEditor::C_ERROR); @@ -251,7 +251,7 @@ QStringList highlightExceptionCode(int lineNumber, const QString &filePath, cons selections.append(sel); ed->setExtraSelections(TextEditorWidget::DebuggerExceptionSelection, selections); - messages.append(QString::fromLatin1("%1: %2: %3").arg(filePath).arg(lineNumber).arg(errorMessage)); + messages.append(QString::fromLatin1("%1: %2: %3").arg(filePath.toUserOutput()).arg(lineNumber).arg(errorMessage)); } return messages; } |