Commit b932a61d authored by Daniel Teske's avatar Daniel Teske
Browse files

DocumentModel: Simplify code by using Utils::equal



Change-Id: I49032e84e7ff0ec3141fa7beefe385d143adcf03
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent b8aaefd1
......@@ -469,8 +469,7 @@ int DocumentModelPrivate::indexOfDocument(IDocument *document) const
DocumentModel::Entry *DocumentModel::entryForDocument(IDocument *document)
{
return Utils::findOrDefault(d->m_entries,
[&document](Entry *entry) { return entry->document == document; });
return Utils::findOrDefault(d->m_entries, Utils::equal(&Entry::document, document));
}
QList<IDocument *> DocumentModel::openedDocuments()
......
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