summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-31 11:08:37 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-06-27 00:05:57 +0900
commitb1246c70673b6024314964c991ab0e59174fcbdb (patch)
treefeeffdd4330a1632ea45c5e399fc218f10e76c9b
parent0a1e935f06a4231f7261c786f3f94fa0d338f0bd (diff)
downloadk3b-b1246c70673b6024314964c991ab0e59174fcbdb.tar.gz
k3b-b1246c70673b6024314964c991ab0e59174fcbdb.zip
Adjusted to new TDEStorageOpResult-based tdelibs api.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--libk3bdevice/k3bhalconnection.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libk3bdevice/k3bhalconnection.cpp b/libk3bdevice/k3bhalconnection.cpp
index 476d016..7a17bf7 100644
--- a/libk3bdevice/k3bhalconnection.cpp
+++ b/libk3bdevice/k3bhalconnection.cpp
@@ -22,6 +22,7 @@
#include <tdelocale.h>
#include <tqtimer.h>
+#include <tqvariant.h>
#ifdef HAVE_HAL
// We acknowledge the the dbus API is unstable
@@ -842,8 +843,9 @@ int K3bDevice::HalConnection::mount( K3bDevice::Device* dev,
// FIXME
// Options from 'options' are not currently loaded into 'mountOptions'
TDEStorageMountOptions mountOptions;
- TQString mountedPath = sdevice->mountDevice(mountPoint, mountOptions);
- if (mountedPath.isNull()) {
+ TDEStorageOpResult mountResult = sdevice->mountDevice(mountPoint, mountOptions);
+ TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null;
+ if (mountedPath.isEmpty()) {
return org_freedesktop_Hal_CommunicationError;
}
else {
@@ -872,7 +874,8 @@ int K3bDevice::HalConnection::unmount(K3bDevice::Device* dev, const TQStringList
// Options from 'options' are not currently loaded into 'mountOptions'
TQString mountOptions;
- if (!sdevice->unmountDevice(NULL)) {
+ TDEStorageOpResult unmountResult = sdevice->unmountDevice();
+ if (unmountResult["result"].toBool() == false) {
// Unmount failed!
return org_freedesktop_Hal_CommunicationError;
}