]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placespanel.cpp
Don't block unmounting when terminal panel's cwd is the mountpoint
[dolphin.git] / src / panels / places / placespanel.cpp
index 19a17be08e6d456a128efd253bb7fec99fa44903..0ce6d69a5f1c72e21446f69432dfc026610d1281 100644 (file)
@@ -72,6 +72,11 @@ PlacesPanel::~PlacesPanel()
 {
 }
 
+void PlacesPanel::proceedWithTearDown()
+{
+    m_model->proceedWithTearDown();
+}
+
 bool PlacesPanel::urlChanged()
 {
     if (!url().isValid() || url().scheme().contains(QStringLiteral("search"))) {
@@ -110,6 +115,10 @@ void PlacesPanel::showEvent(QShowEvent* event)
         m_model->setGroupedSorting(true);
         connect(m_model, &PlacesItemModel::errorMessage,
                 this, &PlacesPanel::errorMessage);
+        connect(m_model, &PlacesItemModel::storageTearDownRequested,
+                this, &PlacesPanel::storageTearDownRequested);
+        connect(m_model, &PlacesItemModel::storageTearDownExternallyRequested,
+                this, &PlacesPanel::storageTearDownExternallyRequested);
 
         m_view = new PlacesView();
         m_view->setWidgetCreator(new KItemListWidgetCreator<PlacesItemListWidget>());
@@ -241,7 +250,7 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
                 // emit the slotItemMiddleClicked signal, because of Qt::MiddleButton.
                 triggerItem(index, Qt::MiddleButton);
             } else if (action == teardownAction) {
-                m_model->requestTeardown(index);
+                m_model->requestTearDown(index);
             } else if (action == ejectAction) {
                 m_model->requestEject(index);
             }