summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/qml/qmlv8debuggerclient.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlv8debuggerclient.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
index dc03a2890b..1d51afb31f 100644
--- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
+++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
@@ -1998,12 +1998,7 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber,
const QString &filePath,
const QString &errorMessage)
{
- DocumentModel *documentModel = EditorManager::documentModel();
- int index = documentModel->indexOfFilePath(filePath);
- if (index < 0 || !documentModel->documents().at(index)->document)
- return;
- QList<IEditor *> editors = documentModel->editorsForDocument(
- documentModel->documents().at(index)->document);
+ QList<IEditor *> editors = EditorManager::documentModel()->editorsForFilePath(filePath);
// set up the format for the errors
QTextCharFormat errorFormat;