diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-06-01 18:44:56 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-07-07 23:44:40 +0900 |
commit | aaaf378033f889408155a902349c676429b85254 (patch) | |
tree | 2adaae48af3e2f3a5f7be528880efcf06c9f1202 /tdecore | |
parent | bf683427937ea0cfd90749b833456377de6ffa10 (diff) | |
download | tdelibs-aaaf378033f889408155a902349c676429b85254.tar.gz tdelibs-aaaf378033f889408155a902349c676429b85254.zip |
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/kdcoppropertyproxy.cpp | 2 | ||||
-rw-r--r-- | tdecore/tdehw/disksHelper.cpp | 25 | ||||
-rw-r--r-- | tdecore/tdehw/disksHelper.h | 12 | ||||
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.cpp | 21 | ||||
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.h | 15 |
5 files changed, 36 insertions, 39 deletions
diff --git a/tdecore/kdcoppropertyproxy.cpp b/tdecore/kdcoppropertyproxy.cpp index 663644b50..714e445bc 100644 --- a/tdecore/kdcoppropertyproxy.cpp +++ b/tdecore/kdcoppropertyproxy.cpp @@ -194,7 +194,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB break; typedef TQValueList<TQVariant> ListType; - typedef TQMap<TQString,TQVariant> MapType; + typedef TQStringVariantMap MapType; switch ( type ) { diff --git a/tdecore/tdehw/disksHelper.cpp b/tdecore/tdehw/disksHelper.cpp index 37efa25ac..0eab2d28c 100644 --- a/tdecore/tdehw/disksHelper.cpp +++ b/tdecore/tdehw/disksHelper.cpp @@ -20,7 +20,6 @@ #include "disksHelper.h" #include "tdelocale.h" #include "tdestoragedevice.h" -#include <tqvariant.h> #include <tqdbusdata.h> #include <tqdbusmessage.h> #include <tqdbusproxy.h> @@ -34,8 +33,8 @@ //------------------------------- // UDisks //------------------------------- -TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice) { - TDEStorageOpResult result; +TQStringVariantMap UDisksEjectDrive(TDEStorageDevice *sdevice) { + TQStringVariantMap result; result["result"] = false; TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); @@ -67,8 +66,8 @@ TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice) { return result; } -TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions) { - TDEStorageOpResult result; +TQStringVariantMap UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions) { + TQStringVariantMap result; result["result"] = false; result["retcode"] = -2; @@ -109,8 +108,8 @@ TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType return result; } -TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions) { - TDEStorageOpResult result; +TQStringVariantMap UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions) { + TQStringVariantMap result; result["result"] = false; result["retcode"] = -2; @@ -153,8 +152,8 @@ TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountO //------------------------------- // UDisks2 //------------------------------- -TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice) { - TDEStorageOpResult result; +TQStringVariantMap UDisks2EjectDrive(TDEStorageDevice *sdevice) { + TQStringVariantMap result; result["result"] = false; TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); @@ -223,8 +222,8 @@ TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice) { return result; } -TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions) { - TDEStorageOpResult result; +TQStringVariantMap UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions) { + TQStringVariantMap result; result["result"] = false; result["retcode"] = -2; @@ -269,8 +268,8 @@ TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemTyp return result; } -TDEStorageOpResult UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions) { - TDEStorageOpResult result; +TQStringVariantMap UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions) { + TQStringVariantMap result; result["result"] = false; result["retcode"] = -2; diff --git a/tdecore/tdehw/disksHelper.h b/tdecore/tdehw/disksHelper.h index 5f2d7e7cb..665de8223 100644 --- a/tdecore/tdehw/disksHelper.h +++ b/tdecore/tdehw/disksHelper.h @@ -27,15 +27,15 @@ //------------------------------- // UDisks //------------------------------- -TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice); -TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions); -TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions); +TQStringVariantMap UDisksEjectDrive(TDEStorageDevice *sdevice); +TQStringVariantMap UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions); +TQStringVariantMap UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions); //------------------------------- // UDisks2 //------------------------------- -TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice); -TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions); -TDEStorageOpResult UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions); +TQStringVariantMap UDisks2EjectDrive(TDEStorageDevice *sdevice); +TQStringVariantMap UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions); +TQStringVariantMap UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions); #endif diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index c21f54606..16e6d6e4d 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -28,7 +28,6 @@ #include <tqregexp.h> #include <tqpixmap.h> #include <tqfile.h> -#include <tqvariant.h> #include "kdebug.h" #include "tdelocale.h" @@ -310,7 +309,7 @@ bool TDEStorageDevice::lockDriveMedia(bool lock) { bool TDEStorageDevice::ejectDrive() { if (!(TDEGlobal::dirs()->findExe("udisksctl").isEmpty())) { - TDEStorageOpResult ejectResult = UDisks2EjectDrive(this); + TQStringVariantMap ejectResult = UDisks2EjectDrive(this); if (ejectResult["result"].toBool()) { return true; } @@ -320,7 +319,7 @@ bool TDEStorageDevice::ejectDrive() { } } if (!(TDEGlobal::dirs()->findExe("udisks").isEmpty())) { - TDEStorageOpResult ejectResult = UDisksEjectDrive(this); + TQStringVariantMap ejectResult = UDisksEjectDrive(this); if (ejectResult["result"].toBool()) { return true; } @@ -702,8 +701,8 @@ TQString TDEStorageDevice::mountPath() { return TQString::null; } -TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOptions mountOptions) { - TDEStorageOpResult result; +TQStringVariantMap TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOptions mountOptions) { + TQStringVariantMap result; // Check if device is already mounted TQString mountpath = mountPath(); @@ -774,7 +773,7 @@ TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageM fileSystemType = mountOptions["filesystem"]; } - TDEStorageOpResult mountResult = UDisks2MountDrive(devNode, fileSystemType, optionString); + TQStringVariantMap mountResult = UDisks2MountDrive(devNode, fileSystemType, optionString); if (mountResult["result"].toBool()) { // Update internal mount data TDEGlobal::hardwareDevices()->processModifiedMounts(); @@ -901,9 +900,9 @@ TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageM return result; } -TDEStorageOpResult TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName, +TQStringVariantMap TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName, TDEStorageMountOptions mountOptions) { - TDEStorageOpResult result; + TQStringVariantMap result; // Check if device is already mounted TQString mountpath = mountPath(); @@ -976,8 +975,8 @@ TDEStorageOpResult TDEStorageDevice::mountEncryptedDevice(TQString passphrase, T return result; } -TDEStorageOpResult TDEStorageDevice::unmountDevice() { - TDEStorageOpResult result; +TQStringVariantMap TDEStorageDevice::unmountDevice() { + TQStringVariantMap result; // Check if device is already unmounted TQString mountpoint = mountPath(); @@ -990,7 +989,7 @@ TDEStorageOpResult TDEStorageDevice::unmountDevice() { TQString devNode = deviceNode(); // Try to use UDISKS v2 via DBUS, if available - TDEStorageOpResult unmountResult = UDisks2UnmountDrive(devNode, TQString::null); + TQStringVariantMap unmountResult = UDisks2UnmountDrive(devNode, TQString::null); if (unmountResult["result"].toBool()) { // Update internal mount data TDEGlobal::hardwareDevices()->processModifiedMounts(); diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h index d6a4269a8..6bd39353b 100644 --- a/tdecore/tdehw/tdestoragedevice.h +++ b/tdecore/tdehw/tdestoragedevice.h @@ -21,6 +21,7 @@ #define _TDESTORAGEDEVICE_H #include "tdegenericdevice.h" +#include "tqvariant.h" struct crypt_device; @@ -166,9 +167,7 @@ enum TDELUKSResult { }; }; -class TQVariant; typedef TQMap<TQString, TQString> TDEStorageMountOptions; -typedef TQMap<TQString, TQVariant> TDEStorageOpResult; class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice { @@ -235,9 +234,9 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice * @param a TQString containing a requested mount name under /media, if desired * @param a TDEStorageMountOptions containing any mount options for pmount, if desired * - * @return a TDEStorageOpResult object containing information about the operation outcome + * @return a TQStringVariantMap object containing information about the operation outcome */ - TDEStorageOpResult mountDevice(TQString mediaName = TQString::null, + TQStringVariantMap mountDevice(TQString mediaName = TQString::null, TDEStorageMountOptions mountOptions = TDEStorageMountOptions()); /** @@ -247,17 +246,17 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice * @param a TQString containing a requested mount name under /media, if desired * @param a TDEStorageMountOptions containing any mount options for pmount, if desired * - * @return a TDEStorageOpResult object containing information about the operation outcome + * @return a TQStringVariantMap object containing information about the operation outcome */ - TDEStorageOpResult mountEncryptedDevice(TQString passphrase, TQString mediaName = TQString::null, + TQStringVariantMap mountEncryptedDevice(TQString passphrase, TQString mediaName = TQString::null, TDEStorageMountOptions mountOptions = TDEStorageMountOptions()); /** * Unmounts the device * - * @return a TDEStorageOpResult object containing information about the operation outcome + * @return a TQStringVariantMap object containing information about the operation outcome */ - TDEStorageOpResult unmountDevice(); + TQStringVariantMap unmountDevice(); /** * @return a TQString with the mount path, if mounted |