diff options
| author | Nate Graham <[email protected]> | 2020-10-13 11:51:59 -0600 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-10-23 17:00:09 +0000 |
| commit | ae1d441dacef7e52984201abdc9a918ce060021c (patch) | |
| tree | a8ebd2496dec8843025cccb36ac0696c8f9ab66b /src/dolphinmainwindow.h | |
| parent | 1501825d447bf0d316750368d8579a95a38ce537 (diff) | |
Show home folder if needed after unmounting mounted disk
Right now, when you unmount a device that any active view containers are
displaying, nothing in the view changes. As a result, it's possible to
try to navigate to files or folders in that view, which cannot be done
because the disk that the files or folders are located on has been
unmounted!
With this commit, we detect that case and switch the view containers
to show the home folder after the disk whose contents they are displaying
gets unmounted.
BUG: 158934
FIXED-IN: 20.12
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index c03eb1be0..80d0f891a 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -92,7 +92,15 @@ public: */ KNewFileMenu* newFileMenu() const; - void setTabsToHomeIfMountPathOpen(const QString& mountPath); + /** + * Switch the window's view containers' locations to display the home path + * for any which are currently displaying a location corresponding to or + * within mountPath. + * + * This typically done after unmounting a disk at mountPath to ensure that + * the window is not displaying an invalid location. + */ + void setViewsToHomeIfMountPathOpen(const QString& mountPath); public slots: /** |
