Simplify Utils::sort calls that sort by member

Change-Id: I0937e98014f223f42fbf1c6b2bd94fb109bc8870
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-09 16:32:07 +03:00
committed by Orgad Shaneh
parent 670e54345c
commit b17b2461dd
7 changed files with 7 additions and 19 deletions

View File

@@ -391,8 +391,7 @@ void PluginView::updatePlugins()
collections.append(new CollectionItem(tr("Utilities"), plugins, this));
}
Utils::sort(collections, [](CollectionItem *a, CollectionItem *b) -> bool
{ return a->m_name < b->m_name; });
Utils::sort(collections, &CollectionItem::m_name);
foreach (CollectionItem *collection, collections)
m_model->rootItem()->appendChild(collection);