]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix Bug 287829 - inline rename multiple files does not honour
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Mon, 17 Dec 2012 13:02:22 +0000 (14:02 +0100)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Mon, 17 Dec 2012 13:02:22 +0000 (14:02 +0100)
 sort order

BUG: 287829
FIXED-IN: 4.9.5
REVIEW: 107718

src/views/dolphinview.cpp
src/views/renamedialog.cpp

index 0e97c5a2bf40d27421d04e49641e4dc82a9ca1d5..cca5846b6f2a7494248abde2d2c749c94dc5d3f4 100644 (file)
@@ -342,10 +342,12 @@ int DolphinView::itemsCount() const
 KFileItemList DolphinView::selectedItems() const
 {
     const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
 KFileItemList DolphinView::selectedItems() const
 {
     const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
-    const QSet<int> selectedIndexes = selectionManager->selectedItems();
+    QList<int> selectedIndexes = selectionManager->selectedItems().toList();
+
+    qSort(selectedIndexes);
 
     KFileItemList selectedItems;
 
     KFileItemList selectedItems;
-    QSetIterator<int> it(selectedIndexes);
+    QListIterator<int> it(selectedIndexes);
     while (it.hasNext()) {
         const int index = it.next();
         selectedItems.append(m_model->fileItem(index));
     while (it.hasNext()) {
         const int index = it.next();
         selectedItems.append(m_model->fileItem(index));
index a91f91b1b431246ad6e04cfc28c59d6f615bdf82..65125c3aa892069a1de2c92a9d79545fceefefb9 100644 (file)
@@ -162,11 +162,6 @@ void RenameDialog::slotTextChanged(const QString& newName)
 
 void RenameDialog::renameItems()
 {
 
 void RenameDialog::renameItems()
 {
-    // Currently the items are sorted by the selection order, resort
-    // them by the filename. This assures that the new sort order is similar to
-    // the current filename sort order.
-    qSort(m_items.begin(), m_items.end(), lessThan);
-
     // Iterate through all items and rename them...
     int index = m_spinBox->value();
     foreach (const KFileItem& item, m_items) {
     // Iterate through all items and rename them...
     int index = m_spinBox->value();
     foreach (const KFileItem& item, m_items) {