diff options
| author | Felix Ernst <[email protected]> | 2024-06-26 12:45:48 +0200 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2024-07-01 14:06:01 +0000 |
| commit | e2f316578909e4c886430110808d4681997b3cb7 (patch) | |
| tree | 24ad0b932127925198e06cf8befecdc106b382ed /src/panels/places | |
| parent | 92b178b7404b002778d8288353f65e27ee5de5dd (diff) | |
Revert "DragAndDropHelper::updateDropAction: use StatJob for remote URLs"
This reverts commit dc149ec5e52f52c514cf362603d05ba8eea506b8.
This prevents a crash. One issue identified is that the commit that
I am reverting here accesses a QDropEvent at a moment in time in
which it might have already been deleted. We cannot check if it
exists by that time because we do not control its lifetime and it
is not a QObject.
Diffstat (limited to 'src/panels/places')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 4 | ||||
| -rw-r--r-- | src/panels/places/placespanel.h | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index eaf2642eb..ba3451bd5 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -15,6 +15,7 @@ #include "dolphin_placespanelsettings.h" #include "dolphinplacesmodelsingleton.h" #include "settings/dolphinsettingsdialog.h" +#include "views/draganddrophelper.h" #include <KFilePlacesModel> #include <KIO/DropJob> @@ -31,7 +32,6 @@ PlacesPanel::PlacesPanel(QWidget *parent) : KFilePlacesView(parent) - , m_dragAndDropHelper(this) { setDropOnPlaceEnabled(true); connect(this, &PlacesPanel::urlsDropped, this, &PlacesPanel::slotUrlsDropped); @@ -161,7 +161,7 @@ void PlacesPanel::dragMoveEvent(QDragMoveEvent *event) if (!url.isValid() || !KProtocolManager::supportsWriting(url)) { event->setDropAction(Qt::IgnoreAction); } else { - m_dragAndDropHelper.updateDropAction(event, url); + DragAndDropHelper::updateDropAction(event, url); } } } diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index d21e7d64e..cbd5fc224 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -10,7 +10,6 @@ #define PLACESPANEL_H #include "panels/panel.h" -#include "views/draganddrophelper.h" #include <KFilePlacesView> #include <QUrl> @@ -79,8 +78,6 @@ private: QAction *m_configureTrashAction; QAction *m_openInSplitView; QAction *m_lockPanelsAction; - - DragAndDropHelper m_dragAndDropHelper; }; #endif // PLACESPANEL_H |
