@ -37,8 +37,9 @@
# define PRINT_WARNING(x)
# define PRINT_WARNING(x)
# endif
# endif
# define UPDATE_STRING_SETTING_IF_VALID(string, key, settingsMap) if (!string.isNull()) settingsMap[key] = convertDBUSDataToVariantData(TQT_DBusData::fromString(string)); \
# define UPDATE_STRING_SETTING_IF_VALID(string, key, settingsMap) \
else settingsMap . remove ( key ) ;
if ( ! string . isNull ( ) ) { settingsMap [ key ] = ( TQT_DBusData : : fromString ( string ) ) . getAsVariantData ( ) ; } \
else { settingsMap . remove ( key ) ; }
# define NM_ASYNC_TIMEOUT_MS 1000
# define NM_ASYNC_TIMEOUT_MS 1000
// Give the user 5 minutes to authenticate to DBUS before timing out
// Give the user 5 minutes to authenticate to DBUS before timing out
@ -47,9 +48,6 @@
// #define WAIT_FOR_OPERATION_BEFORE_RETURNING 1
// #define WAIT_FOR_OPERATION_BEFORE_RETURNING 1
# define USE_ASYNC_DBUS_CONNECTION_COMMAND_CALLS 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 reverseIPV4ByteOrder ( TQ_UINT32 address ) {
TQ_UINT32 ret ;
TQ_UINT32 ret ;
unsigned char valuearray [ 4 ] ;
unsigned char valuearray [ 4 ] ;
@ -3358,7 +3356,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
{
{
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
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 ;
TQString type ;
if ( ethernetConnection ) type = " 802-3-ethernet " ;
if ( ethernetConnection ) type = " 802-3-ethernet " ;
@ -3377,9 +3375,9 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
type = " gsm " ;
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 ;
TQT_DBusDataValueList valueList ;
{
{
@ -3388,18 +3386,18 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( assembledString ) ) ;
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 " ) ;
else settingsMap . remove ( " permissions " ) ;
}
}
settingsMap [ " autoconnect " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > autoConnect ) ) ;
settingsMap [ " autoconnect " ] = ( TQT_DBusData : : fromBool ( connection - > autoConnect ) ) . getAsVariantData ( ) ;
settingsMap [ " read-only " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > readOnly ) ) ;
settingsMap [ " read-only " ] = ( TQT_DBusData : : fromBool ( connection - > readOnly ) ) . getAsVariantData ( ) ;
UPDATE_STRING_SETTING_IF_VALID ( connection - > masterConnectionUUID , " master " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( connection - > masterConnectionUUID , " master " , settingsMap )
{
{
TQString slaveType = tdeSlaveTypeToNMSlaveType ( connection - > slaveType ) ;
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 " ) ;
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 ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
@ -3418,7 +3416,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// EAP type
// EAP type
valueList . append ( TQT_DBusData : : fromString ( tdeEAPTypeToNMEAPType ( connection - > eapConfig . 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 {
else {
settingsMap . remove ( " eap " ) ;
settingsMap . remove ( " eap " ) ;
@ -3441,7 +3439,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . caCertificate [ count ] ) ) ;
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 settingsMap . remove ( " ca-cert " ) ;
}
}
else {
else {
@ -3462,7 +3460,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( * it ) ) ;
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 settingsMap . remove ( " altsubject-matches " ) ;
}
}
else {
else {
@ -3476,7 +3474,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . clientCertificate [ count ] ) ) ;
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 settingsMap . remove ( " client-cert " ) ;
}
}
else {
else {
@ -3493,8 +3491,8 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
settingsMap . remove ( " phase1-fast-provisioning " ) ;
settingsMap . remove ( " phase1-fast-provisioning " ) ;
}
}
if ( connection - > eapConfig . valid ) {
if ( connection - > eapConfig . valid ) {
settingsMap [ " phase2-auth " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( tdeEAPTypeToNMEAPType ( connection - > eapConfig . phase2NonEAPAuthMethod ) ) ) ;
settingsMap [ " phase2-auth " ] = ( TQT_DBusData : : fromString ( tdeEAPTypeToNMEAPType ( connection - > eapConfig . phase2NonEAPAuthMethod ) ) ) . getAsVariantData ( ) ;
settingsMap [ " phase2-autheap " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( tdeEAPTypeToNMEAPType ( connection - > eapConfig . phase2EAPAuthMethod ) ) ) ;
settingsMap [ " phase2-autheap " ] = ( TQT_DBusData : : fromString ( tdeEAPTypeToNMEAPType ( connection - > eapConfig . phase2EAPAuthMethod ) ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " phase2-auth " ) ;
settingsMap . remove ( " phase2-auth " ) ;
@ -3508,7 +3506,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . phase2CaCertificate [ count ] ) ) ;
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 settingsMap . remove ( " phase2-ca-cert " ) ;
}
}
else {
else {
@ -3529,7 +3527,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( * it ) ) ;
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 settingsMap . remove ( " phase2-altsubject-matches " ) ;
}
}
else {
else {
@ -3543,15 +3541,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . phase2ClientCertificate [ count ] ) ) ;
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 " ) ;
}
}
else {
else {
settingsMap . remove ( " phase2-client-cert " ) ;
settingsMap . remove ( " phase2-client-cert " ) ;
}
}
if ( connection - > eapConfig . valid ) {
if ( connection - > eapConfig . valid ) {
settingsMap [ " password-flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( connection - > eapConfig . passwordFlags ) ) ) ;
settingsMap [ " password-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( connection - > eapConfig . passwordFlags ) ) ) . getAsVariantData ( ) ;
settingsMap [ " password-raw-flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( connection - > eapConfig . binaryPasswordFlags ) ) ) ;
settingsMap [ " password-raw-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( connection - > eapConfig . binaryPasswordFlags ) ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " password-flags " ) ;
settingsMap . remove ( " password-flags " ) ;
@ -3565,14 +3563,14 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . privateKey [ count ] ) ) ;
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 " ) ;
}
}
else {
else {
settingsMap . remove ( " private-key " ) ;
settingsMap . remove ( " private-key " ) ;
}
}
if ( connection - > eapConfig . valid ) {
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 {
else {
settingsMap . remove ( " private-key-password-flags " ) ;
settingsMap . remove ( " private-key-password-flags " ) ;
@ -3585,26 +3583,26 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . phase2PrivateKey [ count ] ) ) ;
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 " ) ;
}
}
else {
else {
settingsMap . remove ( " phase2-private-key " ) ;
settingsMap . remove ( " phase2-private-key " ) ;
}
}
if ( connection - > eapConfig . valid ) {
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 {
else {
settingsMap . remove ( " phase2-private-key-password-flags " ) ;
settingsMap . remove ( " phase2-private-key-password-flags " ) ;
}
}
if ( connection - > eapConfig . valid ) {
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 {
else {
settingsMap . remove ( " system-ca-certs " ) ;
settingsMap . remove ( " system-ca-certs " ) ;
}
}
if ( connection - > eapConfig . secretsValid ) {
if ( connection - > eapConfig . secretsValid ) {
settingsMap [ " password " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( connection - > eapConfig . password ) ) ;
settingsMap [ " password " ] = ( TQT_DBusData : : fromString ( connection - > eapConfig . password ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " password " ) ;
settingsMap . remove ( " password " ) ;
@ -3617,15 +3615,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromByte ( connection - > eapConfig . binaryPassword [ count ] ) ) ;
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 " ) ;
}
}
else {
else {
settingsMap . remove ( " password-raw " ) ;
settingsMap . remove ( " password-raw " ) ;
}
}
if ( connection - > eapConfig . secretsValid ) {
if ( connection - > eapConfig . secretsValid ) {
settingsMap [ " private-key-password " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( connection - > eapConfig . privateKeyPassword ) ) ;
settingsMap [ " private-key-password " ] = ( TQT_DBusData : : fromString ( connection - > eapConfig . privateKeyPassword ) ) . getAsVariantData ( ) ;
settingsMap [ " phase2-private-key-password " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( connection - > eapConfig . phase2PrivateKeyPassword ) ) ;
settingsMap [ " phase2-private-key-password " ] = ( TQT_DBusData : : fromString ( connection - > eapConfig . phase2PrivateKeyPassword ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " private-key-password " ) ;
settingsMap . remove ( " private-key-password " ) ;
@ -3642,7 +3640,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( ethernetConnection ) {
if ( ethernetConnection ) {
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
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 ( ) ) {
if ( connection - > lockedHWAddress . isValid ( ) ) {
TDENetworkByteList address = connection - > lockedHWAddress . address ( ) ;
TDENetworkByteList address = connection - > lockedHWAddress . address ( ) ;
TQT_DBusDataValueList valueList ;
TQT_DBusDataValueList valueList ;
@ -3652,7 +3650,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mac-address " ) ;
settingsMap . remove ( " mac-address " ) ;
@ -3666,13 +3664,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " cloned-mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " cloned-mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " cloned-mac-address " ) ;
settingsMap . remove ( " cloned-mac-address " ) ;
}
}
if ( connection - > mtu > 0 ) {
if ( connection - > mtu > 0 ) {
settingsMap [ " mtu " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) ;
settingsMap [ " mtu " ] = ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mtu " ) ;
settingsMap . remove ( " mtu " ) ;
@ -3697,13 +3695,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mac-address " ) ;
settingsMap . remove ( " mac-address " ) ;
}
}
if ( connection - > mtu > 0 ) {
if ( connection - > mtu > 0 ) {
settingsMap [ " mtu " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) ;
settingsMap [ " mtu " ] = ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mtu " ) ;
settingsMap . remove ( " mtu " ) ;
@ -3727,7 +3725,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( wiFiConnection - > SSID [ i ] ) ;
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( wiFiConnection - > SSID [ i ] ) ;
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
settingsMap [ " ssid " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromTQValueList ( valueList ) ) ;
settingsMap [ " ssid " ] = ( TQT_DBusData : : fromTQValueList ( valueList ) ) . getAsVariantData ( ) ;
}
}
if ( connection - > lockedHWAddress . isValid ( ) ) {
if ( connection - > lockedHWAddress . isValid ( ) ) {
TDENetworkByteList address = connection - > lockedHWAddress . address ( ) ;
TDENetworkByteList address = connection - > lockedHWAddress . address ( ) ;
@ -3738,7 +3736,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mac-address " ) ;
settingsMap . remove ( " mac-address " ) ;
@ -3752,13 +3750,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " cloned-mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " cloned-mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " cloned-mac-address " ) ;
settingsMap . remove ( " cloned-mac-address " ) ;
}
}
if ( connection - > mtu > 0 ) {
if ( connection - > mtu > 0 ) {
settingsMap [ " mtu " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) ;
settingsMap [ " mtu " ] = ( TQT_DBusData : : fromUInt32 ( connection - > mtu ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mtu " ) ;
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 ( tdeWiFiModeToNMWiFiMode ( wiFiConnection - > operatingMode ) , " mode " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( tdeWiFiFrequencyBandToNMWiFiFrequencyBand ( wiFiConnection - > bandRestriction ) , " band " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( tdeWiFiFrequencyBandToNMWiFiFrequencyBand ( wiFiConnection - > bandRestriction ) , " band " , settingsMap )
if ( wiFiConnection - > channelRestriction > 0 ) {
if ( wiFiConnection - > channelRestriction > 0 ) {
settingsMap [ " channel " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > channelRestriction ) ) ;
settingsMap [ " channel " ] = ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > channelRestriction ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " channel " ) ;
settingsMap . remove ( " channel " ) ;
}
}
if ( wiFiConnection - > bitRateRestriction > 0 ) {
if ( wiFiConnection - > bitRateRestriction > 0 ) {
settingsMap [ " rate " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > bitRateRestriction / 1000 ) ) ;
settingsMap [ " rate " ] = ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > bitRateRestriction / 1000 ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " rate " ) ;
settingsMap . remove ( " rate " ) ;
}
}
if ( wiFiConnection - > powerRestriction > 0 ) {
if ( wiFiConnection - > powerRestriction > 0 ) {
settingsMap [ " tx-power " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > powerRestriction ) ) ;
settingsMap [ " tx-power " ] = ( TQT_DBusData : : fromUInt32 ( wiFiConnection - > powerRestriction ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " tx-power " ) ;
settingsMap . remove ( " tx-power " ) ;
@ -3792,7 +3790,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " bssid " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " bssid " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " bssid " ) ;
settingsMap . remove ( " bssid " ) ;
@ -3803,7 +3801,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for ( it = wiFiConnection - > blacklistedBSSIDs . begin ( ) ; it ! = wiFiConnection - > blacklistedBSSIDs . end ( ) ; + + it ) {
for ( it = wiFiConnection - > blacklistedBSSIDs . begin ( ) ; it ! = wiFiConnection - > blacklistedBSSIDs . end ( ) ; + + it ) {
valueList . append ( TQT_DBusData : : fromString ( ( * it ) . toString ( ) ) ) ;
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 ;
TQT_DBusDataValueList valueList ;
@ -3811,11 +3809,11 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for ( it = wiFiConnection - > heardBSSIDs . begin ( ) ; it ! = wiFiConnection - > heardBSSIDs . end ( ) ; + + it ) {
for ( it = wiFiConnection - > heardBSSIDs . begin ( ) ; it ! = wiFiConnection - > heardBSSIDs . end ( ) ; + + it ) {
valueList . append ( TQT_DBusData : : fromString ( ( * it ) . toString ( ) ) ) ;
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 ) {
if ( wiFiConnection - > securityRequired ) {
settingsMap [ " security " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromString ( " 802-11-wireless-security " ) ) ;
settingsMap [ " security " ] = ( TQT_DBusData : : fromString ( " 802-11-wireless-security " ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " security " ) ;
settingsMap . remove ( " security " ) ;
@ -3823,7 +3821,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
}
}
{
{
if ( wiFiConnection - > isHiddenNetwork ) {
if ( wiFiConnection - > isHiddenNetwork ) {
settingsMap [ " hidden " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( true ) ) ;
settingsMap [ " hidden " ] = ( TQT_DBusData : : fromBool ( true ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " hidden " ) ;
settingsMap . remove ( " hidden " ) ;
@ -3842,10 +3840,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
{
{
if ( wiFiConnection - > securityRequired ) {
if ( wiFiConnection - > securityRequired ) {
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 ) {
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 {
else {
settingsMap . remove ( " wep-tx-keyidx " ) ;
settingsMap . remove ( " wep-tx-keyidx " ) ;
@ -3859,7 +3857,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( * it ) ) ;
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 " ) ;
else settingsMap . remove ( " proto " ) ;
}
}
{
{
@ -3875,7 +3873,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( tdeWiFiCipherToNMWiFiCipher ( * it ) ) ) ;
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 " ) ;
else settingsMap . remove ( " pairwise " ) ;
}
}
{
{
@ -3891,14 +3889,14 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( TQT_DBusData : : fromString ( tdeWiFiCipherToNMWiFiCipher ( * it ) ) ) ;
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 " ) ;
else settingsMap . remove ( " group " ) ;
}
}
UPDATE_STRING_SETTING_IF_VALID ( wiFiConnection - > securitySettings . leapUsername , " leap-username " , settingsMap )
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-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( wiFiConnection - > securitySettings . wepKeyFlags ) ) ) . getAsVariantData ( ) ;
settingsMap [ " wep-key-type " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdeWepKeyTypeToNMWepKeyType ( wiFiConnection - > securitySettings . wepKeyType ) ) ) ;
settingsMap [ " wep-key-type " ] = ( TQT_DBusData : : fromUInt32 ( tdeWepKeyTypeToNMWepKeyType ( wiFiConnection - > securitySettings . wepKeyType ) ) ) . getAsVariantData ( ) ;
settingsMap [ " psk-flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( wiFiConnection - > securitySettings . pskFlags ) ) ) ;
settingsMap [ " psk-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( wiFiConnection - > securitySettings . pskFlags ) ) ) . getAsVariantData ( ) ;
settingsMap [ " leap-password-flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( wiFiConnection - > securitySettings . leapPasswordFlags ) ) ) ;
settingsMap [ " leap-password-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( wiFiConnection - > securitySettings . leapPasswordFlags ) ) ) . getAsVariantData ( ) ;
if ( wiFiConnection - > securitySettings . secretsValid ) {
if ( wiFiConnection - > securitySettings . secretsValid ) {
UPDATE_STRING_SETTING_IF_VALID ( wiFiConnection - > securitySettings . wepKey0 , " wep-key0 " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( wiFiConnection - > securitySettings . wepKey0 , " wep-key0 " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( wiFiConnection - > securitySettings . wepKey1 , " wep-key1 " , 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 ) {
for ( it = vpnConnection - > pluginData . begin ( ) ; it ! = vpnConnection - > pluginData . end ( ) ; + + it ) {
nestedConnectionSettingsMap [ it . key ( ) ] = TQT_DBusData : : fromString ( it . data ( ) ) ;
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 " ) ;
else settingsMap . remove ( " data " ) ;
}
}
if ( vpnConnection - > secretsValid ) {
if ( vpnConnection - > secretsValid ) {
@ -3969,7 +3967,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for ( it = vpnConnection - > pluginSecrets . begin ( ) ; it ! = vpnConnection - > pluginSecrets . end ( ) ; + + it ) {
for ( it = vpnConnection - > pluginSecrets . begin ( ) ; it ! = vpnConnection - > pluginSecrets . end ( ) ; + + it ) {
nestedConnectionSettingsMap [ it . key ( ) ] = TQT_DBusData : : fromString ( it . data ( ) ) ;
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 " ) ;
else settingsMap . remove ( " secrets " ) ;
}
}
}
}
@ -3992,7 +3990,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " mac-address " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " mac-address " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mac-address " ) ;
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 - > kernelName , " interface-name " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( vlanConnection - > parentConnectionUUID , " parent " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( vlanConnection - > parentConnectionUUID , " parent " , settingsMap )
settingsMap [ " id " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( vlanConnection - > vlanID ) ) ;
settingsMap [ " id " ] = ( TQT_DBusData : : fromUInt32 ( vlanConnection - > vlanID ) ) . getAsVariantData ( ) ;
settingsMap [ " flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdeVLANFlagsToNMVLANFlags ( vlanConnection - > vlanFlags ) ) ) ;
settingsMap [ " flags " ] = ( TQT_DBusData : : fromUInt32 ( tdeVLANFlagsToNMVLANFlags ( vlanConnection - > vlanFlags ) ) ) . getAsVariantData ( ) ;
{
{
TQT_DBusDataValueList valueList ;
TQT_DBusDataValueList valueList ;
TDENetworkPriorityMap : : const_iterator it ;
TDENetworkPriorityMap : : const_iterator it ;
for ( it = vlanConnection - > ingressPriorityMap . begin ( ) ; it ! = vlanConnection - > ingressPriorityMap . end ( ) ; + + 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 ( ) ) ) ) ;
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 ;
TQT_DBusDataValueList valueList ;
@ -4027,7 +4025,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
for ( it = vlanConnection - > egressPriorityMap . begin ( ) ; it ! = vlanConnection - > egressPriorityMap . end ( ) ; + + it ) {
for ( it = vlanConnection - > egressPriorityMap . begin ( ) ; it ! = vlanConnection - > egressPriorityMap . end ( ) ; + + it ) {
valueList . append ( TQT_DBusData : : fromString ( TQString ( " %1:%2 " ) . arg ( it . key ( ) ) . arg ( it . data ( ) ) ) ) ;
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 ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
@ -4040,11 +4038,11 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( connection - > serialConfig . valid ) {
if ( connection - > serialConfig . valid ) {
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
{
{
settingsMap [ " baud " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . baudRate ) ) ;
settingsMap [ " baud " ] = ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . baudRate ) ) . getAsVariantData ( ) ;
settingsMap [ " bits " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . byteWidth ) ) ;
settingsMap [ " bits " ] = ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . byteWidth ) ) . getAsVariantData ( ) ;
settingsMap [ " parity " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromByte ( tdeParityToNMParity ( connection - > serialConfig . parity ) ) ) ;
settingsMap [ " parity " ] = ( TQT_DBusData : : fromByte ( tdeParityToNMParity ( connection - > serialConfig . parity ) ) ) . getAsVariantData ( ) ;
settingsMap [ " stopbits " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . stopBits ) ) ;
settingsMap [ " stopbits " ] = ( TQT_DBusData : : fromUInt32 ( connection - > serialConfig . stopBits ) ) . getAsVariantData ( ) ;
settingsMap [ " send-delay " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt64 ( connection - > serialConfig . txDelay ) ) ;
settingsMap [ " send-delay " ] = ( TQT_DBusData : : fromUInt64 ( connection - > serialConfig . txDelay ) ) . getAsVariantData ( ) ;
}
}
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
@ -4056,40 +4054,40 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( connection - > pppConfig . valid ) {
if ( connection - > pppConfig . valid ) {
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
TQMap < TQString , TQT_DBusData > settingsMap = dbusData . toStringKeyMap ( ) . toTQMap ( ) ;
{
{
settingsMap [ " noauth " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . requireServerAuthentication ) ) ) ;
settingsMap [ " noauth " ] = ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . requireServerAuthentication ) ) ) . getAsVariantData ( ) ;
settingsMap [ " refuse-eap " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableEAP ) ) ;
settingsMap [ " refuse-eap " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableEAP ) ) . getAsVariantData ( ) ;
settingsMap [ " refuse-pap " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisablePAP ) ) ;
settingsMap [ " refuse-pap " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisablePAP ) ) . getAsVariantData ( ) ;
settingsMap [ " refuse-chap " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableCHAP ) ) ;
settingsMap [ " refuse-chap " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableCHAP ) ) . getAsVariantData ( ) ;
settingsMap [ " refuse-mschap " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableMSCHAP ) ) ;
settingsMap [ " refuse-mschap " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableMSCHAP ) ) . getAsVariantData ( ) ;
settingsMap [ " refuse-mschapv2 " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableMSCHAPv2 ) ) ;
settingsMap [ " refuse-mschapv2 " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : DisableMSCHAPv2 ) ) . getAsVariantData ( ) ;
settingsMap [ " nobsdcomp " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowBSDCompression ) ) ) ;
settingsMap [ " nobsdcomp " ] = ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowBSDCompression ) ) ) . getAsVariantData ( ) ;
settingsMap [ " nodeflate " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowDeflateCompression ) ) ) ;
settingsMap [ " nodeflate " ] = ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowDeflateCompression ) ) ) . getAsVariantData ( ) ;
settingsMap [ " no-vj-comp " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowVJCompression ) ) ) ;
settingsMap [ " no-vj-comp " ] = ( TQT_DBusData : : fromBool ( ! ( connection - > pppConfig . flags & TDENetworkPPPFlags : : AllowVJCompression ) ) ) . getAsVariantData ( ) ;
settingsMap [ " require-mppe " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : RequireMPPE ) ) ;
settingsMap [ " require-mppe " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : RequireMPPE ) ) . getAsVariantData ( ) ;
settingsMap [ " require-mppe-128 " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : RequireMPPE128 ) ) ;
settingsMap [ " require-mppe-128 " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : RequireMPPE128 ) ) . getAsVariantData ( ) ;
settingsMap [ " mppe-stateful " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : StatefulMPPE ) ) ;
settingsMap [ " mppe-stateful " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : StatefulMPPE ) ) . getAsVariantData ( ) ;
settingsMap [ " crtscts " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : UseHardwareFlowControl ) ) ;
settingsMap [ " crtscts " ] = ( TQT_DBusData : : fromBool ( connection - > pppConfig . flags & TDENetworkPPPFlags : : UseHardwareFlowControl ) ) . getAsVariantData ( ) ;
settingsMap [ " baud " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . baudRate ) ) ;
settingsMap [ " baud " ] = ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . baudRate ) ) . getAsVariantData ( ) ;
if ( connection - > pppConfig . mru > 0 ) {
if ( connection - > pppConfig . mru > 0 ) {
settingsMap [ " mru " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . mru ) ) ;
settingsMap [ " mru " ] = ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . mru ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mru " ) ;
settingsMap . remove ( " mru " ) ;
}
}
if ( connection - > pppConfig . mtu > 0 ) {
if ( connection - > pppConfig . mtu > 0 ) {
settingsMap [ " mtu " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . mtu ) ) ;
settingsMap [ " mtu " ] = ( TQT_DBusData : : fromUInt32 ( connection - > pppConfig . mtu ) ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " mtu " ) ;
settingsMap . remove ( " mtu " ) ;
}
}
if ( connection - > pppConfig . mtu > 0 ) {
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 {
else {
settingsMap . remove ( " lcp-echo-interval " ) ;
settingsMap . remove ( " lcp-echo-interval " ) ;
}
}
if ( connection - > pppConfig . mtu > 0 ) {
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 {
else {
settingsMap . remove ( " lcp-echo-failure " ) ;
settingsMap . remove ( " lcp-echo-failure " ) ;
@ -4110,7 +4108,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( connection - > pppoeConfig . secretsValid ) {
if ( connection - > pppoeConfig . secretsValid ) {
UPDATE_STRING_SETTING_IF_VALID ( connection - > pppoeConfig . password , " password " , settingsMap )
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 ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
@ -4129,9 +4127,9 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( olpcMeshConnection - > SSID [ i ] ) ;
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( olpcMeshConnection - > SSID [ i ] ) ;
valueList . append ( innerDataValue ) ;
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 ;
unsigned int i ;
TQT_DBusDataValueList valueList ;
TQT_DBusDataValueList valueList ;
@ -4139,7 +4137,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( olpcMeshConnection - > anycastDHCPHWAddress [ i ] ) ;
TQT_DBusData innerDataValue = TQT_DBusData : : fromByte ( olpcMeshConnection - > anycastDHCPHWAddress [ i ] ) ;
valueList . append ( innerDataValue ) ;
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 ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
@ -4161,7 +4159,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
valueList . append ( innerDataValue ) ;
valueList . append ( innerDataValue ) ;
}
}
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
TQT_DBusData nmHWAddress = TQT_DBusData : : fromTQValueList ( valueList ) ;
settingsMap [ " bdaddr " ] = convertDBUSDataToVariantData ( nmHWAddress ) ;
settingsMap [ " bdaddr " ] = ( nmHWAddress ) . getAsVariantData ( ) ;
}
}
else {
else {
settingsMap . remove ( " bdaddr " ) ;
settingsMap . remove ( " bdaddr " ) ;
@ -4183,7 +4181,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( connection - > pppoeConfig . secretsValid ) {
if ( connection - > pppoeConfig . secretsValid ) {
UPDATE_STRING_SETTING_IF_VALID ( modemConnection - > cdmaConfig . password , " password " , settingsMap )
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 ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
@ -4200,16 +4198,16 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if ( connection - > pppoeConfig . secretsValid ) {
if ( connection - > pppoeConfig . secretsValid ) {
UPDATE_STRING_SETTING_IF_VALID ( modemConnection - > gsmConfig . password , " password " , settingsMap )
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 . accessPointName , " apn " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( modemConnection - > gsmConfig . networkID , " network-id " , 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 ) {
if ( connection - > pppoeConfig . secretsValid ) {
UPDATE_STRING_SETTING_IF_VALID ( modemConnection - > gsmConfig . pin , " pin " , settingsMap )
UPDATE_STRING_SETTING_IF_VALID ( modemConnection - > gsmConfig . pin , " pin " , settingsMap )
}
}
settingsMap [ " pin-flags " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( modemConnection - > gsmConfig . pinFlags ) ) ) ;
settingsMap [ " pin-flags " ] = ( TQT_DBusData : : fromUInt32 ( tdePasswordFlagsToNMPasswordFlags ( modemConnection - > gsmConfig . pinFlags ) ) ) . getAsVariantData ( ) ;
settingsMap [ " allowed-bands " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromUInt32 ( modemConnection - > gsmConfig . allowedFrequencyBands ) ) ;
settingsMap [ " allowed-bands " ] = ( TQT_DBusData : : fromUInt32 ( modemConnection - > gsmConfig . allowedFrequencyBands ) ) . getAsVariantData ( ) ;
settingsMap [ " home-only " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromBool ( ! ( modemConnection - > gsmConfig . allowRoaming ) ) ) ;
settingsMap [ " home-only " ] = ( TQT_DBusData : : fromBool ( ! ( modemConnection - > gsmConfig . allowRoaming ) ) ) . getAsVariantData ( ) ;
}
}
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
dbusData = TQT_DBusData : : fromStringKeyMap ( TQT_DBusDataMap < TQString > ( settingsMap ) ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
groupValid = ( settingsMap . count ( ) > 0 ) ;
@ -4241,15 +4239,15 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// Create an empty list with the correct DBUS type structure
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList ;
TQT_DBusData valueList ;
valueList = TQT_DBusData : : fromList ( TQT_DBusDataList ( TQT_DBusData : : UInt32 ) ) ;
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 {
else {
settingsMap [ " addresses " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromTQValueList ( valueList ) ) ;
settingsMap [ " addresses " ] = ( TQT_DBusData : : fromTQValueList ( valueList ) ) . getAsVariantData ( ) ;
}
}
}
}
{
{
if ( ! connection - > ipConfig . dhcpClientIdentifier . isNull ( ) ) {
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 ) {
if ( valueList . count ( ) < = 0 ) {
// Create an empty list with the correct DBUS type structure
// 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 {
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 ( ) ) ) ;
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 ;
TQString method ;
@ -4302,13 +4300,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
method = " manual " ;
method = " manual " ;
}
}
if ( ! method . isNull ( ) )
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 ;
TQT_DBusDataValueList valueList ;
@ -4332,10 +4330,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
// Create an empty list with the correct DBUS type structure
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList ;
TQT_DBusData valueList ;
valueList = TQT_DBusData : : fromList ( TQT_DBusDataList ( TQT_DBusData : : UInt32 ) ) ;
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 {
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 . clear ( ) ;
innerMostValueList . append ( TQT_DBusData : : fromByte ( 0 ) ) ;
innerMostValueList . append ( TQT_DBusData : : fromByte ( 0 ) ) ;
innerValueList . append ( TQT_DBusData : : fromTQValueList ( innerMostValueList ) ) ;
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 {
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
// Create an empty list with the correct DBUS type structure
TQT_DBusData valueList ;
TQT_DBusData valueList ;
valueList = TQT_DBusData : : fromList ( TQT_DBusDataList ( TQT_DBusData : : Byte ) ) ;
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 {
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 ( ) ) ) ;
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 ;
TQString method ;
@ -4458,13 +4456,13 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
method = " manual " ;
method = " manual " ;
}
}
if ( ! method . isNull ( ) )
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 ;
TQT_DBusDataValueList valueList ;
@ -4514,10 +4512,10 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
innerValueList . append ( TQT_DBusData : : fromTQValueList ( innerMostValueList ) ) ;
innerValueList . append ( TQT_DBusData : : fromTQValueList ( innerMostValueList ) ) ;
// Metric
// Metric
innerValueList . append ( TQT_DBusData : : fromUInt32 ( 0 ) ) ;
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 {
else {
settingsMap [ " routes " ] = convertDBUSDataToVariantData ( TQT_DBusData : : fromTQValueList ( valueList ) ) ;
settingsMap [ " routes " ] = ( TQT_DBusData : : fromTQValueList ( valueList ) ) . getAsVariantData ( ) ;
}
}
}
}
}
}