forked from qt-creator/qt-creator
Simplify Utils::sort calls that sort by member
Change-Id: I0937e98014f223f42fbf1c6b2bd94fb109bc8870 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
670e54345c
commit
b17b2461dd
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user