Mercurial > hg > svgui
comparison widgets/SubdividingMenu.cpp @ 1374:631897ba9fca zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 06 Nov 2018 08:59:03 +0000 |
parents | 53fe33b00770 |
children |
comparison
equal
deleted
inserted
replaced
1360:e848ea0850fe | 1374:631897ba9fca |
---|---|
83 | 83 |
84 auto comparator = [](QString s1, QString s2) -> bool { | 84 auto comparator = [](QString s1, QString s2) -> bool { |
85 return QString::localeAwareCompare(s1, s2) < 0; | 85 return QString::localeAwareCompare(s1, s2) < 0; |
86 }; | 86 }; |
87 | 87 |
88 set<QString, typeof(comparator)> sortedEntries(comparator); | 88 set<QString, decltype(comparator)> sortedEntries(comparator); |
89 sortedEntries.insert(entries.begin(), entries.end()); | 89 sortedEntries.insert(entries.begin(), entries.end()); |
90 | 90 |
91 for (auto j = sortedEntries.begin(); j != sortedEntries.end(); ++j) { | 91 for (auto j = sortedEntries.begin(); j != sortedEntries.end(); ++j) { |
92 | 92 |
93 #ifdef DEBUG_SUBDIVIDING_MENU | 93 #ifdef DEBUG_SUBDIVIDING_MENU |
178 // again, for the set passed to it, but we need the same sorting | 178 // again, for the set passed to it, but we need the same sorting |
179 // for the subsequent loop in this function as well) | 179 // for the subsequent loop in this function as well) |
180 auto comparator = [](QString s1, QString s2) -> bool { | 180 auto comparator = [](QString s1, QString s2) -> bool { |
181 return QString::localeAwareCompare(s1, s2) < 0; | 181 return QString::localeAwareCompare(s1, s2) < 0; |
182 }; | 182 }; |
183 set<QString, typeof(comparator)> sortedEntries(comparator); | 183 set<QString, decltype(comparator)> sortedEntries(comparator); |
184 for (auto i: m_pendingEntries) { | 184 for (auto i: m_pendingEntries) { |
185 sortedEntries.insert(i.first); | 185 sortedEntries.insert(i.first); |
186 } | 186 } |
187 | 187 |
188 for (QString entry: sortedEntries) { | 188 for (QString entry: sortedEntries) { |