]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placespanel.h
Add explicit moc includes to sources for moc-covered headers
[dolphin.git] / src / panels / places / placespanel.h
index 97be1f735016ccd05bd1523e01b941ab4caf8601..2eb309483103462c8eee4fc4bbd38750b4330475 100644 (file)
@@ -11,8 +11,8 @@
 
 #include "panels/panel.h"
 
-#include <QUrl>
 #include <KFilePlacesView>
+#include <QUrl>
 
 #include <Solid/SolidNamespace> // Solid::ErrorType
 
@@ -30,15 +30,15 @@ class PlacesPanel : public KFilePlacesView
     Q_OBJECT
 
 public:
-    explicit PlacesPanel(QWidgetparent);
+    explicit PlacesPanel(QWidget *parent);
     ~PlacesPanel() override;
 
     void setUrl(const QUrl &url); // override
 
     // for compatibility with Panel, actions that are shown
     // on the view's context menu
-    QList<QAction*> customContextMenuActions() const;
-    void setCustomContextMenuActions(const QList<QAction*>& actions);
+    QList<QAction *> customContextMenuActions() const;
+    void setCustomContextMenuActions(const QList<QAction *> &actions);
 
     void requestTearDown();
     void proceedWithTearDown();
@@ -47,21 +47,22 @@ public Q_SLOTS:
     void readSettings();
 
 Q_SIGNALS:
-    void errorMessage(const QStringerror);
-    void storageTearDownRequested(const QStringmountPath);
-    void storageTearDownExternallyRequested(const QStringmountPath);
+    void errorMessage(const QString &error);
+    void storageTearDownRequested(const QString &mountPath);
+    void storageTearDownExternallyRequested(const QString &mountPath);
     void storageTearDownSuccessful();
 
 protected:
-    void showEvent(QShowEvent* event) override;
+    void showEvent(QShowEvent *event) override;
+    void dragMoveEvent(QDragMoveEvent *event) override;
 
 private Q_SLOTS:
     void slotConfigureTrash();
-    void slotUrlsDropped(const QUrl& dest, QDropEvent* event, QWidget* parent);
+    void slotUrlsDropped(const QUrl &dest, QDropEvent *event, QWidget *parent);
     void slotContextMenuAboutToShow(const QModelIndex &index, QMenu *menu);
     void slotTearDownRequested(const QModelIndex &index);
     void slotTearDownRequestedExternally(const QString &udi);
-    void slotTearDownDone(Solid::ErrorType error, const QVariant& errorData);
+    void slotTearDownDone(const QModelIndex &index, Solid::ErrorType error, const QVariant &errorData);
     void slotRowsInserted(const QModelIndex &parent, int first, int last);
     void slotRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
 
@@ -69,9 +70,9 @@ private:
     void connectDeviceSignals(const QModelIndex &idx);
 
     QUrl m_url; // only used for initial setUrl
-    QList<QAction*> m_customContextMenuActions;
+    QList<QAction *> m_customContextMenuActions;
 
-    Solid::StorageAccess *m_deviceToTearDown = nullptr;
+    QPersistentModelIndex m_indexToTearDown;
 
     QAction *m_configureTrashAction;
     QAction *m_lockPanelsAction;