diff options
| author | Méven Car <[email protected]> | 2022-11-29 18:16:59 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2022-11-29 18:16:59 +0000 |
| commit | a2c9c05de2dfabbb2bb614390c8e03023dad2bd1 (patch) | |
| tree | 5f34ae95e4cb0ea8ee95d3ee17c28b3cacd25ae9 /src/views | |
| parent | de289800b22c654e8e3d8fbaea7bdb496a021b88 (diff) | |
Exit the deleted directory when it is removed
If current directory is a local file, try to find nearest dir ancestor and
open it. Display warning to the user.
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 1 | ||||
| -rw-r--r-- | src/views/dolphinview.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 1da3ebf85..5f331dc27 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -195,6 +195,7 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) : connect(m_model, &KFileItemModel::directoryRedirection, this, &DolphinView::slotDirectoryRedirection); connect(m_model, &KFileItemModel::urlIsFileError, this, &DolphinView::urlIsFileError); connect(m_model, &KFileItemModel::fileItemsChanged, this, &DolphinView::fileItemsChanged); + connect(m_model, &KFileItemModel::currentDirectoryRemoved, this, &DolphinView::currentDirectoryRemoved); connect(this, &DolphinView::itemCountChanged, this, &DolphinView::updatePlaceholderLabel); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index aff4c51a8..50b1b9270 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -637,6 +637,11 @@ Q_SIGNALS: void fileItemsChanged(const KFileItemList &changedFileItems); + /** + * Emitted when the current directory of the model was removed. + */ + void currentDirectoryRemoved(); + protected: /** Changes the zoom level if Control is pressed during a wheel event. */ void wheelEvent(QWheelEvent* event) override; |
