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:
@@ -542,7 +542,7 @@ void QmlEngine::gotoLocation(const Location &location)
|
||||
|
||||
QString titlePattern = tr("JS Source for %1").arg(fileName);
|
||||
//Check if there are open documents with the same title
|
||||
foreach (Core::IDocument *document, Core::EditorManager::documentModel()->openedDocuments()) {
|
||||
foreach (Core::IDocument *document, Core::DocumentModel::openedDocuments()) {
|
||||
if (document->displayName() == titlePattern) {
|
||||
Core::EditorManager::activateEditorForDocument(document);
|
||||
return;
|
||||
@@ -1310,7 +1310,7 @@ void QmlEngine::updateScriptSource(const QString &fileName, int lineOffset, int
|
||||
//update open editors
|
||||
QString titlePattern = tr("JS Source for %1").arg(fileName);
|
||||
//Check if there are open editors with the same title
|
||||
foreach (Core::IDocument *doc, Core::EditorManager::documentModel()->openedDocuments()) {
|
||||
foreach (Core::IDocument *doc, Core::DocumentModel::openedDocuments()) {
|
||||
if (doc->displayName() == titlePattern) {
|
||||
updateDocument(doc, document);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user