]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.cpp
Fix rubber band not going away after right-click
[dolphin.git] / src / kitemviews / kitemlistview.cpp
index 316daa88d13a88d98a38bd57c91bda8251ddb3a1..db258eb3969ef748acfd9cd42e61bb5bab705040 100644 (file)
@@ -670,7 +670,7 @@ void KItemListView::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt
         }
 
         QStyleOptionRubberBand opt;
-        opt.initFrom(widget);
+        initStyleOption(&opt);
         opt.shape = QRubberBand::Rectangle;
         opt.opaque = false;
         opt.rect = rubberBandRect.toRect();
@@ -1041,7 +1041,7 @@ void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges)
         // Update the indexes of all KItemListWidget instances that are located
         // after the inserted items. It is important to adjust the indexes in the order
         // from the highest index to the lowest index to prevent overlaps when setting the new index.
-        qSort(itemsToMove);
+        std::sort(itemsToMove.begin(), itemsToMove.end());
         for (int i = itemsToMove.count() - 1; i >= 0; --i) {
             KItemListWidget* widget = m_visibleItems.value(itemsToMove[i]);
             Q_ASSERT(widget);