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

@@ -234,8 +234,7 @@ void FindPrivate::setupFilterMenuItems()
bool haveEnabledFilters = false;
const Id base("FindFilter.");
QList<IFindFilter *> sortedFilters = findInterfaces;
Utils::sort(sortedFilters, [](IFindFilter *a, IFindFilter *b) -> bool
{ return a->displayName() < b->displayName(); });
Utils::sort(sortedFilters, &IFindFilter::displayName);
foreach (IFindFilter *filter, sortedFilters) {
QAction *action = new QAction(QLatin1String(" ") + filter->displayName(), this);
bool isEnabled = filter->isEnabled();