From 8c72d94520b6a4fddc00555e16a00e5e73e55bef Mon Sep 17 00:00:00 2001 From: dish Date: Fri, 17 May 2024 10:28:30 +0000 Subject: [PATCH] Fix compilation fail on W11, --- src/SUIT/SUIT_FindActionDialog.cxx | 6 +++--- src/SUIT/SUIT_ShortcutMgr.h | 2 +- src/SUIT/SUIT_ShortcutTree.cxx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SUIT/SUIT_FindActionDialog.cxx b/src/SUIT/SUIT_FindActionDialog.cxx index 1d0795830..3d5c52cbd 100644 --- a/src/SUIT/SUIT_FindActionDialog.cxx +++ b/src/SUIT/SUIT_FindActionDialog.cxx @@ -267,7 +267,7 @@ void SUIT_FoundActionTree::sort(SUIT_FoundActionTree::SortKey theKey, SUIT_Found if (theKey == mySortKey && theOrder == mySortOrder) return; - mySortKey == theKey; + mySortKey = theKey; mySortOrder = theOrder; for (int moduleIdx = 0; moduleIdx < topLevelItemCount(); moduleIdx++) { @@ -341,9 +341,9 @@ std::set(mySortKey, mySortOrder)); } - static const QCollator collator; const std::function 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); diff --git a/src/SUIT/SUIT_ShortcutMgr.h b/src/SUIT/SUIT_ShortcutMgr.h index 27504d976..95707d25f 100644 --- a/src/SUIT/SUIT_ShortcutMgr.h +++ b/src/SUIT/SUIT_ShortcutMgr.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,6 @@ class QAction; class QtxAction; -class QKeySequence; class QJsonObject; #if defined WIN32 diff --git a/src/SUIT/SUIT_ShortcutTree.cxx b/src/SUIT/SUIT_ShortcutTree.cxx index fd5d66bf2..5e7f321f9 100644 --- a/src/SUIT/SUIT_ShortcutTree.cxx +++ b/src/SUIT/SUIT_ShortcutTree.cxx @@ -467,7 +467,7 @@ void SUIT_ShortcutTree::sort(SUIT_ShortcutTree::SortKey theKey, SUIT_ShortcutTre if (theKey == mySortKey && theOrder == mySortOrder) return; - mySortKey == theKey; + mySortKey = theKey; mySortOrder = theOrder; for (int moduleIdx = 0; moduleIdx < topLevelItemCount(); moduleIdx++) { @@ -626,9 +626,9 @@ std::set(mySortKey, mySortOrder)); } - static const QCollator collator; const std::function 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) -- 2.39.2