forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user