┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.cpp
diff options
context:
space:
mode:
authorJin Liu <[email protected]>2024-02-29 23:13:47 +0000
committerJin Liu <[email protected]>2024-02-29 23:13:47 +0000
commitdc149ec5e52f52c514cf362603d05ba8eea506b8 (patch)
tree70442a1ab27fedf220daeca496dfb3c842379b93 /src/dolphintabwidget.cpp
parent992272f8c5b80b0d96e9419cdbe14b6f3d2a22e4 (diff)
DragAndDropHelper::updateDropAction: use StatJob for remote URLs
When dragging onto tabs/Places from a remote URL, we don't process the QDropEvent immediately, but start a StatJob and process the event when it finishes. Also, the result of the StatJob is cached for 30 seconds, to avoid starting duplicate jobs.
Diffstat (limited to 'src/dolphintabwidget.cpp')
-rw-r--r--src/dolphintabwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp
index f80b94ea7..32e251f02 100644
--- a/src/dolphintabwidget.cpp
+++ b/src/dolphintabwidget.cpp
@@ -9,7 +9,6 @@
#include "dolphin_generalsettings.h"
#include "dolphintabbar.h"
#include "dolphinviewcontainer.h"
-#include "views/draganddrophelper.h"
#include <KAcceleratorManager>
#include <KConfigGroup>
@@ -26,6 +25,7 @@ DolphinTabWidget::DolphinTabWidget(DolphinNavigatorsWidgetAction *navigatorsWidg
: QTabWidget(parent)
, m_lastViewedTab(nullptr)
, m_navigatorsWidget{navigatorsWidget}
+ , m_dragAndDropHelper{this}
{
KAcceleratorManager::setNoAccel(this);
@@ -394,7 +394,7 @@ void DolphinTabWidget::tabDragMoveEvent(int index, QDragMoveEvent *event)
{
if (index >= 0) {
DolphinView *view = tabPageAt(index)->activeViewContainer()->view();
- DragAndDropHelper::updateDropAction(event, view->url());
+ m_dragAndDropHelper.updateDropAction(event, view->url());
}
}