summaryrefslogtreecommitdiffstats
path: root/src/kvpncconfig.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-12-16 05:16:48 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-12-16 05:16:48 +0100
commite543ebc9363bb746a042577f314240af305e07b5 (patch)
tree2589d87e7be1f45e05fc7c87d65292701dedf0f6 /src/kvpncconfig.cpp
parent9bd6d8c4329b3e35b9daabd76c3d481d9fbcba93 (diff)
downloadkvpnc-e543ebc9363bb746a042577f314240af305e07b5.tar.gz
kvpnc-e543ebc9363bb746a042577f314240af305e07b5.zip
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/kvpncconfig.cpp')
-rw-r--r--src/kvpncconfig.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/kvpncconfig.cpp b/src/kvpncconfig.cpp
index 34fef45..a4af3fe 100644
--- a/src/kvpncconfig.cpp
+++ b/src/kvpncconfig.cpp
@@ -2160,13 +2160,13 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
if (n1.toElement().tagName() == "app")
{
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")
{
kvpncexportversion = n1.toElement().text();
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 (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(); }
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 (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");
VpnAccountData *data = new VpnAccountData( VpnAccountData::cisco, name); // cisco is a dummy here, it will be set later
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 elementvalue = n2.toElement().text();
if (KvpncDebugLevel > 5)
- std::cout << " => option: " << elementname << ", value: " << elementvalue << std::endl;
+ std::cout << " => option: " << elementname.local8Bit() << ", value: " << elementvalue.local8Bit() << std::endl;
// normal config
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.
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();
}
@@ -3226,12 +3226,12 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
validLineFound=true;
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)
appendLogEntry("import ipsec config: left next hop (local) found: " +LeftNextHop ,debug);
profiledata->setLeftNextHop(LeftNextHop);
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)
appendLogEntry("import ipsec config: => set it for profile " + IpsecConfigSection + " ." ,debug);
}
@@ -3428,7 +3428,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
validLineFound=true;
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)
appendLogEntry("import ipsec config: left (local) have to use IP address " + leftsourceip ,debug);
profiledata->setLocalVirtualIP(leftsourceip);
@@ -3440,7 +3440,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
validLineFound=true;
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)
appendLogEntry("import ipsec config: virtual private networks " +virtualprivate ,debug);
profiledata->setLocalVirtualIP(virtualprivate);
@@ -3453,7 +3453,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
validLineFound=true;
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)
appendLogEntry("import ipsec config: right (remote) have to use IP address " + rightsourceip ,debug);
profiledata->setRightSourceIp(rightsourceip);