summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdecore/tdehw/networkbackends/network-manager/network-manager.cpp250
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp14
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp11
3 files changed, 127 insertions, 148 deletions
diff --git a/tdecore/tdehw/networkbackends/network-manager/network-manager.cpp b/tdecore/tdehw/networkbackends/network-manager/network-manager.cpp
index 2f11dd59b..a7e81484f 100644
--- a/tdecore/tdehw/networkbackends/network-manager/network-manager.cpp
+++ b/tdecore/tdehw/networkbackends/network-manager/network-manager.cpp
@@ -37,8 +37,9 @@
#define PRINT_WARNING(x)
#endif
-#define UPDATE_STRING_SETTING_IF_VALID(string, key, settingsMap) if (!string.isNull()) settingsMap[key] = convertDBUSDataToVariantData(TQT_DBusData::fromString(string)); \
- else settingsMap.remove(key);
+#define UPDATE_STRING_SETTING_IF_VALID(string, key, settingsMap) \
+ if (!string.isNull()) { settingsMap[key] = (TQT_DBusData::fromString(string)).getAsVariantData(); } \
+ else { settingsMap.remove(key); }
#define NM_ASYNC_TIMEOUT_MS 1000
// Give the user 5 minutes to authenticate to DBUS before timing out
@@ -47,9 +48,6 @@
// #define WAIT_FOR_OPERATION_BEFORE_RETURNING 1
#define USE_ASYNC_DBUS_CONNECTION_COMMAND_CALLS 1
-// Defined in tdehardwaredevices.cpp
-TQT_DBusData convertDBUSDataToVariantData(TQT_DBusData);
-
TQ_UINT32 reverseIPV4ByteOrder(TQ_UINT32 address) {
TQ_UINT32 ret;
unsigned char valuearray[4];
@@ -3358,7 +3356,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
{
TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap();
{
- settingsMap["id"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->friendlyName));
+ settingsMap["id"] = (TQT_DBusData::fromString(connection->friendlyName)).getAsVariantData();
{
TQString type;
if (ethernetConnection) type = "802-3-ethernet";
@@ -3377,9 +3375,9 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
type = "gsm";
}
}
- if (!type.isNull()) settingsMap["type"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(type));
+ if (!type.isNull()) settingsMap["type"] = (TQT_DBusData::fromString(type)).getAsVariantData();
}
- settingsMap["uuid"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->UUID));
+ settingsMap["uuid"] = (TQT_DBusData::fromString(connection->UUID)).getAsVariantData();
{
TQT_DBusDataValueList valueList;
{
@@ -3388,18 +3386,18 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(assembledString));
}
}
- if (valueList.count() > 0) settingsMap["permissions"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["permissions"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("permissions");
}
- settingsMap["autoconnect"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->autoConnect));
- settingsMap["read-only"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->readOnly));
+ settingsMap["autoconnect"] = (TQT_DBusData::fromBool(connection->autoConnect)).getAsVariantData();
+ settingsMap["read-only"] = (TQT_DBusData::fromBool(connection->readOnly)).getAsVariantData();
UPDATE_STRING_SETTING_IF_VALID(connection->masterConnectionUUID, "master", settingsMap)
{
TQString slaveType = tdeSlaveTypeToNMSlaveType(connection->slaveType);
- if (slaveType != "") settingsMap["slave-type"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(slaveType));
+ if (slaveType != "") settingsMap["slave-type"] = (TQT_DBusData::fromString(slaveType)).getAsVariantData();
else settingsMap.remove("slave-type");
}
- // settingsMap["timestamp"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt64(connection->lastKnownConnection.toTime_t())); // Probably read-only to us
+ // settingsMap["timestamp"] = (TQT_DBusData::fromUInt64(connection->lastKnownConnection.toTime_t())).getAsVariantData(); // Probably read-only to us
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
groupValid = (settingsMap.count() > 0);
@@ -3418,7 +3416,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// EAP type
valueList.append(TQT_DBusData::fromString(tdeEAPTypeToNMEAPType(connection->eapConfig.type)));
}
- settingsMap["eap"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["eap"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
else {
settingsMap.remove("eap");
@@ -3441,7 +3439,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.caCertificate[count]));
}
}
- if (valueList.count() > 0) settingsMap["ca-cert"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["ca-cert"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("ca-cert");
}
else {
@@ -3462,7 +3460,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(*it));
}
}
- if (valueList.count() > 0) settingsMap["altsubject-matches"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["altsubject-matches"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("altsubject-matches");
}
else {
@@ -3476,7 +3474,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.clientCertificate[count]));
}
}
- if (valueList.count() > 0) settingsMap["client-cert"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["client-cert"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("client-cert");
}
else {
@@ -3493,8 +3491,8 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
settingsMap.remove("phase1-fast-provisioning");
}
if (connection->eapConfig.valid) {
- settingsMap["phase2-auth"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(tdeEAPTypeToNMEAPType(connection->eapConfig.phase2NonEAPAuthMethod)));
- settingsMap["phase2-autheap"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(tdeEAPTypeToNMEAPType(connection->eapConfig.phase2EAPAuthMethod)));
+ settingsMap["phase2-auth"] = (TQT_DBusData::fromString(tdeEAPTypeToNMEAPType(connection->eapConfig.phase2NonEAPAuthMethod))).getAsVariantData();
+ settingsMap["phase2-autheap"] = (TQT_DBusData::fromString(tdeEAPTypeToNMEAPType(connection->eapConfig.phase2EAPAuthMethod))).getAsVariantData();
}
else {
settingsMap.remove("phase2-auth");
@@ -3508,7 +3506,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.phase2CaCertificate[count]));
}
}
- if (valueList.count() > 0) settingsMap["phase2-ca-cert"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["phase2-ca-cert"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("phase2-ca-cert");
}
else {
@@ -3529,7 +3527,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(*it));
}
}
- if (valueList.count() > 0) settingsMap["phase2-altsubject-matches"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["phase2-altsubject-matches"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("phase2-altsubject-matches");
}
else {
@@ -3543,15 +3541,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.phase2ClientCertificate[count]));
}
}
- if (valueList.count() > 0) settingsMap["phase2-client-cert"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["phase2-client-cert"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("phase2-client-cert");
}
else {
settingsMap.remove("phase2-client-cert");
}
if (connection->eapConfig.valid) {
- settingsMap["password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.passwordFlags)));
- settingsMap["password-raw-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.binaryPasswordFlags)));
+ settingsMap["password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.passwordFlags))).getAsVariantData();
+ settingsMap["password-raw-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.binaryPasswordFlags))).getAsVariantData();
}
else {
settingsMap.remove("password-flags");
@@ -3565,14 +3563,14 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.privateKey[count]));
}
}
- if (valueList.count() > 0) settingsMap["private-key"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["private-key"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("private-key");
}
else {
settingsMap.remove("private-key");
}
if (connection->eapConfig.valid) {
- settingsMap["private-key-password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.privateKeyPasswordFlags)));
+ settingsMap["private-key-password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.privateKeyPasswordFlags))).getAsVariantData();
}
else {
settingsMap.remove("private-key-password-flags");
@@ -3585,26 +3583,26 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.phase2PrivateKey[count]));
}
}
- if (valueList.count() > 0) settingsMap["phase2-private-key"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["phase2-private-key"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("phase2-private-key");
}
else {
settingsMap.remove("phase2-private-key");
}
if (connection->eapConfig.valid) {
- settingsMap["phase2-private-key-password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.phase2PrivateKeyPasswordFlags)));
+ settingsMap["phase2-private-key-password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->eapConfig.phase2PrivateKeyPasswordFlags))).getAsVariantData();
}
else {
settingsMap.remove("phase2-private-key-password-flags");
}
if (connection->eapConfig.valid) {
- settingsMap["system-ca-certs"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->eapConfig.forceSystemCaCertificates));
+ settingsMap["system-ca-certs"] = (TQT_DBusData::fromBool(connection->eapConfig.forceSystemCaCertificates)).getAsVariantData();
}
else {
settingsMap.remove("system-ca-certs");
}
if (connection->eapConfig.secretsValid) {
- settingsMap["password"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->eapConfig.password));
+ settingsMap["password"] = (TQT_DBusData::fromString(connection->eapConfig.password)).getAsVariantData();
}
else {
settingsMap.remove("password");
@@ -3617,15 +3615,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromByte(connection->eapConfig.binaryPassword[count]));
}
}
- if (valueList.count() > 0) settingsMap["password-raw"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["password-raw"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("password-raw");
}
else {
settingsMap.remove("password-raw");
}
if (connection->eapConfig.secretsValid) {
- settingsMap["private-key-password"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->eapConfig.privateKeyPassword));
- settingsMap["phase2-private-key-password"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->eapConfig.phase2PrivateKeyPassword));
+ settingsMap["private-key-password"] = (TQT_DBusData::fromString(connection->eapConfig.privateKeyPassword)).getAsVariantData();
+ settingsMap["phase2-private-key-password"] = (TQT_DBusData::fromString(connection->eapConfig.phase2PrivateKeyPassword)).getAsVariantData();
}
else {
settingsMap.remove("private-key-password");
@@ -3642,7 +3640,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (ethernetConnection) {
TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap();
{
- settingsMap["duplex"] = convertDBUSDataToVariantData(TQT_DBusData::fromString((connection->fullDuplex)?"full":"half"));
+ settingsMap["duplex"] = (TQT_DBusData::fromString((connection->fullDuplex)?"full":"half")).getAsVariantData();
if (connection->lockedHWAddress.isValid()) {
TDENetworkByteList address = connection->lockedHWAddress.address();
TQT_DBusDataValueList valueList;
@@ -3652,7 +3650,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("mac-address");
@@ -3666,13 +3664,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["cloned-mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["cloned-mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("cloned-mac-address");
}
if (connection->mtu > 0) {
- settingsMap["mtu"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->mtu));
+ settingsMap["mtu"] = (TQT_DBusData::fromUInt32(connection->mtu)).getAsVariantData();
}
else {
settingsMap.remove("mtu");
@@ -3697,13 +3695,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("mac-address");
}
if (connection->mtu > 0) {
- settingsMap["mtu"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->mtu));
+ settingsMap["mtu"] = (TQT_DBusData::fromUInt32(connection->mtu)).getAsVariantData();
}
else {
settingsMap.remove("mtu");
@@ -3727,7 +3725,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData::fromByte(wiFiConnection->SSID[i]);
valueList.append(innerDataValue);
}
- settingsMap["ssid"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["ssid"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
if (connection->lockedHWAddress.isValid()) {
TDENetworkByteList address = connection->lockedHWAddress.address();
@@ -3738,7 +3736,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("mac-address");
@@ -3752,13 +3750,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["cloned-mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["cloned-mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("cloned-mac-address");
}
if (connection->mtu > 0) {
- settingsMap["mtu"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->mtu));
+ settingsMap["mtu"] = (TQT_DBusData::fromUInt32(connection->mtu)).getAsVariantData();
}
else {
settingsMap.remove("mtu");
@@ -3766,19 +3764,19 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
UPDATE_STRING_SETTING_IF_VALID(tdeWiFiModeToNMWiFiMode(wiFiConnection->operatingMode), "mode", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(tdeWiFiFrequencyBandToNMWiFiFrequencyBand(wiFiConnection->bandRestriction), "band", settingsMap)
if (wiFiConnection->channelRestriction > 0) {
- settingsMap["channel"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->channelRestriction));
+ settingsMap["channel"] = (TQT_DBusData::fromUInt32(wiFiConnection->channelRestriction)).getAsVariantData();
}
else {
settingsMap.remove("channel");
}
if (wiFiConnection->bitRateRestriction > 0) {
- settingsMap["rate"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->bitRateRestriction/1000));
+ settingsMap["rate"] = (TQT_DBusData::fromUInt32(wiFiConnection->bitRateRestriction/1000)).getAsVariantData();
}
else {
settingsMap.remove("rate");
}
if (wiFiConnection->powerRestriction > 0) {
- settingsMap["tx-power"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->powerRestriction));
+ settingsMap["tx-power"] = (TQT_DBusData::fromUInt32(wiFiConnection->powerRestriction)).getAsVariantData();
}
else {
settingsMap.remove("tx-power");
@@ -3792,7 +3790,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["bssid"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["bssid"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("bssid");
@@ -3803,7 +3801,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for (it = wiFiConnection->blacklistedBSSIDs.begin(); it != wiFiConnection->blacklistedBSSIDs.end(); ++it) {
valueList.append(TQT_DBusData::fromString((*it).toString()));
}
- if (valueList.count() > 0) settingsMap["mac-address-blacklist"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["mac-address-blacklist"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
{
TQT_DBusDataValueList valueList;
@@ -3811,11 +3809,11 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for (it = wiFiConnection->heardBSSIDs.begin(); it != wiFiConnection->heardBSSIDs.end(); ++it) {
valueList.append(TQT_DBusData::fromString((*it).toString()));
}
- if (valueList.count() > 0) settingsMap["seen-bssids"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["seen-bssids"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
{
if (wiFiConnection->securityRequired) {
- settingsMap["security"] = convertDBUSDataToVariantData(TQT_DBusData::fromString("802-11-wireless-security"));
+ settingsMap["security"] = (TQT_DBusData::fromString("802-11-wireless-security")).getAsVariantData();
}
else {
settingsMap.remove("security");
@@ -3823,7 +3821,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
}
{
if (wiFiConnection->isHiddenNetwork) {
- settingsMap["hidden"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(true));
+ settingsMap["hidden"] = (TQT_DBusData::fromBool(true)).getAsVariantData();
}
else {
settingsMap.remove("hidden");
@@ -3842,10 +3840,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
{
if (wiFiConnection->securityRequired) {
if (wiFiConnection->securityRequired) {
- settingsMap["key-mgmt"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(tdeWiFiKeyTypeToNMWiFiKeyType(wiFiConnection->securitySettings.keyType)));
+ settingsMap["key-mgmt"] = (TQT_DBusData::fromString(tdeWiFiKeyTypeToNMWiFiKeyType(wiFiConnection->securitySettings.keyType))).getAsVariantData();
}
if (wiFiConnection->securitySettings.wepKeyIndex > 0) {
- settingsMap["wep-tx-keyidx"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->securitySettings.wepKeyIndex));
+ settingsMap["wep-tx-keyidx"] = (TQT_DBusData::fromUInt32(wiFiConnection->securitySettings.wepKeyIndex)).getAsVariantData();
}
else {
settingsMap.remove("wep-tx-keyidx");
@@ -3859,7 +3857,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(*it));
}
}
- if (valueList.count() > 0) settingsMap["proto"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["proto"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("proto");
}
{
@@ -3875,7 +3873,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it)));
}
}
- if (valueList.count() > 0) settingsMap["pairwise"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["pairwise"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("pairwise");
}
{
@@ -3891,14 +3889,14 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it)));
}
}
- if (valueList.count() > 0) settingsMap["group"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["group"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
else settingsMap.remove("group");
}
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.leapUsername, "leap-username", settingsMap)
- settingsMap["wep-key-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.wepKeyFlags)));
- settingsMap["wep-key-type"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdeWepKeyTypeToNMWepKeyType(wiFiConnection->securitySettings.wepKeyType)));
- settingsMap["psk-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.pskFlags)));
- settingsMap["leap-password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.leapPasswordFlags)));
+ settingsMap["wep-key-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.wepKeyFlags))).getAsVariantData();
+ settingsMap["wep-key-type"] = (TQT_DBusData::fromUInt32(tdeWepKeyTypeToNMWepKeyType(wiFiConnection->securitySettings.wepKeyType))).getAsVariantData();
+ settingsMap["psk-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.pskFlags))).getAsVariantData();
+ settingsMap["leap-password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.leapPasswordFlags))).getAsVariantData();
if (wiFiConnection->securitySettings.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey0, "wep-key0", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey1, "wep-key1", settingsMap)
@@ -3960,7 +3958,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for (it = vpnConnection->pluginData.begin(); it != vpnConnection->pluginData.end(); ++it) {
nestedConnectionSettingsMap[it.key()] = TQT_DBusData::fromString(it.data());
}
- if (nestedConnectionSettingsMap.count() > 0) settingsMap["data"] = convertDBUSDataToVariantData(TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(nestedConnectionSettingsMap)));
+ if (nestedConnectionSettingsMap.count() > 0) settingsMap["data"] = (TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(nestedConnectionSettingsMap))).getAsVariantData();
else settingsMap.remove("data");
}
if (vpnConnection->secretsValid) {
@@ -3969,7 +3967,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for (it = vpnConnection->pluginSecrets.begin(); it != vpnConnection->pluginSecrets.end(); ++it) {
nestedConnectionSettingsMap[it.key()] = TQT_DBusData::fromString(it.data());
}
- if (nestedConnectionSettingsMap.count() > 0) settingsMap["secrets"] = convertDBUSDataToVariantData(TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(nestedConnectionSettingsMap)));
+ if (nestedConnectionSettingsMap.count() > 0) settingsMap["secrets"] = (TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(nestedConnectionSettingsMap))).getAsVariantData();
else settingsMap.remove("secrets");
}
}
@@ -3992,7 +3990,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["mac-address"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["mac-address"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("mac-address");
@@ -4011,15 +4009,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
{
UPDATE_STRING_SETTING_IF_VALID(vlanConnection->kernelName, "interface-name", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(vlanConnection->parentConnectionUUID, "parent", settingsMap)
- settingsMap["id"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(vlanConnection->vlanID));
- settingsMap["flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdeVLANFlagsToNMVLANFlags(vlanConnection->vlanFlags)));
+ settingsMap["id"] = (TQT_DBusData::fromUInt32(vlanConnection->vlanID)).getAsVariantData();
+ settingsMap["flags"] = (TQT_DBusData::fromUInt32(tdeVLANFlagsToNMVLANFlags(vlanConnection->vlanFlags))).getAsVariantData();
{
TQT_DBusDataValueList valueList;
TDENetworkPriorityMap::const_iterator it;
for (it = vlanConnection->ingressPriorityMap.begin(); it != vlanConnection->ingressPriorityMap.end(); ++it) {
valueList.append(TQT_DBusData::fromString(TQString("%1:%2").arg(it.key()).arg(it.data())));
}
- if (valueList.count() > 0) settingsMap["ingress-priority-map"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["ingress-priority-map"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
{
TQT_DBusDataValueList valueList;
@@ -4027,7 +4025,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for (it = vlanConnection->egressPriorityMap.begin(); it != vlanConnection->egressPriorityMap.end(); ++it) {
valueList.append(TQT_DBusData::fromString(TQString("%1:%2").arg(it.key()).arg(it.data())));
}
- if (valueList.count() > 0) settingsMap["egress-priority-map"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["egress-priority-map"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
@@ -4040,11 +4038,11 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (connection->serialConfig.valid) {
TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap();
{
- settingsMap["baud"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->serialConfig.baudRate));
- settingsMap["bits"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->serialConfig.byteWidth));
- settingsMap["parity"] = convertDBUSDataToVariantData(TQT_DBusData::fromByte(tdeParityToNMParity(connection->serialConfig.parity)));
- settingsMap["stopbits"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->serialConfig.stopBits));
- settingsMap["send-delay"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt64(connection->serialConfig.txDelay));
+ settingsMap["baud"] = (TQT_DBusData::fromUInt32(connection->serialConfig.baudRate)).getAsVariantData();
+ settingsMap["bits"] = (TQT_DBusData::fromUInt32(connection->serialConfig.byteWidth)).getAsVariantData();
+ settingsMap["parity"] = (TQT_DBusData::fromByte(tdeParityToNMParity(connection->serialConfig.parity))).getAsVariantData();
+ settingsMap["stopbits"] = (TQT_DBusData::fromUInt32(connection->serialConfig.stopBits)).getAsVariantData();
+ settingsMap["send-delay"] = (TQT_DBusData::fromUInt64(connection->serialConfig.txDelay)).getAsVariantData();
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
groupValid = (settingsMap.count() > 0);
@@ -4056,40 +4054,40 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (connection->pppConfig.valid) {
TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap();
{
- settingsMap["noauth"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->pppConfig.requireServerAuthentication)));
- settingsMap["refuse-eap"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableEAP));
- settingsMap["refuse-pap"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisablePAP));
- settingsMap["refuse-chap"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableCHAP));
- settingsMap["refuse-mschap"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableMSCHAP));
- settingsMap["refuse-mschapv2"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableMSCHAPv2));
- settingsMap["nobsdcomp"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowBSDCompression)));
- settingsMap["nodeflate"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowDeflateCompression)));
- settingsMap["no-vj-comp"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowVJCompression)));
- settingsMap["require-mppe"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::RequireMPPE));
- settingsMap["require-mppe-128"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::RequireMPPE128));
- settingsMap["mppe-stateful"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::StatefulMPPE));
- settingsMap["crtscts"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::UseHardwareFlowControl));
- settingsMap["baud"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->pppConfig.baudRate));
+ settingsMap["noauth"] = (TQT_DBusData::fromBool(!(connection->pppConfig.requireServerAuthentication))).getAsVariantData();
+ settingsMap["refuse-eap"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableEAP)).getAsVariantData();
+ settingsMap["refuse-pap"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisablePAP)).getAsVariantData();
+ settingsMap["refuse-chap"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableCHAP)).getAsVariantData();
+ settingsMap["refuse-mschap"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableMSCHAP)).getAsVariantData();
+ settingsMap["refuse-mschapv2"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::DisableMSCHAPv2)).getAsVariantData();
+ settingsMap["nobsdcomp"] = (TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowBSDCompression))).getAsVariantData();
+ settingsMap["nodeflate"] = (TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowDeflateCompression))).getAsVariantData();
+ settingsMap["no-vj-comp"] = (TQT_DBusData::fromBool(!(connection->pppConfig.flags & TDENetworkPPPFlags::AllowVJCompression))).getAsVariantData();
+ settingsMap["require-mppe"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::RequireMPPE)).getAsVariantData();
+ settingsMap["require-mppe-128"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::RequireMPPE128)).getAsVariantData();
+ settingsMap["mppe-stateful"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::StatefulMPPE)).getAsVariantData();
+ settingsMap["crtscts"] = (TQT_DBusData::fromBool(connection->pppConfig.flags & TDENetworkPPPFlags::UseHardwareFlowControl)).getAsVariantData();
+ settingsMap["baud"] = (TQT_DBusData::fromUInt32(connection->pppConfig.baudRate)).getAsVariantData();
if (connection->pppConfig.mru > 0) {
- settingsMap["mru"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->pppConfig.mru));
+ settingsMap["mru"] = (TQT_DBusData::fromUInt32(connection->pppConfig.mru)).getAsVariantData();
}
else {
settingsMap.remove("mru");
}
if (connection->pppConfig.mtu > 0) {
- settingsMap["mtu"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->pppConfig.mtu));
+ settingsMap["mtu"] = (TQT_DBusData::fromUInt32(connection->pppConfig.mtu)).getAsVariantData();
}
else {
settingsMap.remove("mtu");
}
if (connection->pppConfig.mtu > 0) {
- settingsMap["lcp-echo-interval"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->pppConfig.lcpEchoPingInterval));
+ settingsMap["lcp-echo-interval"] = (TQT_DBusData::fromUInt32(connection->pppConfig.lcpEchoPingInterval)).getAsVariantData();
}
else {
settingsMap.remove("lcp-echo-interval");
}
if (connection->pppConfig.mtu > 0) {
- settingsMap["lcp-echo-failure"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(connection->pppConfig.lcpEchoFailureThreshold));
+ settingsMap["lcp-echo-failure"] = (TQT_DBusData::fromUInt32(connection->pppConfig.lcpEchoFailureThreshold)).getAsVariantData();
}
else {
settingsMap.remove("lcp-echo-failure");
@@ -4110,7 +4108,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (connection->pppoeConfig.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(connection->pppoeConfig.password, "password", settingsMap)
}
- settingsMap["password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->pppoeConfig.passwordFlags)));
+ settingsMap["password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(connection->pppoeConfig.passwordFlags))).getAsVariantData();
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
groupValid = (settingsMap.count() > 0);
@@ -4129,9 +4127,9 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData::fromByte(olpcMeshConnection->SSID[i]);
valueList.append(innerDataValue);
}
- settingsMap["ssid"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["ssid"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
- settingsMap["channel"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(olpcMeshConnection->channel));
+ settingsMap["channel"] = (TQT_DBusData::fromUInt32(olpcMeshConnection->channel)).getAsVariantData();
{
unsigned int i;
TQT_DBusDataValueList valueList;
@@ -4139,7 +4137,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData::fromByte(olpcMeshConnection->anycastDHCPHWAddress[i]);
valueList.append(innerDataValue);
}
- settingsMap["dhcp-anycast-address"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["dhcp-anycast-address"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
@@ -4161,7 +4159,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(innerDataValue);
}
TQT_DBusData nmHWAddress = TQT_DBusData::fromTQValueList(valueList);
- settingsMap["bdaddr"] = convertDBUSDataToVariantData(nmHWAddress);
+ settingsMap["bdaddr"] = (nmHWAddress).getAsVariantData();
}
else {
settingsMap.remove("bdaddr");
@@ -4183,7 +4181,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (connection->pppoeConfig.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(modemConnection->cdmaConfig.password, "password", settingsMap)
}
- settingsMap["password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->cdmaConfig.passwordFlags)));
+ settingsMap["password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->cdmaConfig.passwordFlags))).getAsVariantData();
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
groupValid = (settingsMap.count() > 0);
@@ -4200,16 +4198,16 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (connection->pppoeConfig.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(modemConnection->gsmConfig.password, "password", settingsMap)
}
- settingsMap["password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->gsmConfig.passwordFlags)));
+ settingsMap["password-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->gsmConfig.passwordFlags))).getAsVariantData();
UPDATE_STRING_SETTING_IF_VALID(modemConnection->gsmConfig.accessPointName, "apn", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(modemConnection->gsmConfig.networkID, "network-id", settingsMap)
- settingsMap["network-type"] = convertDBUSDataToVariantData(TQT_DBusData::fromInt32(tdeGSMModeToNMGSMMode(modemConnection->gsmConfig.networkType)));
+ settingsMap["network-type"] = (TQT_DBusData::fromInt32(tdeGSMModeToNMGSMMode(modemConnection->gsmConfig.networkType))).getAsVariantData();
if (connection->pppoeConfig.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(modemConnection->gsmConfig.pin, "pin", settingsMap)
}
- settingsMap["pin-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->gsmConfig.pinFlags)));
- settingsMap["allowed-bands"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(modemConnection->gsmConfig.allowedFrequencyBands));
- settingsMap["home-only"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(modemConnection->gsmConfig.allowRoaming)));
+ settingsMap["pin-flags"] = (TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(modemConnection->gsmConfig.pinFlags))).getAsVariantData();
+ settingsMap["allowed-bands"] = (TQT_DBusData::fromUInt32(modemConnection->gsmConfig.allowedFrequencyBands)).getAsVariantData();
+ settingsMap["home-only"] = (TQT_DBusData::fromBool(!(modemConnection->gsmConfig.allowRoaming))).getAsVariantData();
}
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
groupValid = (settingsMap.count() > 0);
@@ -4241,15 +4239,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList;
valueList = TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::UInt32));
- settingsMap["addresses"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(valueList)));
+ settingsMap["addresses"] = (TQT_DBusData::fromList(TQT_DBusDataList(valueList))).getAsVariantData();
}
else {
- settingsMap["addresses"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["addresses"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
{
if (!connection->ipConfig.dhcpClientIdentifier.isNull()) {
- settingsMap["dhcp-client-id"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(connection->ipConfig.dhcpClientIdentifier));
+ settingsMap["dhcp-client-id"] = (TQT_DBusData::fromString(connection->ipConfig.dhcpClientIdentifier)).getAsVariantData();
}
}
{
@@ -4262,10 +4260,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
}
if (valueList.count() <= 0) {
// Create an empty list with the correct DBUS type structure
- settingsMap["dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::UInt32)));
+ settingsMap["dns"] = (TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::UInt32))).getAsVariantData();
}
else {
- settingsMap["dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["dns"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
{
@@ -4276,13 +4274,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString((*it).searchDomain()));
}
}
- if (valueList.count() > 0) settingsMap["dns-search"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["dns-search"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
{
- settingsMap["ignore-auto-dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPDNS)));
+ settingsMap["ignore-auto-dns"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPDNS))).getAsVariantData();
}
{
- settingsMap["may-fail"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!connection->requireIPV4));
+ settingsMap["may-fail"] = (TQT_DBusData::fromBool(!connection->requireIPV4)).getAsVariantData();
}
{
TQString method;
@@ -4302,13 +4300,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
method = "manual";
}
if (!method.isNull())
- settingsMap["method"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(method));
+ settingsMap["method"] = (TQT_DBusData::fromString(method)).getAsVariantData();
}
{
- settingsMap["ignore-auto-routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPRoutes)));
+ settingsMap["ignore-auto-routes"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPRoutes))).getAsVariantData();
}
{
- settingsMap["never-default"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4MayUseAsDefaultRoute)));
+ settingsMap["never-default"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4MayUseAsDefaultRoute))).getAsVariantData();
}
{
TQT_DBusDataValueList valueList;
@@ -4332,10 +4330,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList;
valueList = TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::UInt32));
- settingsMap["routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(valueList)));
+ settingsMap["routes"] = (TQT_DBusData::fromList(TQT_DBusDataList(valueList))).getAsVariantData();
}
else {
- settingsMap["routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["routes"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
}
@@ -4393,10 +4391,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
innerMostValueList.clear();
innerMostValueList.append(TQT_DBusData::fromByte(0));
innerValueList.append(TQT_DBusData::fromTQValueList(innerMostValueList));
- settingsMap["addresses"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::fromStruct(innerValueList))));
+ settingsMap["addresses"] = (TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::fromStruct(innerValueList)))).getAsVariantData();
}
else {
- settingsMap["addresses"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["addresses"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
{
@@ -4418,10 +4416,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList;
valueList = TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::Byte));
- settingsMap["dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(valueList)));
+ settingsMap["dns"] = (TQT_DBusData::fromList(TQT_DBusDataList(valueList))).getAsVariantData();
}
else {
- settingsMap["dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["dns"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
{
@@ -4432,13 +4430,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList.append(TQT_DBusData::fromString((*it).searchDomain()));
}
}
- if (valueList.count() > 0) settingsMap["dns-search"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ if (valueList.count() > 0) settingsMap["dns-search"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
{
- settingsMap["ignore-auto-dns"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPDNS)));
+ settingsMap["ignore-auto-dns"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV4DHCPDNS))).getAsVariantData();
}
{
- settingsMap["may-fail"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!connection->requireIPV6));
+ settingsMap["may-fail"] = (TQT_DBusData::fromBool(!connection->requireIPV6)).getAsVariantData();
}
{
TQString method;
@@ -4458,13 +4456,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
method = "manual";
}
if (!method.isNull())
- settingsMap["method"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(method));
+ settingsMap["method"] = (TQT_DBusData::fromString(method)).getAsVariantData();
}
{
- settingsMap["ignore-auto-routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV6DHCPRoutes)));
+ settingsMap["ignore-auto-routes"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV6DHCPRoutes))).getAsVariantData();
}
{
- settingsMap["never-default"] = convertDBUSDataToVariantData(TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV6MayUseAsDefaultRoute)));
+ settingsMap["never-default"] = (TQT_DBusData::fromBool(!(connection->ipConfig.connectionFlags & TDENetworkIPConfigurationFlags::IPV6MayUseAsDefaultRoute))).getAsVariantData();
}
{
TQT_DBusDataValueList valueList;
@@ -4514,10 +4512,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
innerValueList.append(TQT_DBusData::fromTQValueList(innerMostValueList));
// Metric
innerValueList.append(TQT_DBusData::fromUInt32(0));
- settingsMap["routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::fromStruct(innerValueList))));
+ settingsMap["routes"] = (TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::fromStruct(innerValueList)))).getAsVariantData();
}
else {
- settingsMap["routes"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
+ settingsMap["routes"] = (TQT_DBusData::fromTQValueList(valueList)).getAsVariantData();
}
}
}
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 08cb1c80b..6267ad07d 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -119,20 +119,6 @@ unsigned int reverse_bits(register unsigned int x)
// Helper function implemented in tdestoragedevice.cpp
TQString decodeHexEncoding(TQString str);
-#if defined(WITH_TDEHWLIB_DAEMONS) || defined(WITH_UDISKS) || defined(WITH_UDISKS2) || defined(WITH_NETWORK_MANAGER_BACKEND)
-#include <tqdbusvariant.h>
-#include <tqdbusdata.h>
-// Convenience method for tdehwlib DBUS calls
-// FIXME
-// Should probably be part of dbus-1-tqt
-TQT_DBusData convertDBUSDataToVariantData(TQT_DBusData object) {
- TQT_DBusVariant variant;
- variant.value = object;
- variant.signature = variant.value.buildDBusSignature();
- return TQT_DBusData::fromVariant(variant);
-}
-#endif // defined(WITH_UDISKS) || defined(WITH_UDISKS2) || defined(WITH_NETWORK_MANAGER_BACKEND)
-
TDEHardwareDevices::TDEHardwareDevices() {
// Initialize members
pci_id_map = 0;
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index 6c82efb2b..7dd236524 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -70,11 +70,6 @@
#include "tqdbusdatalist.h"
#endif // ddefined(WITH_UDISKS)
-#if defined(WITH_UDISKS) || defined(WITH_UDISKS2)
- // Defined in tdehardwaredevices.cpp
- TQT_DBusData convertDBUSDataToVariantData(TQT_DBusData);
-#endif // defined(WITH_UDISKS) || defined(WITH_UDISKS2)
-
TDEStorageDevice::TDEStorageDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn) : TDEGenericDevice(dt, dn), m_mediaInserted(true), m_cryptDevice(NULL) {
m_diskType = TDEDiskDeviceType::Null;
m_diskStatus = TDEDiskDeviceStatus::Null;
@@ -480,9 +475,9 @@ int mountDriveUDisks2(TQString deviceNode, TQString fileSystemType, TQString mou
TQValueList<TQT_DBusData> params;
TQMap<TQString, TQT_DBusData> optionsMap;
if (fileSystemType != "") {
- optionsMap["fstype"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(fileSystemType));
+ optionsMap["fstype"] = (TQT_DBusData::fromString(fileSystemType)).getAsVariantData();
}
- optionsMap["options"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(mountOptions));
+ optionsMap["options"] = (TQT_DBusData::fromString(mountOptions)).getAsVariantData();
params << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(optionsMap));
TQT_DBusMessage reply = driveControl.sendWithReply("Mount", params, &error);
if (error.isValid()) {
@@ -566,7 +561,7 @@ int unMountDriveUDisks2(TQString deviceNode, TQString unMountOptions, TQString*
if (driveControl.canSend()) {
TQValueList<TQT_DBusData> params;
TQMap<TQString, TQT_DBusData> optionsMap;
- optionsMap["options"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(unMountOptions));
+ optionsMap["options"] = (TQT_DBusData::fromString(unMountOptions)).getAsVariantData();
params << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(optionsMap));
TQT_DBusMessage reply = driveControl.sendWithReply("Unmount", params, &error);
if (error.isValid()) {