summaryrefslogtreecommitdiffstats
path: root/src/kvpncconfig.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:13 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:13 -0600
commit1d9c18c8a07f4833695c6a2ab978698ae1cc90e7 (patch)
treec61f8778c1c540d79ed77c3f69018fcba0bca646 /src/kvpncconfig.cpp
parent2622d5ad003c636cda4bc36246df8a7fe9ac5d9f (diff)
downloadkvpnc-1d9c18c8a07f4833695c6a2ab978698ae1cc90e7.tar.gz
kvpnc-1d9c18c8a07f4833695c6a2ab978698ae1cc90e7.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/kvpncconfig.cpp')
-rw-r--r--src/kvpncconfig.cpp178
1 files changed, 89 insertions, 89 deletions
diff --git a/src/kvpncconfig.cpp b/src/kvpncconfig.cpp
index 802a070..46c10ea 100644
--- a/src/kvpncconfig.cpp
+++ b/src/kvpncconfig.cpp
@@ -204,14 +204,14 @@ void KVpncConfig::appendLogEntry( TQString msg, LogType type )
{
// TQTextStream s( &logfile );
logFileStream << i18n( "Log session started at: " );
- logFileStream << TQDateTime::tqcurrentDateTime().toString( Qt::TextDate );
+ logFileStream << TQDateTime::currentDateTime().toString( Qt::TextDate );
logFileStream << "\n";
logfile.flush();
}
}
else
{
- TQString date = TQDate().tqcurrentDate().toString(Qt::ISODate)+ " ";
+ TQString date = TQDate().currentDate().toString(Qt::ISODate)+ " ";
TQString time = TQTime().currentTime().toString(Qt::ISODate)+ " ";
TQString prefix="";
switch ( type )
@@ -536,66 +536,66 @@ void KVpncConfig::saveOptions(bool saveOneProfile, TQString Profile)
{
if (UserPasswordOK)
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "write of %1 was ok." ).tqarg(i18n("user password")), debug);
+ appendLogEntry(i18n( "write of %1 was ok." ).arg(i18n("user password")), debug);
else
{
// if ( KMessageBox::warningContinueCancel( 0,
// i18n( "KVpnc is unable to save %1 password securely in your wallet.<br>"
- // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).tqarg(i18n("user password")),
- // i18n( "Unable to store secure %1" ).tqarg(i18n("user password")),
- // KGuiItem( i18n( "Store &Unsafe" ), TQString::tqfromLatin1( "unlock" ),TQString::tqfromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
+ // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).arg(i18n("user password")),
+ // i18n( "Unable to store secure %1" ).arg(i18n("user password")),
+ // KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ),TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
// {
// config->writeEntry( "User password", it->getUserPassword() );
// }
- appendLogEntry(i18n( "write of %1 has failed." ).tqarg(i18n("user password")), error);
+ appendLogEntry(i18n( "write of %1 has failed." ).arg(i18n("user password")), error);
}
if (PskOK)
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "write of %1 was successful." ).tqarg(i18n("preshared key")), debug);
+ appendLogEntry(i18n( "write of %1 was successful." ).arg(i18n("preshared key")), debug);
else
{
// if ( KMessageBox::warningContinueCancel( 0,
// i18n( "KVpnc is unable to save %1 password securely in your wallet.<br>"
- // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).tqarg(i18n("pre shared key")),
- // i18n( "Unable to store secure %1" ).tqarg(i18n("pre shared key")),
- // KGuiItem( i18n( "Store &Unsafe" ), TQString::tqfromLatin1( "unlock" ),TQString::tqfromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
+ // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).arg(i18n("pre shared key")),
+ // i18n( "Unable to store secure %1" ).arg(i18n("pre shared key")),
+ // KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ),TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
// {
// config->writeEntry( "Pre shared key", it->getPreSharedKey() );
// }
- appendLogEntry(i18n( "write of %1 has failed." ).tqarg(i18n("preshared key")),error);
+ appendLogEntry(i18n( "write of %1 has failed." ).arg(i18n("preshared key")),error);
}
if (PskOK)
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "write of %1 was successful." ).tqarg(i18n("preshared key")), debug);
+ appendLogEntry(i18n( "write of %1 was successful." ).arg(i18n("preshared key")), debug);
else
{
// if ( KMessageBox::warningContinueCancel( 0,
// i18n( "KVpnc is unable to save %1 password securely in your wallet.<br>"
- // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).tqarg(i18n("preshared key password")),
- // i18n( "Unable to store secure %1" ).tqarg(i18n("reshared key password")),
- // KGuiItem( i18n( "Store &Unsafe" ), TQString::tqfromLatin1( "unlock" ),TQString::tqfromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
+ // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).arg(i18n("preshared key password")),
+ // i18n( "Unable to store secure %1" ).arg(i18n("reshared key password")),
+ // KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ),TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
// {
// config->writeEntry( "Pre shared key", it->getPreSharedKey() );
// }
- appendLogEntry(i18n( "write of %1 has failed." ).tqarg(i18n("preshared key")),error);
+ appendLogEntry(i18n( "write of %1 has failed." ).arg(i18n("preshared key")),error);
}
if (PskKeyPassOK)
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "write of %1 was successful." ).tqarg(i18n("preshared key password")), debug);
+ appendLogEntry(i18n( "write of %1 was successful." ).arg(i18n("preshared key password")), debug);
else
{
// if ( KMessageBox::warningContinueCancel( 0,
// i18n( "KVpnc is unable to save %1 password securely in your wallet.<br>"
- // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).tqarg(i18n("preshared key password")),
- // i18n( "Unable to store secure %1" ).tqarg(i18n("reshared key password")),
- // KGuiItem( i18n( "Store &Unsafe" ), TQString::tqfromLatin1( "unlock" ),TQString::tqfromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
+ // "Do you want to save the password in the <b>unsafe</b> configuration file instead?" ).arg(i18n("preshared key password")),
+ // i18n( "Unable to store secure %1" ).arg(i18n("reshared key password")),
+ // KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ),TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) ) == KMessageBox::Continue )
// {
// config->writeEntry( "Pre shared key", it->getPreSharedKey() );
// }
- appendLogEntry(i18n( "write of %1 has failed." ).tqarg(i18n("preshared key password")),error);
+ appendLogEntry(i18n( "write of %1 has failed." ).arg(i18n("preshared key password")),error);
}
//std::cout << "success: " << pwdOK << std::endl;
}
@@ -881,9 +881,9 @@ void KVpncConfig::saveOptions(bool saveOneProfile, TQString Profile)
// wallet->sync();
/* give info */
-// slotStatusMsg ( i18n( "Profile \"%1\" saved." ).tqarg( ProfileName.remove("Profile_") ), ID_FLASH_MSG );
+// slotStatusMsg ( i18n( "Profile \"%1\" saved." ).arg( ProfileName.remove("Profile_") ), ID_FLASH_MSG );
- appendLogEntry ( i18n( "Profile \"%1\" saved." ).tqarg( ProfileName.remove("Profile_") ) , info);
+ appendLogEntry ( i18n( "Profile \"%1\" saved." ).arg( ProfileName.remove("Profile_") ) , info);
// appPointer->processEvents();
}
appPointer->processEvents();
@@ -1011,12 +1011,12 @@ void KVpncConfig::loadOptions()
TQDir AppFolder (TQString(dirs->saveLocation( "data" )+"/kvpnc"));
if (!AppFolder.exists())
{
- // KMessageBox::error( this, i18n( "creating dir: %1" ).tqarg(dirs->saveLocation( "data" )+"/kvpnc" ));
+ // KMessageBox::error( this, i18n( "creating dir: %1" ).arg(dirs->saveLocation( "data" )+"/kvpnc" ));
TQDir AppFolder2(dirs->saveLocation( "data" ));
if(!AppFolder2.mkdir("kvpnc",true))
{
- KMessageBox::error( 0, i18n( "The appdir for kvpnc could not be created. Be sure that you have write permission of \"%1\"." ).tqarg(dirs->saveLocation( "data" )) );
- appendLogEntry( i18n( "The appdir for kvpnc could not be created. Be sure that you have write permission of \"%1\"." ).tqarg(dirs->saveLocation( "data" )),error);
+ KMessageBox::error( 0, i18n( "The appdir for kvpnc could not be created. Be sure that you have write permission of \"%1\"." ).arg(dirs->saveLocation( "data" )) );
+ appendLogEntry( i18n( "The appdir for kvpnc could not be created. Be sure that you have write permission of \"%1\"." ).arg(dirs->saveLocation( "data" )),error);
}
}
@@ -1027,12 +1027,12 @@ void KVpncConfig::loadOptions()
if ( !logfile.open( IO_WriteOnly | IO_Append ) )
{
KMessageBox::error( 0, i18n( "Log file cant be opened!" ) );
- appendLogEntry(i18n( "Unable to find \"%1\"!" ).tqarg("pppd"),error);
+ appendLogEntry(i18n( "Unable to find \"%1\"!" ).arg("pppd"),error);
}
else
{
TQTextStream s( &logfile );
- s << i18n( "Log session started at: " ) << TQDateTime::tqcurrentDateTime().toString( Qt::TextDate ) << endl;
+ s << i18n( "Log session started at: " ) << TQDateTime::currentDateTime().toString( Qt::TextDate ) << endl;
}
}
@@ -1120,22 +1120,22 @@ void KVpncConfig::loadOptions()
TQString profilename = name.right( ( name.length() ) - 8 );
if (wallet->readPassword(TQString(profilename+"__user_pw"), UserPassword) != 0)
- appendLogEntry(i18n( "read of %1 has failed." ).tqarg(i18n("user password")),error);
+ appendLogEntry(i18n( "read of %1 has failed." ).arg(i18n("user password")),error);
else
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "read of %1 was successful." ).tqarg(i18n("user password")),debug);
+ appendLogEntry(i18n( "read of %1 was successful." ).arg(i18n("user password")),debug);
if (wallet->readPassword(TQString(profilename+"__psk"), PreSharedKey) != 0)
- appendLogEntry(i18n( "read of %1 has failed." ).tqarg(i18n("preshared key")),error);
+ appendLogEntry(i18n( "read of %1 has failed." ).arg(i18n("preshared key")),error);
else
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "read of %1 was successful." ).tqarg(i18n("preshared key")),debug);
+ appendLogEntry(i18n( "read of %1 was successful." ).arg(i18n("preshared key")),debug);
if (wallet->readPassword(TQString(profilename+"__priv_key_pwd"), PrivateKeyPass) != 0)
- appendLogEntry(i18n( "read of %1 has failed." ).tqarg(i18n("preshared key password")),error);
+ appendLogEntry(i18n( "read of %1 has failed." ).arg(i18n("preshared key password")),error);
else
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n( "read of %1 was successful." ).tqarg(i18n("preshared key password")),debug);
+ appendLogEntry(i18n( "read of %1 was successful." ).arg(i18n("preshared key password")),debug);
}
else
{
@@ -1438,7 +1438,7 @@ void KVpncConfig::loadOptions()
appendLogEntry ( i18n( "Old configuration found, converted." ),info );
if ( KvpncDebugLevel > 2 )
- appendLogEntry( i18n( "Configuration for profile \"%1\" loaded." ).tqarg( Name ),info );
+ appendLogEntry( i18n( "Configuration for profile \"%1\" loaded." ).arg( Name ),info );
appPointer->processEvents();
}
@@ -1996,9 +1996,9 @@ bool KVpncConfig::exportKvpncConfig(TQString filename)
}
TQString msg="";
if (exportCount > 0 && exportGlobal==true)
- msg = i18n("Export was successful. %1 profiles and global settings are exported.").tqarg(TQString::number(exportCount));
+ msg = i18n("Export was successful. %1 profiles and global settings are exported.").arg(TQString::number(exportCount));
if (exportCount > 0 && exportGlobal==false)
- msg = i18n("Export was successful. %1 profiles are exported.").tqarg(TQString::number(exportCount));
+ msg = i18n("Export was successful. %1 profiles are exported.").arg(TQString::number(exportCount));
if (exportCount < 1 && exportGlobal==true)
msg = i18n("Export was successful. Global settings are exported.");
KMessageBox::information ( 0, msg,i18n("Export success") );
@@ -2140,7 +2140,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
}
importfile.close();
- // print out the element names of all elements that are direct tqchildren
+ // print out the element names of all elements that are direct children
// of the outermost element.
TQDomElement docElem = doc.documentElement();
@@ -2621,7 +2621,7 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
if ( it->getName() == data->getName() )
{
//account->setName( TQString( account->getName() + "_2" ) );
- // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).tqarg( account->getName() ), i18n( "Name exist, renamed" ) );
+ // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).arg( account->getName() ), i18n( "Name exist, renamed" ) );
KMessageBox::error ( 0, i18n ( "Profile name exists!" ), i18n ( "Name Exists" ) );
nameOk = false;
TQString newName = KInputDialog::getText ( i18n ( "New Name" ), i18n ( "New name for profile:" ), TQString ( data->getName() + "_2" ), &ok );
@@ -2763,9 +2763,9 @@ bool KVpncConfig::importKvpncConfig(TQString filename, TQString& RetName, bool&
TQString msg="";
if (importCount > 0 && importGlobal==true)
- msg = i18n("Import was successful. %1 profiles and global settings are imported.").tqarg(TQString::number(importCount));
+ msg = i18n("Import was successful. %1 profiles and global settings are imported.").arg(TQString::number(importCount));
if (importCount > 0 && importGlobal==false)
- msg = i18n("Import was successful. %1 profiles are imported.").tqarg(TQString::number(importCount));
+ msg = i18n("Import was successful. %1 profiles are imported.").arg(TQString::number(importCount));
if (importCount < 1 && importGlobal==false)
msg = i18n("Import was successful. Global settings are imported.");
KMessageBox::information ( 0, msg,i18n("Import success") );
@@ -2827,7 +2827,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
// end of section found
// std::cout << "end of section " << IpsecConfigSectionName << " found." << std::endl;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n("import ipsec config: end of section %1 found.").tqarg(IpsecConfigSectionName), debug);
+ appendLogEntry(i18n("import ipsec config: end of section %1 found.").arg(IpsecConfigSectionName), debug);
sectionEndFound=true;
IpsecImportSection *section = new IpsecImportSection();
@@ -3032,7 +3032,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
// std::cout << "section " << OtherSection << " found, appending:" << std::endl;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import ipsec config: section %1 found, appending:").tqarg(OtherSection),debug);
+ appendLogEntry(i18n ("import ipsec config: section %1 found, appending:").arg(OtherSection),debug);
// std::cout << "other data:" << std::endl << it3->SectionData.join("\n") << "--------" << std::endl;
// std::cout << "section data:" << std::endl << section->SectionData.join("\n") << "--------" << std::endl;
section_found=true;
@@ -3073,7 +3073,7 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
{
// std::cout << "section " << OtherSection << " not found, skipping" << std::endl;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import ipsec config: section %1 not found, skipping").tqarg(OtherSection) ,debug);
+ appendLogEntry(i18n ("import ipsec config: section %1 not found, skipping").arg(OtherSection) ,debug);
}
}
@@ -3757,9 +3757,9 @@ bool KVpncConfig::importIpsecConfig(TQString filename, TQString& RetName, bool&
TQString msg="";
if (importCount > 0 )
- msg = i18n("Import was successful. %1 profiles are imported.").tqarg(TQString::number(importCount));
+ msg = i18n("Import was successful. %1 profiles are imported.").arg(TQString::number(importCount));
else
- msg = i18n("Import was canceled because no profiles are selected.").tqarg(TQString::number(importCount));
+ msg = i18n("Import was canceled because no profiles are selected.").arg(TQString::number(importCount));
KMessageBox::information ( 0, msg,i18n("Import success") );
@@ -3916,43 +3916,43 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
line = removeWhiteSpaceAtBegin(stream.readLine()).simplifyWhiteSpace();
if (KvpncDebugLevel > 6)
- appendLogEntry(i18n ("import fritzbox config: line: %1").tqarg(line), debug);
+ appendLogEntry(i18n ("import fritzbox config: line: %1").arg(line), debug);
if (line.startsWith("datapipecfg"))
{
datapipecfgFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("datapipecfg"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("datapipecfg"), debug);
}
if (line.startsWith("policies"))
{
policiesFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("policies"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("policies"), debug);
}
if (line.startsWith("targets"))
{
targetsFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("targets"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("targets"), debug);
}
if (line.startsWith("localid"))
{
localidFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("localid"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("localid"), debug);
}
if (line.startsWith("phase2localid"))
{
phase2localidFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("phase2localid"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("phase2localid"), debug);
}
if (line.startsWith("phase2remoteid"))
{
phase2remoteidFound = true;
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found").tqarg("phase2remoteid"), debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found").arg("phase2remoteid"), debug);
}
if (line.startsWith("ipnet"))
{
@@ -3970,7 +3970,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString ProfileName=line.section("= ",1,1).replace("\"","").replace(";","").replace(" ","_");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("name").tqarg(ProfileName) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("name").arg(ProfileName) ,debug);
profiledata->setName(ProfileName);
nameFound = true;
}
@@ -3981,9 +3981,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
reconnectAfterConnectionLost = true;
if (KvpncDebugLevel > 2)
if (reconnectAfterConnectionLost)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("always_renew").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("always_renew").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("always_renew").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("always_renew").arg(i18n("no")) ,debug);
profiledata->setDoReconnectAfterConnectionLost(reconnectAfterConnectionLost);
}
if (line.startsWith("dont_filter_netbios = "))
@@ -3993,23 +3993,23 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
dont_filter_netbios = true;
if (KvpncDebugLevel > 2)
if (dont_filter_netbios)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("dont_filter_netbios").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("dont_filter_netbios").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("dont_filter_netbios").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("dont_filter_netbios").arg(i18n("no")) ,debug);
// nothing to yet
}
if (line.startsWith("localip = "))
{
TQString LocalIp=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("localip").tqarg(LocalIp) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("localip").arg(LocalIp) ,debug);
// nothing to do yet
}
if (line.startsWith("virtualip = "))
{
TQString LocalVirtualIp=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("virtualip").tqarg(LocalVirtualIp) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("virtualip").arg(LocalVirtualIp) ,debug);
profiledata->setUseLeftSourceIp(true);
profiledata->setLeftSourceIp(LocalVirtualIp);
}
@@ -4017,14 +4017,14 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString RemoteIp=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("remoteip").tqarg(RemoteIp) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("remoteip").arg(RemoteIp) ,debug);
// nothing to do yet
}
if (line.startsWith("remotehostname = "))
{
TQString Gateway=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("remotehostname").tqarg(Gateway) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("remotehostname").arg(Gateway) ,debug);
profiledata->setGateway(Gateway);
}
if (localidFound)
@@ -4033,7 +4033,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString LocalId=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg(TQString("user_fqdn")+" ("+i18n("local id")+")").tqarg(LocalId) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg(TQString("user_fqdn")+" ("+i18n("local id")+")").arg(LocalId) ,debug);
profiledata->setSpecialLocalID(LocalId);
profiledata->setUseSpecialLocalID(true);
profiledata->setLocalIDType("user_fqdn");
@@ -4045,7 +4045,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
TQString IpsecExchangeMode=line.section("= ",1,1).replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg(i18n("exchange mode")).tqarg(IpsecExchangeMode) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg(i18n("exchange mode")).arg(IpsecExchangeMode) ,debug);
if (IpsecExchangeMode == "mode_aggressive")
profiledata->setExchangeMode("aggressive");
@@ -4056,7 +4056,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString AuthType=line.section("= ",1,1).replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("keytype").tqarg(AuthType) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("keytype").arg(AuthType) ,debug);
if (AuthType == "keytype_pre_shared")
profiledata->setAuthType(VpnAccountData::psk);
@@ -4067,9 +4067,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString PreshardKey=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2 && KvpncDebugLevel < 5)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("key").tqarg("******") ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("key").arg("******") ,debug);
if (KvpncDebugLevel > 5)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("key").tqarg(PreshardKey) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("key").arg(PreshardKey) ,debug);
profiledata->setPreSharedKey(PreshardKey);
profiledata->setPskIsInFile(false);
}
@@ -4080,9 +4080,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
cert_do_server_auth = true;
if (KvpncDebugLevel > 2)
if (cert_do_server_auth)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("cert_do_server_auth").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("cert_do_server_auth").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("cert_do_server_auth").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("cert_do_server_auth").arg(i18n("no")) ,debug);
// nothing to to yet
}
if (line.startsWith("use_nat_t = "))
@@ -4092,9 +4092,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
UseNat = true;
if (KvpncDebugLevel > 2)
if (UseNat)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_nat_t").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_nat_t").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_nat_t").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_nat_t").arg(i18n("no")) ,debug);
profiledata->setUseNat(UseNat);
profiledata->setUseUdp(true);
}
@@ -4105,9 +4105,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
UseXauth = true;
if (KvpncDebugLevel > 2)
if (UseXauth)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_xauth").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_xauth").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_xauth").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_xauth").arg(i18n("no")) ,debug);
profiledata->setAuthWithUsernameAndPassword(UseXauth);
}
if (line.startsWith("use_cfgmode = "))
@@ -4117,9 +4117,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
ModeConfig = true;
if (KvpncDebugLevel > 2)
if (ModeConfig)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_cfgmode").tqarg(i18n("yes")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_cfgmode").arg(i18n("yes")) ,debug);
else
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg("use_cfgmode").tqarg(i18n("no")) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg("use_cfgmode").arg(i18n("no")) ,debug);
profiledata->setUseModeConfig(ModeConfig);
}
if (phase2localidFound)
@@ -4128,7 +4128,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString Phase2LocalId=line.section("= ",1,1).replace("\"","").replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg(i18n("ip addr for phase 2")).tqarg(Phase2LocalId) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg(i18n("ip addr for phase 2")).arg(Phase2LocalId) ,debug);
// nothing to do yet
}
}
@@ -4139,7 +4139,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
{
TQString RemoteNetWorkAddr=line.section("= ",1,1).replace(";","");
if (KvpncDebugLevel > 2)
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg(i18n("remote network ip")).tqarg(RemoteNetWorkAddr) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg(i18n("remote network ip")).arg(RemoteNetWorkAddr) ,debug);
profiledata->setRemoteNetAddr(RemoteNetWorkAddr);
}
if (line.startsWith("mask = "))
@@ -4148,9 +4148,9 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
TQString RemoteNetWorkMaskNumeric = TQString().setNum(Utils(this).dottedIpv4Netmask2NetmaskBytes(RemoteNetWorkMask));
if (KvpncDebugLevel > 2)
{
- appendLogEntry(i18n ("import fritzbox config: %1 found: %2").tqarg(i18n("remote network netmask")).tqarg(RemoteNetWorkMask) ,debug);
+ appendLogEntry(i18n ("import fritzbox config: %1 found: %2").arg(i18n("remote network netmask")).arg(RemoteNetWorkMask) ,debug);
- appendLogEntry(i18n("Netmask (dotted): %1, numeric value: %2").tqarg(RemoteNetWorkMask).tqarg(RemoteNetWorkMaskNumeric), debug);
+ appendLogEntry(i18n("Netmask (dotted): %1, numeric value: %2").arg(RemoteNetWorkMask).arg(RemoteNetWorkMaskNumeric), debug);
}
profiledata->setRemoteNetMask(RemoteNetWorkMaskNumeric);
}
@@ -4170,7 +4170,7 @@ bool KVpncConfig::importFritzboxConfig(TQString filename, TQString& RetName, boo
if ( it->getName() == profiledata->getName() )
{
//account->setName( TQString( account->getName() + "_2" ) );
- // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).tqarg( account->getName() ), i18n( "Name exist, renamed" ) );
+ // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).arg( account->getName() ), i18n( "Name exist, renamed" ) );
KMessageBox::error ( 0, i18n ( "Profile name exists!" ), i18n ( "Name Exists" ) );
nameOk = false;
TQString newName = KInputDialog::getText ( i18n ( "New Name" ), i18n ( "New name for profile:" ), TQString ( profiledata->getName() + "_2" ), &ok );
@@ -4391,19 +4391,19 @@ void KVpncConfig::removeEntry(TQString Name)
if (KvpncDebugLevel > 2)
{
if (UserPasswordOK)
- appendLogEntry(i18n( "delete of %1 was ok." ).tqarg(i18n("user password")), debug);
+ appendLogEntry(i18n( "delete of %1 was ok." ).arg(i18n("user password")), debug);
else
- appendLogEntry(i18n( "delete of %1 has failed." ).tqarg(i18n("user password")), debug);
+ appendLogEntry(i18n( "delete of %1 has failed." ).arg(i18n("user password")), debug);
//
if (PskOK)
- appendLogEntry(i18n( "delete of %1 was successful." ).tqarg(i18n("preshared key")), debug);
+ appendLogEntry(i18n( "delete of %1 was successful." ).arg(i18n("preshared key")), debug);
else
- appendLogEntry(i18n( "delete of %1 has failed." ).tqarg(i18n("preshared key")),debug);
+ appendLogEntry(i18n( "delete of %1 has failed." ).arg(i18n("preshared key")),debug);
if (PskKeyPassOK)
- appendLogEntry(i18n( "delete of %1 was successful." ).tqarg(i18n("private key password")), debug);
+ appendLogEntry(i18n( "delete of %1 was successful." ).arg(i18n("private key password")), debug);
else
- appendLogEntry(i18n( "delete of %1 has failed." ).tqarg(i18n("private key password")),debug);
+ appendLogEntry(i18n( "delete of %1 has failed." ).arg(i18n("private key password")),debug);
// //std::cout << "success: " << pwdOK << std::endl;
@@ -4509,8 +4509,8 @@ void KVpncConfig::removeEntry(TQString Name)
config->deleteGroup( ProfileName );
/* give info */
- //slotStatusMsg ( i18n( "Profile \"%1\" removed." ).tqarg( Name ), ID_FLASH_MSG );
- appendLogEntry ( i18n( "Profile \"%1\" removed." ).tqarg( Name ) , info);
+ //slotStatusMsg ( i18n( "Profile \"%1\" removed." ).arg( Name ), ID_FLASH_MSG );
+ appendLogEntry ( i18n( "Profile \"%1\" removed." ).arg( Name ) , info);
AccountList->remove(it);
break;
}