@ -2160,13 +2160,13 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
if ( n1 . toElement ( ) . tagName ( ) = = " app " )
if ( n1 . toElement ( ) . tagName ( ) = = " app " )
{
{
if ( KvpncDebugLevel > 5 )
if ( KvpncDebugLevel > 5 )
std : : cout < < " doc was created from kvpnc ver " < < n1 . toElement ( ) . text ( ) < < std : : endl ;
std : : cout < < " doc was created from kvpnc ver " < < n1 . toElement ( ) . text ( ) . local8Bit ( ) < < std : : endl ;
}
}
if ( n1 . toElement ( ) . tagName ( ) = = " exportversion " )
if ( n1 . toElement ( ) . tagName ( ) = = " exportversion " )
{
{
kvpncexportversion = n1 . toElement ( ) . text ( ) ;
kvpncexportversion = n1 . toElement ( ) . text ( ) ;
if ( KvpncDebugLevel > 5 )
if ( KvpncDebugLevel > 5 )
std : : cout < < " doc was created from kvpnc with exportver " < < n1 . toElement ( ) . text ( ) < < std : : endl ;
std : : cout < < " doc was created from kvpnc with exportver " < < n1 . toElement ( ) . text ( ) . local8Bit ( ) < < std : : endl ;
}
}
}
}
}
}
@ -2182,7 +2182,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
if ( n1 . toElement ( ) . tagName ( ) ! = " " )
if ( n1 . toElement ( ) . tagName ( ) ! = " " )
{
{
if ( KvpncDebugLevel > 5 )
if ( KvpncDebugLevel > 5 )
std : : cout < < " => option: " < < " , value: " < < n1 . toElement ( ) . text ( ) < < std : : endl ;
std : : cout < < " => option: " < < " , value: " < < n1 . toElement ( ) . text ( ) . local8Bit ( ) < < std : : endl ;
}
}
if ( n1 . toElement ( ) . tagName ( ) = = " Minimize after connect " ) { minimizeAfterConnect = n1 . toElement ( ) . text ( ) . toInt ( ) ; }
if ( n1 . toElement ( ) . tagName ( ) = = " Minimize after connect " ) { minimizeAfterConnect = n1 . toElement ( ) . text ( ) . toInt ( ) ; }
else if ( n1 . toElement ( ) . tagName ( ) = = " Hide on startup " ) { hideMainWindow = n1 . toElement ( ) . text ( ) . toInt ( ) ; }
else if ( n1 . toElement ( ) . tagName ( ) = = " Hide on startup " ) { hideMainWindow = n1 . toElement ( ) . text ( ) . toInt ( ) ; }
@ -2287,7 +2287,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
if ( n1 . toElement ( ) . attribute ( " name " ) ! = " " )
if ( n1 . toElement ( ) . attribute ( " name " ) ! = " " )
{
{
if ( KvpncDebugLevel > 5 )
if ( KvpncDebugLevel > 5 )
std : : cout < < " profile: " < < n1 . toElement ( ) . attribute ( " name " ) < < std : : endl ;
std : : cout < < " profile: " < < n1 . toElement ( ) . attribute ( " name " ) . local8Bit ( ) < < std : : endl ;
TQString name = n1 . toElement ( ) . attribute ( " name " ) ;
TQString name = n1 . toElement ( ) . attribute ( " name " ) ;
VpnAccountData * data = new VpnAccountData ( VpnAccountData : : cisco , name ) ; // cisco is a dummy here, it will be set later
VpnAccountData * data = new VpnAccountData ( VpnAccountData : : cisco , name ) ; // cisco is a dummy here, it will be set later
data - > setDescription ( i18n ( " import from " ) + filename ) ;
data - > setDescription ( i18n ( " import from " ) + filename ) ;
@ -2301,7 +2301,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
TQString elementname = n2 . toElement ( ) . attribute ( " name " ) ;
TQString elementname = n2 . toElement ( ) . attribute ( " name " ) ;
TQString elementvalue = n2 . toElement ( ) . text ( ) ;
TQString elementvalue = n2 . toElement ( ) . text ( ) ;
if ( KvpncDebugLevel > 5 )
if ( KvpncDebugLevel > 5 )
std : : cout < < " => option: " < < elementname < < " , value: " < < elementvalue < < std : : endl ;
std : : cout < < " => option: " < < elementname . local8Bit ( ) < < " , value: " < < elementvalue . local8Bit ( ) < < std : : endl ;
// normal config
// normal config
if ( elementname = = " Connection type " )
if ( elementname = = " Connection type " )
{
{
@ -2664,7 +2664,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
TQDomElement e = n . toElement ( ) ; // try to convert the node to an element.
TQDomElement e = n . toElement ( ) ; // try to convert the node to an element.
if ( ! e . isNull ( ) ) {
if ( ! e . isNull ( ) ) {
std : : cout < < e . tagName ( ) < < std : : endl ; // the node really is an element.
std : : cout < < e . tagName ( ) . local8Bit ( ) < < std : : endl ; // the node really is an element.
}
}
n = n . nextSibling ( ) ;
n = n . nextSibling ( ) ;
}
}
@ -3226,12 +3226,12 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
{
validLineFound = true ;
validLineFound = true ;
TQString LeftNextHop = line2 . section ( " leftnexthop= " , 1 , - 1 ) ;
TQString LeftNextHop = line2 . section ( " leftnexthop= " , 1 , - 1 ) ;
std : : cout < < " left next hop (local) found: " < < LeftNextHop < < std : : endl ;
std : : cout < < " left next hop (local) found: " < < LeftNextHop . local8Bit ( ) < < std : : endl ;
if ( KvpncDebugLevel > 2 )
if ( KvpncDebugLevel > 2 )
appendLogEntry ( " import ipsec config: left next hop (local) found: " + LeftNextHop , debug ) ;
appendLogEntry ( " import ipsec config: left next hop (local) found: " + LeftNextHop , debug ) ;
profiledata - > setLeftNextHop ( LeftNextHop ) ;
profiledata - > setLeftNextHop ( LeftNextHop ) ;
profiledata - > setUseLeftNextHop ( true ) ;
profiledata - > setUseLeftNextHop ( true ) ;
std : : cout < < " => set it for profile " < < IpsecConfigSection < < " . " < < std : : endl ;
std : : cout < < " => set it for profile " < < IpsecConfigSection . local8Bit ( ) < < " . " < < std : : endl ;
if ( KvpncDebugLevel > 2 )
if ( KvpncDebugLevel > 2 )
appendLogEntry ( " import ipsec config: => set it for profile " + IpsecConfigSection + " . " , debug ) ;
appendLogEntry ( " import ipsec config: => set it for profile " + IpsecConfigSection + " . " , debug ) ;
}
}
@ -3428,7 +3428,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
{
validLineFound = true ;
validLineFound = true ;
TQString leftsourceip = line2 . section ( " leftsourceip= " , 1 , - 1 ) ;
TQString leftsourceip = line2 . section ( " leftsourceip= " , 1 , - 1 ) ;
std : : cout < < " left (local) have to use IP address " < < leftsourceip < < std : : endl ;
std : : cout < < " left (local) have to use IP address " < < leftsourceip . local8Bit ( ) < < std : : endl ;
if ( KvpncDebugLevel > 2 )
if ( KvpncDebugLevel > 2 )
appendLogEntry ( " import ipsec config: left (local) have to use IP address " + leftsourceip , debug ) ;
appendLogEntry ( " import ipsec config: left (local) have to use IP address " + leftsourceip , debug ) ;
profiledata - > setLocalVirtualIP ( leftsourceip ) ;
profiledata - > setLocalVirtualIP ( leftsourceip ) ;
@ -3440,7 +3440,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
{
validLineFound = true ;
validLineFound = true ;
TQString virtualprivate = line2 . section ( " virtual_private= " , 1 , - 1 ) ;
TQString virtualprivate = line2 . section ( " virtual_private= " , 1 , - 1 ) ;
std : : cout < < " virtual private networks " < < virtualprivate < < std : : endl ;
std : : cout < < " virtual private networks " < < virtualprivate . local8Bit ( ) < < std : : endl ;
if ( KvpncDebugLevel > 2 )
if ( KvpncDebugLevel > 2 )
appendLogEntry ( " import ipsec config: virtual private networks " + virtualprivate , debug ) ;
appendLogEntry ( " import ipsec config: virtual private networks " + virtualprivate , debug ) ;
profiledata - > setLocalVirtualIP ( virtualprivate ) ;
profiledata - > setLocalVirtualIP ( virtualprivate ) ;
@ -3453,7 +3453,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
{
validLineFound = true ;
validLineFound = true ;
TQString rightsourceip = line2 . section ( " rightsourceip= " , 1 , - 1 ) ;
TQString rightsourceip = line2 . section ( " rightsourceip= " , 1 , - 1 ) ;
std : : cout < < " right (remote) have to use IP address " < < rightsourceip < < std : : endl ;
std : : cout < < " right (remote) have to use IP address " < < rightsourceip . local8Bit ( ) < < std : : endl ;
if ( KvpncDebugLevel > 2 )
if ( KvpncDebugLevel > 2 )
appendLogEntry ( " import ipsec config: right (remote) have to use IP address " + rightsourceip , debug ) ;
appendLogEntry ( " import ipsec config: right (remote) have to use IP address " + rightsourceip , debug ) ;
profiledata - > setRightSourceIp ( rightsourceip ) ;
profiledata - > setRightSourceIp ( rightsourceip ) ;