Adjusted to new TDEStorageOpResult-based tdelibs api.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/2/head
Michele Calgaro 5 years ago
parent 0a1e935f06
commit b1246c7067
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -22,6 +22,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqvariant.h>
#ifdef HAVE_HAL #ifdef HAVE_HAL
// We acknowledge the the dbus API is unstable // We acknowledge the the dbus API is unstable
@ -842,8 +843,9 @@ int K3bDevice::HalConnection::mount( K3bDevice::Device* dev,
// FIXME // FIXME
// Options from 'options' are not currently loaded into 'mountOptions' // Options from 'options' are not currently loaded into 'mountOptions'
TDEStorageMountOptions mountOptions; TDEStorageMountOptions mountOptions;
TQString mountedPath = sdevice->mountDevice(mountPoint, mountOptions); TDEStorageOpResult mountResult = sdevice->mountDevice(mountPoint, mountOptions);
if (mountedPath.isNull()) { TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null;
if (mountedPath.isEmpty()) {
return org_freedesktop_Hal_CommunicationError; return org_freedesktop_Hal_CommunicationError;
} }
else { else {
@ -872,7 +874,8 @@ int K3bDevice::HalConnection::unmount(K3bDevice::Device* dev, const TQStringList
// Options from 'options' are not currently loaded into 'mountOptions' // Options from 'options' are not currently loaded into 'mountOptions'
TQString mountOptions; TQString mountOptions;
if (!sdevice->unmountDevice(NULL)) { TDEStorageOpResult unmountResult = sdevice->unmountDevice();
if (unmountResult["result"].toBool() == false) {
// Unmount failed! // Unmount failed!
return org_freedesktop_Hal_CommunicationError; return org_freedesktop_Hal_CommunicationError;
} }

Loading…
Cancel
Save