DocumentModel: Make interface static

Move item model implementation to private, adjust user code.

Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
hjk
2014-05-07 16:25:04 +02:00
parent 226c1abc89
commit 6e584b5b49
41 changed files with 259 additions and 246 deletions

View File

@@ -1777,7 +1777,7 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber,
const QString &filePath,
const QString &errorMessage)
{
QList<IEditor *> editors = EditorManager::documentModel()->editorsForFilePath(filePath);
QList<IEditor *> editors = DocumentModel::editorsForFilePath(filePath);
// set up the format for the errors
QTextCharFormat errorFormat;
@@ -1816,11 +1816,9 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber,
void QmlV8DebuggerClient::clearExceptionSelection()
{
DocumentModel *documentModel = EditorManager::documentModel();
QList<IEditor *> openedEditors = documentModel->editorsForDocuments(documentModel->openedDocuments());
QList<QTextEdit::ExtraSelection> selections;
foreach (IEditor *editor, openedEditors) {
foreach (IEditor *editor, DocumentModel::editorsForOpenedDocuments()) {
TextEditor::BaseTextEditorWidget *ed = qobject_cast<TextEditor::BaseTextEditorWidget *>(editor->widget());
if (!ed)
continue;