Fix usage of EditorManager::editorsForFileName

And move to using the corresponding method in document model.

Change-Id: I80b12ceab8a91c5393b9c0422d660a8896ae09d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Eike Ziller
2013-07-18 12:26:23 +02:00
parent bc88c0b89e
commit 8c2e3fd2cb
11 changed files with 47 additions and 85 deletions

View File

@@ -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;