Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
dolphin
2006-deletion.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2006-deletion.patch of Package dolphin
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 08ca3f5d0bf08f66215eaa14901a96057fbe7e41..bf2cc3c675f8639d421c70a954ed59b2d6904dcf 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -73,7 +73,6 @@ DolphinView::DolphinView(const QUrl &url, const QList<KeyPressHandler *> keyPres , m_assureVisibleCurrentIndex(false) , m_isFolderWritable(true) , m_dragging(false) - , m_selectNextItem(false) , m_url(url) , m_viewPropertiesContext() , m_mode(DolphinView::IconsView) @@ -754,7 +753,6 @@ void DolphinView::trashSelectedItems() using Iface = KIO::AskUserActionInterface; auto *trashJob = new KIO::DeleteOrTrashJob(list, Iface::Trash, Iface::DefaultConfirmation, this); connect(trashJob, &KJob::result, this, &DolphinView::slotTrashFileFinished); - m_selectNextItem = true; trashJob->start(); } @@ -765,7 +763,6 @@ void DolphinView::deleteSelectedItems() using Iface = KIO::AskUserActionInterface; auto *trashJob = new KIO::DeleteOrTrashJob(list, Iface::Delete, Iface::DefaultConfirmation, this); connect(trashJob, &KJob::result, this, &DolphinView::slotTrashFileFinished); - m_selectNextItem = true; trashJob->start(); } @@ -1445,8 +1442,6 @@ void DolphinView::slotJobResult(KJob *job) void DolphinView::slotSelectionChanged(const KItemSet ¤t, const KItemSet &previous) { - m_selectNextItem = false; - if (!m_ignoreSelectionChanges && current.count() != previous.count()) { m_jobInfo.reset(); } @@ -1793,7 +1788,6 @@ void DolphinView::slotTwoClicksRenamingTimerTimeout() void DolphinView::slotTrashFileFinished(KJob *job) { if (job->error() == 0) { - selectNextItem(); // Fixes BUG: 419914 via selecting next item Q_EMIT operationCompletedMessage(i18nc("@info:status", "Trash operation completed.")); } else if (job->error() != KIO::ERR_USER_CANCELED) { Q_EMIT errorMessage(job->errorString()); @@ -1803,37 +1797,12 @@ void DolphinView::slotTrashFileFinished(KJob *job) void DolphinView::slotDeleteFileFinished(KJob *job) { if (job->error() == 0) { - selectNextItem(); // Fixes BUG: 419914 via selecting next item Q_EMIT operationCompletedMessage(i18nc("@info:status", "Delete operation completed.")); } else if (job->error() != KIO::ERR_USER_CANCELED) { Q_EMIT errorMessage(job->errorString()); } } -void DolphinView::selectNextItem() -{ - if (m_active && m_selectNextItem) { - KItemListSelectionManager *selectionManager = m_container->controller()->selectionManager(); - if (selectedItems().isEmpty()) { - Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); - return; - } - const auto lastSelectedIndex = m_model->index(selectedItems().last()); - if (lastSelectedIndex < 0) { - Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); - return; - } - auto nextItem = lastSelectedIndex + 1; - if (nextItem >= itemsCount()) { - nextItem = lastSelectedIndex - selectedItemsCount(); - } - if (nextItem >= 0) { - selectionManager->setSelected(nextItem, 1); - } - m_selectNextItem = false; - } -} - void DolphinView::slotRenamingResult(KJob *job) { if (job->error()) { diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 0c814f7e5e645765941dd40072a40cf2a7b379ee..c696ec148ffd1360db943234d2930140800cb5b8 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -839,11 +839,6 @@ private Q_SLOTS: */ void observeCreatedItem(const QUrl &url); - /** - * Selects the next item after prev selection deleted/trashed - */ - void selectNextItem(); - /** * Called when a redirection happens. * Testcase: fish://localhost @@ -941,7 +936,6 @@ private: bool m_isFolderWritable; bool m_dragging; // True if a dragging is done. Required to be able to decide whether a // tooltip may be shown when hovering an item. - bool m_selectNextItem; enum class LoadingState { Idle, Loading, Canceled, Completed }; LoadingState m_loadingState = LoadingState::Idle;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor