if (theKey == mySortKey && theOrder == mySortOrder)
return;
- mySortKey == theKey;
+ mySortKey = theKey;
mySortOrder = theOrder;
for (int moduleIdx = 0; moduleIdx < topLevelItemCount(); moduleIdx++) {
sortSchema.push_front(std::pair<SUIT_FoundActionTree::SortKey, SUIT_FoundActionTree::SortOrder>(mySortKey, mySortOrder));
}
- static const QCollator collator;
const std::function<bool(SUIT_FoundActionTreeAction*, SUIT_FoundActionTreeAction*)> comparator =
- [sortSchema, &collator](const SUIT_FoundActionTreeAction* theItemA, const SUIT_FoundActionTreeAction* theItemB) {
+ [sortSchema](const SUIT_FoundActionTreeAction* theItemA, const SUIT_FoundActionTreeAction* theItemB) {
+ const auto collator = QCollator();
for (const auto& keyAndOrder : sortSchema) {
const QVariant fieldOfA = theItemA->getValue(keyAndOrder.first);
const QVariant fieldOfB = theItemB->getValue(keyAndOrder.first);
if (theKey == mySortKey && theOrder == mySortOrder)
return;
- mySortKey == theKey;
+ mySortKey = theKey;
mySortOrder = theOrder;
for (int moduleIdx = 0; moduleIdx < topLevelItemCount(); moduleIdx++) {
sortSchema.push_front(std::pair<SUIT_ShortcutTree::SortKey, SUIT_ShortcutTree::SortOrder>(mySortKey, mySortOrder));
}
- static const QCollator collator;
const std::function<bool(SUIT_ShortcutTreeItem*, SUIT_ShortcutTreeItem*)> comparator =
- [this, sortSchema, &collator](const SUIT_ShortcutTreeItem* theItemA, const SUIT_ShortcutTreeItem* theItemB) {
+ [this, sortSchema](const SUIT_ShortcutTreeItem* theItemA, const SUIT_ShortcutTreeItem* theItemB) {
+ const auto collator = QCollator();
for (const auto& keyAndOrder : sortSchema) {
const int res = collator.compare(theItemA->getValue(keyAndOrder.first), theItemB->getValue(keyAndOrder.first));
if (res != 0)