sort order
BUG: 287829
FIXED-IN: 4.9.5
REVIEW: 107718
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));
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) {