forked from qt-creator/qt-creator
Unify projectexplorer language IDs
We don't need two IDs for C++ and the QmlJS ID should look the same as as the others. Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -257,8 +257,11 @@ ModelManagerInterface::WorkingCopy ModelManager::workingCopyInternal() const
|
||||
const QString key = document->filePath().toString();
|
||||
if (TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(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))
|
||||
workingCopy.insert(key, textDocument->plainText(), textDocument->document()->revision());
|
||||
if (DocumentModel::editorsForDocument(document).first()
|
||||
->context().contains(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID)) {
|
||||
workingCopy.insert(key, textDocument->plainText(),
|
||||
textDocument->document()->revision());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user