]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix compilation fail on W11, dish/CompilationFixes 29/head
authordish <dmitrii.shvydkoi@opencascade.com>
Fri, 17 May 2024 10:28:30 +0000 (10:28 +0000)
committerdish <dmitrii.shvydkoi@opencascade.com>
Fri, 17 May 2024 10:28:30 +0000 (10:28 +0000)
src/SUIT/SUIT_FindActionDialog.cxx
src/SUIT/SUIT_ShortcutMgr.h
src/SUIT/SUIT_ShortcutTree.cxx

index 1d07958308e85df44b015ffdec176f5bd2e0593c..3d5c52cbd15b7be84b4088ffb0c4c8a3b77be95f 100644 (file)
@@ -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<SUIT_FoundActionTreeAction*, std::function<bool(SUIT_FoundActionTreeAct
     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);
index 27504d976c4fac35e105baa785eb3e7cb629d5a7..95707d25f51b39ec59a2fbc14c4b3adc26092394 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <QObject>
 #include <QString>
+#include <QKeySequence>
 #include <QStringList>
 #include <QIcon>
 #include <map>
@@ -37,7 +38,6 @@
 
 class QAction;
 class QtxAction;
-class QKeySequence;
 class QJsonObject;
 
 #if defined WIN32
index fd5d66bf2f247148e55981648a3d44b0444e2da1..5e7f321f98aa895369595efb1ddf2c124a8d376e 100644 (file)
@@ -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<SUIT_ShortcutTreeItem*, std::function<bool(SUIT_ShortcutTreeItem*, SUIT
     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)