Commit 5c750f86 authored by hjk's avatar hjk Committed by Eike Ziller
Browse files

projectexplorer/editormanager: fix uses of Core::Id



Change-Id: Iba0c42511c43b306a5cecebf15dcb03b0c2cb0e2
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent cc2433f7
......@@ -1009,7 +1009,7 @@ void EditorManager::activateEditorForIndex(Internal::EditorView *view, const QMo
}
QString fileName = index.data(Qt::UserRole + 1).toString();
QString id = index.data(Qt::UserRole + 2).toString();
Core::Id id = index.data(Qt::UserRole + 2).value<Core::Id>();
if (!openEditor(view, fileName, id, flags))
d->m_editorModel->removeEditor(index);
}
......
......@@ -321,7 +321,7 @@ QVariant OpenEditorsModel::data(const QModelIndex &index, int role) const
case Qt::UserRole + 1:
return e.fileName();
case Qt::UserRole + 2:
return QVariant::fromValue(e.editor ? e.editor->id() : e.id());
return QVariant::fromValue(e.editor ? Core::Id(e.editor->id()) : e.id());
default:
return QVariant();
}
......
......@@ -362,7 +362,7 @@ void ProjectTreeWidget::openItem(const QModelIndex &mainIndex)
Node *node = m_model->nodeForIndex(mainIndex);
if (node->nodeType() == FileNodeType) {
Core::EditorManager *editorManager = Core::EditorManager::instance();
editorManager->openEditor(node->path(), QString(), Core::EditorManager::ModeSwitch);
editorManager->openEditor(node->path(), Core::Id(), Core::EditorManager::ModeSwitch);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment