┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2025-05-09 13:34:30 +0300
committerAkseli Lahtinen <[email protected]>2025-05-09 13:34:30 +0300
commit2201018673467bf7a871082b1fd1e3f8c6f926e7 (patch)
tree0eac8446d79c39e83432a2e8f60378c67cfcaf56 /src/views/dolphinview.cpp
parent882cd01717f53ac544c54fec3d03163b8fbdebe7 (diff)
DolphinView: Remove -1 interval, add setAutoActivationEnabled
In future Qt versions, Qt Timers do not allow negative intervals. Instead, they will be changed to 1. Related Qt commit: https://github.com/qt/qtbase/commit/f1f610bc67bfd5c2ef31270a6945e7bae93b5e4a Instead of relying on the interval, use a boolean variable to check if the autoactivation is enabled or not.
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 933bfda07..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) {