]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placespanel.cpp
Merge remote-tracking branch 'fork/work/zakharafoniam/useful-groups'
[dolphin.git] / src / panels / places / placespanel.cpp
index eaf2642eb2cf3fb51904e5cc3f8e826c83d9cb46..cb3f3183b1a40cc485f8199466cf53657c0998f9 100644 (file)
@@ -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);
@@ -42,7 +42,7 @@ PlacesPanel::PlacesPanel(QWidget *parent)
         slotTearDownRequested(index);
     });
 
-    m_openInSplitView = new QAction(QIcon::fromTheme(QStringLiteral("view-right-new")), i18nc("@action:inmenu", "Open in Split View"));
+    m_openInSplitView = new QAction(QIcon::fromTheme(QStringLiteral("view-split-left-right")), i18nc("@action:inmenu", "Open in Split View"));
     m_openInSplitView->setPriority(QAction::HighPriority);
     connect(m_openInSplitView, &QAction::triggered, this, [this]() {
         const QUrl url = currentIndex().data(KFilePlacesModel::UrlRole).toUrl();
@@ -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);
             }
         }
     }
@@ -257,7 +257,7 @@ void PlacesPanel::slotTearDownDone(const QModelIndex &index, Solid::ErrorType er
 void PlacesPanel::slotRowsInserted(const QModelIndex &parent, int first, int last)
 {
     for (int i = first; i <= last; ++i) {
-        connectDeviceSignals(model()->index(first, 0, parent));
+        connectDeviceSignals(model()->index(i, 0, parent));
     }
 }