Commit ddf1de38 authored by Eike Ziller's avatar Eike Ziller
Browse files

DocumentModel: automatically use id from entry's document if that exists

Avoids some manual assignment and is in line with what we do for the
file path and display name.

Change-Id: I4e98af08b44978493987e63962d26f8595c6990b
Reviewed-by: default avatarEike Ziller <>
parent 01d86d8c
......@@ -131,7 +131,7 @@ QString DocumentModel::Entry::displayName() const
Id DocumentModel::Entry::id() const
return m_id;
return document ? document->id() : m_id;
int DocumentModelPrivate::columnCount(const QModelIndex &parent) const
......@@ -161,7 +161,6 @@ void DocumentModel::addEditor(IEditor *editor, bool *isNewDocument)
if (isNew) {
Entry *entry = new Entry;
entry->document = editor->document();
entry->m_id = editor->document()->id();
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