summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/libmediacommon
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-08-25 20:27:06 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-10-17 10:48:29 +0800
commit1a089178fa6b7d19326a1b37d554f2e56c30f6f7 (patch)
treee250f4902a53aa7db802447eff28ff8d2f224663 /tdeioslave/media/libmediacommon
parent7c6e00a43ce3626e0450954ab1234c78048fcb58 (diff)
downloadtdebase-1a089178fa6b7d19326a1b37d554f2e56c30f6f7.tar.gz
tdebase-1a089178fa6b7d19326a1b37d554f2e56c30f6f7.zip
tdeioslave media: mount/unmount/unlock/lock are only allowed on devices
for which those operations make sense. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeioslave/media/libmediacommon')
-rw-r--r--tdeioslave/media/libmediacommon/medium.cpp10
-rw-r--r--tdeioslave/media/libmediacommon/medium.h4
2 files changed, 2 insertions, 12 deletions
diff --git a/tdeioslave/media/libmediacommon/medium.cpp b/tdeioslave/media/libmediacommon/medium.cpp
index cb06a5eb8..797c409b4 100644
--- a/tdeioslave/media/libmediacommon/medium.cpp
+++ b/tdeioslave/media/libmediacommon/medium.cpp
@@ -252,16 +252,6 @@ void Medium::setLocked(bool locked)
m_properties[LOCKED] = locked ? "true" : "false";
}
-bool Medium::needMounting() const
-{
- return isMountable() && !isMounted();
-}
-
-bool Medium::needUnlocking() const
-{
- return isEncrypted() && isLocked();
-}
-
KURL Medium::prettyBaseURL() const
{
if (!baseURL().isEmpty())
diff --git a/tdeioslave/media/libmediacommon/medium.h b/tdeioslave/media/libmediacommon/medium.h
index 49a7fb980..3c9677c21 100644
--- a/tdeioslave/media/libmediacommon/medium.h
+++ b/tdeioslave/media/libmediacommon/medium.h
@@ -75,8 +75,8 @@ public:
bool softHidden() const { return m_properties[SOFT_HIDDEN] == "true"; };
bool isLocked() const { return m_properties[LOCKED] == "true"; };
- bool needMounting() const;
- bool needUnlocking() const;
+ bool needMounting() const { return isMountable() && !isMounted(); };
+ bool needUnlocking() const { return isEncrypted() && isLocked(); }
KURL prettyBaseURL() const;
TQString prettyLabel() const;