From: dish Date: Fri, 17 May 2024 10:28:30 +0000 (+0000) Subject: Fix compilation fail on W11, X-Git-Tag: V9_13_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fdish%2FCompilationFixes;p=modules%2Fgui.git Fix compilation fail on W11, --- 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)