diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-08-09 16:32:07 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-08-09 13:52:47 +0000 |
commit | b17b2461dd7f1e8eef94d510a1a77db26fad5728 (patch) | |
tree | 722a50a0f129d349bad92a3eb2a6c66d40cfb5b1 /src/plugins/welcome | |
parent | 670e54345c6ede1b5edac7a5351736c1c98e0f6c (diff) |
Simplify Utils::sort calls that sort by member
Change-Id: I0937e98014f223f42fbf1c6b2bd94fb109bc8870
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index f77b632374..c8845270a4 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -348,9 +348,7 @@ void WelcomeMode::welcomePluginAdded(QObject *obj) void WelcomeMode::addPages(const QList<IWelcomePage *> &pages) { QList<IWelcomePage *> addedPages = pages; - Utils::sort(addedPages, [](const IWelcomePage *l, const IWelcomePage *r) { - return l->priority() < r->priority(); - }); + Utils::sort(addedPages, &IWelcomePage::priority); // insert into m_pluginList, keeping m_pluginList sorted by priority QQmlEngine *engine = m_welcomePage->engine(); auto addIt = addedPages.begin(); |