]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Replace qswap with std::swap
authorWillyanto Willyanto <willyanto39@protonmail.com>
Mon, 16 Jan 2023 16:44:25 +0000 (23:44 +0700)
committerWillyanto Willyanto <willyanto39@protonmail.com>
Mon, 16 Jan 2023 16:45:56 +0000 (23:45 +0700)
Fixes obsolete function 'qSwap' called. It is recommended to use 'std::swap'
instead. (CWE-477)

src/dolphintabpage.cpp
src/kitemviews/private/kfileitemmodelsortalgorithm.h

index 52545e3496b47e83f08301ad34cf45d13cadbe92..f6d288e7d1b3de4ba161c6fe170cf92bcb2ddc1e 100644 (file)
@@ -120,7 +120,7 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled, Animated animated, const
 
                     // If the primary view is active, we have to swap the pointers
                     // because the secondary view will be the new primary view.
-                    qSwap(m_primaryViewContainer, m_secondaryViewContainer);
+                    std::swap(m_primaryViewContainer, m_secondaryViewContainer);
                     m_primaryViewActive = false;
                 }
             } else {
@@ -132,7 +132,7 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled, Animated animated, const
 
                     // If the secondary view is active, we have to swap the pointers
                     // because the secondary view will be the new primary view.
-                    qSwap(m_primaryViewContainer, m_secondaryViewContainer);
+                    std::swap(m_primaryViewContainer, m_secondaryViewContainer);
                     m_primaryViewActive = true;
                 }
             }
index 4ee6095ca3a469cc6d5be6afb58443dd97614f6e..4fe6aa66a26915046103fd712687a42c09ab4367 100644 (file)
@@ -100,7 +100,7 @@ static void merge(RandomAccessIterator begin,
 
     if (len1 + len2 == 2) {
         if (lessThan(*(begin + 1), *(begin))) {
-            qSwap(*begin, *(begin + 1));
+            std::swap(*begin, *(begin + 1));
         }
         return;
     }