X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0464ea82a6850f58805bc4d6fc1df5369d83c3df..2201018673467bf7a871082b1fd1e3f8c6f926e7:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 0afa27d73..bff6e7586 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -123,8 +123,7 @@ DolphinView::DolphinView(const QUrl &url, QWidget *parent) applyModeToView(); KItemListController *controller = new KItemListController(m_model, m_view, this); - const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1; - controller->setAutoActivationDelay(delay); + controller->setAutoActivationEnabled(GeneralSettings::autoExpandFolders()); connect(controller, &KItemListController::doubleClickViewBackground, this, &DolphinView::doubleClickViewBackground); // The EnlargeSmallPreviews setting can only be changed after the model @@ -578,8 +577,7 @@ void DolphinView::readSettings() m_view->readSettings(); applyViewProperties(); - const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1; - m_container->controller()->setAutoActivationDelay(delay); + m_container->controller()->setAutoActivationEnabled(GeneralSettings::autoExpandFolders()); const int newZoomLevel = m_view->zoomLevel(); if (newZoomLevel != oldZoomLevel) { @@ -1883,7 +1881,7 @@ void DolphinView::selectNextItem() Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); return; } - const auto lastSelectedIndex = m_model->index(*selectedItems().constEnd()); + const auto lastSelectedIndex = m_model->index(selectedItems().constLast()); if (lastSelectedIndex < 0) { Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); return;