┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitemmodel.h
diff options
context:
space:
mode:
authorMiklos Marton <[email protected]>2017-10-12 23:17:51 +0200
committerElvis Angelaccio <[email protected]>2017-10-12 23:21:49 +0200
commitbd47eb2e6d80315115bb3f58987162fcb4911b10 (patch)
treed51172264a047f02e235cc2e78371330336e4792 /src/panels/places/placesitemmodel.h
parent1ad3b7775ec7388352d3a02c704062baa5d0aca3 (diff)
Don't block unmounting when terminal panel's cwd is the mountpoint
When unmounting a removable media Dolphin checks if there are some files open on the device before performing the unmount. If the terminal window in dolphin is open and the to be unmounted path is open, the unmount process will be blocked. This patch sets the terminal window current path to the home directory upon unmount request if the terminal directory is set to the mount path. The unmount request could came from two sources: The user could hit right click on the media in the dolphin's places panel and hit unmount. The user could request an unmount from the indicator applet This patch was originally written by Arjun AK for the kdelibs4 version of Dolphin: https://git.reviewboard.kde.org/r/121613/ BUG: 158264 FIXED-IN: 17.11.80 Differential Revision: https://phabricator.kde.org/D7847
Diffstat (limited to 'src/panels/places/placesitemmodel.h')
-rw-r--r--src/panels/places/placesitemmodel.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h
index aa8bb16fe..dcc9759e6 100644
--- a/src/panels/places/placesitemmodel.h
+++ b/src/panels/places/placesitemmodel.h
@@ -102,7 +102,7 @@ public:
QAction* teardownAction(int index) const;
void requestEject(int index);
- void requestTeardown(int index);
+ void requestTearDown(int index);
bool storageSetupNeeded(int index) const;
void requestStorageSetup(int index);
@@ -123,6 +123,8 @@ public:
virtual void clear() Q_DECL_OVERRIDE;
+ void proceedWithTearDown();
+
/**
* Saves the bookmarks and indicates to other applications that the
* state of the bookmarks has been changed. Is only called by the
@@ -133,6 +135,8 @@ public:
signals:
void errorMessage(const QString& message);
void storageSetupDone(int index, bool success);
+ void storageTearDownRequested(const QString& mountPath);
+ void storageTearDownExternallyRequested(const QString& mountPath);
protected:
virtual void onItemInserted(int index) Q_DECL_OVERRIDE;
@@ -142,7 +146,7 @@ protected:
private slots:
void slotDeviceAdded(const QString& udi);
void slotDeviceRemoved(const QString& udi);
- void slotStorageTeardownDone(Solid::ErrorType error, const QVariant& errorData);
+ void slotStorageTearDownDone(Solid::ErrorType error, const QVariant& errorData);
void slotStorageSetupDone(Solid::ErrorType error, const QVariant& errorData, const QString& udi);
void hideItem();
@@ -281,6 +285,8 @@ private:
// removing an item is not allowed.
int m_hiddenItemToRemove;
+ Solid::StorageAccess *m_deviceToTearDown;
+
QTimer* m_updateBookmarksTimer;
QHash<QObject*, int> m_storageSetupInProgress;