Browse Source

Adjusted to use new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
undefined
Michele Calgaro 1 month ago
parent
commit
bbde21a624
Signed by: Michele Calgaro <michele.calgaro@yahoo.it> GPG Key ID: 2A75B7CA8ADED5CF

+ 2
- 2
kcontrol/hwmanager/devicepropsdlg.cpp View File

@@ -885,7 +885,7 @@ void DevicePropertiesDialog::mountDisk() {
885 885
 		diskLabel = i18n("%1 Removable Device").arg(sdevice->deviceFriendlySize());
886 886
 	}
887 887
 	TDEStorageMountOptions mountOptions;
888
-	TDEStorageOpResult mountResult = sdevice->mountDevice(diskLabel, mountOptions);
888
+	TQStringVariantMap mountResult = sdevice->mountDevice(diskLabel, mountOptions);
889 889
 	TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null;
890 890
 	if (mountedPath.isEmpty()) {
891 891
 		qerror = i18n("<qt>Unable to mount this device.<p>Potential reasons include:<br>Improper device and/or user privilege level<br>Corrupt data on storage device");
@@ -908,7 +908,7 @@ void DevicePropertiesDialog::unmountDisk() {
908 908
 	TDEStorageDevice* sdevice = static_cast<TDEStorageDevice*>(m_device);
909 909
 
910 910
 	TQString qerror;
911
-	TDEStorageOpResult unmountResult = sdevice->unmountDevice();
911
+	TQStringVariantMap unmountResult = sdevice->unmountDevice();
912 912
 	if (unmountResult["result"].toBool() == false) {
913 913
 		// Unmount failed!
914 914
 		qerror = "<qt>" + i18n("Unfortunately, the device could not be unmounted.");

+ 2
- 2
kcontrol/hwmanager/hwdevicetray.cpp View File

@@ -301,10 +301,10 @@ void HwDeviceSystemTray::slotUnmountDevice(int parameter)
301 301
 			TDEStorageDevice* sdevice = static_cast<TDEStorageDevice*>(hwdevice);
302 302
 			if ((sdevice->diskUUID() == uuid) || (sdevice->systemPath() == uuid)) {
303 303
 				if (!sdevice->mountPath().isEmpty()) {
304
-					TDEStorageOpResult unmountResult = sdevice->unmountDevice();
304
+					TQStringVariantMap unmountResult = sdevice->unmountDevice();
305 305
 					if (unmountResult["result"].toBool() == false) {
306 306
 						TQString errStr = unmountResult.contains("errStr") ? unmountResult["errStr"].toString() : TQString::null;
307
-						TQString retcodeStr = unmountResult.contains("retCode") ? unmountResult["retCode"].asString() : "not available";
307
+						TQString retcodeStr = unmountResult.contains("retCode") ? unmountResult["retCode"].toString() : "not available";
308 308
 						KMessageBox::error(0, i18n("<qt><b>Unable to eject device</b><p>Detailed error information:<br>%1 (error code %2)</qt>").arg(errStr).arg(retcodeStr), i18n("Eject Failed"));
309 309
 					}
310 310
 					return;

+ 3
- 3
tdeioslave/media/mediamanager/tdehardwarebackend.cpp View File

@@ -1233,7 +1233,7 @@ TQString TDEBackend::mount(const Medium *medium)
1233 1233
 
1234 1234
 	if (!medium->isEncrypted()) {
1235 1235
 		// normal volume
1236
-		TDEStorageOpResult mountResult = sdevice->mountDevice(diskLabel, valids);
1236
+		TQStringVariantMap mountResult = sdevice->mountDevice(diskLabel, valids);
1237 1237
 		TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null;
1238 1238
 		if (mountedPath.isEmpty()) {
1239 1239
 			qerror = i18n("<qt>Unable to mount this device.<p>Potential reasons include:<br>Improper device and/or user privilege level<br>Corrupt data on storage device");
@@ -1286,7 +1286,7 @@ TQString TDEBackend::mount(const Medium *medium)
1286 1286
 				}
1287 1287
 
1288 1288
 				// mount encrypted volume with password
1289
-				TDEStorageOpResult mountResult = sdevice->mountEncryptedDevice(m_decryptionPassword, diskLabel, valids);
1289
+				TQStringVariantMap mountResult = sdevice->mountEncryptedDevice(m_decryptionPassword, diskLabel, valids);
1290 1290
 				TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null;
1291 1291
 				if (mountedPath.isEmpty()) {
1292 1292
 					if (mountResult.contains("retCode") && mountResult["retCode"].toInt() == 0) {
@@ -1400,7 +1400,7 @@ TQString TDEBackend::unmount(const TQString &_udi)
1400 1400
 	TQString uid = sdevice->uniqueID();
1401 1401
 	TQString node = sdevice->deviceNode();
1402 1402
 
1403
-	TDEStorageOpResult unmountResult = sdevice->unmountDevice();
1403
+	TQStringVariantMap unmountResult = sdevice->unmountDevice();
1404 1404
 	if (unmountResult["result"].toBool() == false) {
1405 1405
 		// Unmount failed!
1406 1406
 		qerror = "<qt>" + i18n("Unfortunately, the device <b>%1</b> (%2) named <b>'%3'</b> and currently mounted at <b>%4</b> could not be unmounted. ").arg("system:/media/" + medium->name(), medium->deviceNode(), medium->prettyLabel(), medium->prettyBaseURL().pathOrURL());

Loading…
Cancel
Save