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

@@ -249,12 +249,11 @@ void ModelManager::writeMessageInternal(const QString &msg) const
ModelManagerInterface::WorkingCopy ModelManager::workingCopyInternal() const
{
WorkingCopy workingCopy;
DocumentModel *documentModel = EditorManager::documentModel();
foreach (IDocument *document, documentModel->openedDocuments()) {
foreach (IDocument *document, DocumentModel::openedDocuments()) {
const QString key = document->filePath();
if (TextEditor::BaseTextDocument *textDocument = qobject_cast<TextEditor::BaseTextDocument *>(document)) {
// TODO the language should be a property on the document, not the editor
if (documentModel->editorsForDocument(document).first()->context().contains(ProjectExplorer::Constants::LANG_QMLJS))
if (DocumentModel::editorsForDocument(document).first()->context().contains(ProjectExplorer::Constants::LANG_QMLJS))
workingCopy.insert(key, textDocument->plainText(), textDocument->document()->revision());
}
}