summaryrefslogtreecommitdiffstats
path: root/src/openvpnmanagementhandler.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:26 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:26 -0600
commit392b293dfeaa3e4241e50b833126d0c2d598761d (patch)
tree2e113362b942a9339c055661efd21cdb626e5e1d /src/openvpnmanagementhandler.cpp
parent1d9c18c8a07f4833695c6a2ab978698ae1cc90e7 (diff)
downloadkvpnc-392b293dfeaa3e4241e50b833126d0c2d598761d.tar.gz
kvpnc-392b293dfeaa3e4241e50b833126d0c2d598761d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 1d9c18c8a07f4833695c6a2ab978698ae1cc90e7.
Diffstat (limited to 'src/openvpnmanagementhandler.cpp')
-rw-r--r--src/openvpnmanagementhandler.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/openvpnmanagementhandler.cpp b/src/openvpnmanagementhandler.cpp
index cab0c76..a30b8e0 100644
--- a/src/openvpnmanagementhandler.cpp
+++ b/src/openvpnmanagementhandler.cpp
@@ -22,7 +22,7 @@
//BEGIN INCLUDES
#include "openvpnmanagementhandler.h"
#include <tqregexp.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <kpassdlg.h>
#include <klocale.h>
#include <tqlabel.h>
@@ -80,7 +80,7 @@ void OpenvpnManagementHandler::socketConnectionClosed()
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Disconnected to the OpenVPN manage port (%1)." ).arg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Disconnected to the OpenVPN manage port (%1)." ).tqarg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
}
void OpenvpnManagementHandler::socketClosed()
@@ -91,7 +91,7 @@ void OpenvpnManagementHandler::socketClosed()
greetingtimer.stop();
disconnect ( &greetingtimer, TQT_SIGNAL ( timeout() ), this, TQT_SLOT ( greetingTimedOut() ) );
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Socket to the OpenVPN manage port (%1) closed." ).arg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Socket to the OpenVPN manage port (%1) closed." ).tqarg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
socketReallyClosed = true;
// emit terminate_openvpn();
}
@@ -106,7 +106,7 @@ void OpenvpnManagementHandler::socketConnected()
connectedToManagementPort=true;
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connected to the OpenVPN manage port (%1)." ).arg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connected to the OpenVPN manage port (%1)." ).tqarg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
socketReadyRead();
@@ -115,7 +115,7 @@ void OpenvpnManagementHandler::socketConnected()
void OpenvpnManagementHandler::socketError( int e )
{
- // infoText->append( tr("Error number %1 occurred\n").arg(e) );
+ // infoText->append( tr("Error number %1 occurred\n").tqarg(e) );
if ( e != 0 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + TQString().setNum( e ) , GlobalConfig->error );
}
@@ -125,7 +125,7 @@ void OpenvpnManagementHandler::greetingTimedOut()
disconnect ( &greetingtimer, TQT_SIGNAL ( timeout() ), this, TQT_SLOT ( greetingTimedOut() ) );
greetingtimer.stop();
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n("Got no greeting within %1 seconds from management interface, retrying.").arg("3"), GlobalConfig->error );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n("Got no greeting within %1 seconds from management interface, retrying.").tqarg("3"), GlobalConfig->error );
closeConnection();
@@ -173,7 +173,7 @@ void OpenvpnManagementHandler::socketReadyRead()
// else if ( line.find( ">HOLD:", 0, FALSE ) > -1 ) {
//
// if ( GlobalConfig->KvpncDebugLevel > 2 )
- // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message." ).arg("'hold'"), GlobalConfig->debug );
+ // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message." ).tqarg("'hold'"), GlobalConfig->debug );
//
// fInHold = true;
// int ret = 0;
@@ -205,7 +205,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("'need ok'"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("'need ok'"), GlobalConfig->debug );
TQString req = line.section( TQRegExp( ".*'(.*)'. * MSG:( .* )" ), 0, 0 ); // $1;
TQString msg = line.section( TQRegExp( ".*'(.*)'. * MSG:( .* )" ), 1, 1 ); // $2;
@@ -240,7 +240,7 @@ void OpenvpnManagementHandler::socketReadyRead()
// if ( line.find( " >PASSWORD:", 0, FALSE ) > -1 ) {
//
// if ( GlobalConfig->KvpncDebugLevel > 2 )
- // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("'password'"), GlobalConfig->debug );
+ // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("'password'"), GlobalConfig->debug );
//
// TQString req = line.section( TQRegExp( ".*'(.*)'.*" ), 0, 0 ); // $1;
// TQCString password;
@@ -264,7 +264,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("'need username/password'"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("'need username/password'"), GlobalConfig->debug );
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Send username..." ), GlobalConfig->debug );
@@ -314,7 +314,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS: 'Auth' username entered"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS: 'Auth' username entered"), GlobalConfig->debug );
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Send password..." ), GlobalConfig->debug );
@@ -367,7 +367,7 @@ void OpenvpnManagementHandler::socketReadyRead()
// else if ( line.find( "SUCCESS: 'Auth' username entered", 0, FALSE ) > -1 ) {
//
// if ( GlobalConfig->KvpncDebugLevel > 2 )
- // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message, 2. step" ).arg("'need username/password'"), GlobalConfig->debug );
+ // GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message, 2. step" ).tqarg("'need username/password'"), GlobalConfig->debug );
//
// if ( GlobalConfig->KvpncDebugLevel > 2 )
// GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Send password..." ), GlobalConfig->debug );
@@ -383,7 +383,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("'HTTP Proxy password'"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("'HTTP Proxy password'"), GlobalConfig->debug );
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Send HTTP Proxy username..." ), GlobalConfig->debug );
@@ -402,7 +402,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS: 'HTTP Proxy' username entered"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS: 'HTTP Proxy' username entered"), GlobalConfig->debug );
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Send HTTP Proxy password..." ), GlobalConfig->debug );
@@ -486,7 +486,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("'private key password'"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("'private key password'"), GlobalConfig->debug );
if ( !GlobalConfig->currentProfile->getPrivateKeyPass().isEmpty() )
{
@@ -643,7 +643,7 @@ void OpenvpnManagementHandler::socketReadyRead()
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: password verification failed!" , GlobalConfig->error );
- GlobalConfig->appendLogEntry( i18n( "Authentication failed (%1)!" ).arg( i18n( "user password" ) ) , GlobalConfig->error );
+ GlobalConfig->appendLogEntry( i18n( "Authentication failed (%1)!" ).tqarg( i18n( "user password" ) ) , GlobalConfig->error );
abort = true;
}
@@ -654,7 +654,7 @@ void OpenvpnManagementHandler::socketReadyRead()
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry( i18n("OpenvpnManagementHandler: CA certifcate file could not be loaded! Please check your CA certificate file.") , GlobalConfig->error );
- GlobalConfig->appendLogEntry( i18n( "Certificate load failed (%1)!" ).arg( i18n( "CA certificate" ) ) , GlobalConfig->error );
+ GlobalConfig->appendLogEntry( i18n( "Certificate load failed (%1)!" ).tqarg( i18n( "CA certificate" ) ) , GlobalConfig->error );
abort = true;
}
@@ -663,9 +663,9 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry( i18n("OpenvpnManagementHandler: Hash algorithm %1 could not found! Please check your OpenVPN settings.").arg(line.section(' ',3,3).remove('\'')) , GlobalConfig->error );
+ GlobalConfig->appendLogEntry( i18n("OpenvpnManagementHandler: Hash algorithm %1 could not found! Please check your OpenVPN settings.").tqarg(line.section(' ',3,3).remove('\'')) , GlobalConfig->error );
- GlobalConfig->appendLogEntry( i18n( "Hash algorithm not found (%1)!" ).arg(line.section(' ',3,3).remove('\'') ) , GlobalConfig->error );
+ GlobalConfig->appendLogEntry( i18n( "Hash algorithm not found (%1)!" ).tqarg(line.section(' ',3,3).remove('\'') ) , GlobalConfig->error );
abort = true;
}
@@ -682,7 +682,7 @@ void OpenvpnManagementHandler::socketReadyRead()
GlobalConfig->TmpPrivateKeyPass = "";
EnterXauthInteractivePasscodeDialog dlg( 0);
dlg.setCaption( i18n( "Enter token pin" ) );
- dlg.main->DescriptionLabel->setText( i18n( "Enter eToken pin for unlocking token \"%1\":" ).arg(GlobalConfig->currentProfile->getPkcs11Id()) );
+ dlg.main->DescriptionLabel->setText( i18n( "Enter eToken pin for unlocking token \"%1\":" ).tqarg(GlobalConfig->currentProfile->getPkcs11Id()) );
dlg.main->LabelPassword->setText( i18n( "eToken pin:" ) );
dlg.main->SavePasswordCheckBox->hide();
dlg.main->adjustSize();
@@ -727,7 +727,7 @@ void OpenvpnManagementHandler::socketReadyRead()
else if ( line.find( "SUCCESS: 'eToken token' password entered, but not yet verified", 0, FALSE ) > -1 )
{
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS for 'eToken token' password"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS for 'eToken token' password"), GlobalConfig->debug );
}
else if ( line.find( ">PASSWORD:Need '", 0, FALSE) > -1 && line.find( "token' password", 0, FALSE ) > -1)
@@ -738,7 +738,7 @@ void OpenvpnManagementHandler::socketReadyRead()
TQString TokenName = line.section('\'',1,1);
if ( GlobalConfig->KvpncDebugLevel > 4 )
{
- GlobalConfig->appendLogEntry ( "[openvpn] " + i18n( "token name detected: %1\n" ).arg(TokenName), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( "[openvpn] " + i18n( "token name detected: %1\n" ).tqarg(TokenName), GlobalConfig->debug );
}
TQTextStream os( socket );
@@ -747,7 +747,7 @@ void OpenvpnManagementHandler::socketReadyRead()
GlobalConfig->TmpPrivateKeyPass = "";
EnterXauthInteractivePasscodeDialog dlg( 0);
dlg.setCaption( i18n( "Enter token pin" ) );
- dlg.main->DescriptionLabel->setText( i18n( "Enter pin for unlocking token \"%1\":" ).arg(GlobalConfig->currentProfile->getPkcs11Id()) );
+ dlg.main->DescriptionLabel->setText( i18n( "Enter pin for unlocking token \"%1\":" ).tqarg(GlobalConfig->currentProfile->getPkcs11Id()) );
dlg.main->LabelPassword->setText( i18n( "PIN:" ) );
dlg.main->SavePasswordCheckBox->hide();
dlg.main->adjustSize();
@@ -794,23 +794,23 @@ void OpenvpnManagementHandler::socketReadyRead()
TQString TokenName = line.section('\'',1,1);
if ( GlobalConfig->KvpncDebugLevel > 4 )
{
- GlobalConfig->appendLogEntry ( "[openvpn] " + i18n( "token name detected: %1\n" ).arg(TokenName), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( "[openvpn] " + i18n( "token name detected: %1\n" ).tqarg(TokenName), GlobalConfig->debug );
}
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS for '%1' password").arg(TokenName), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS for '%1' password").tqarg(TokenName), GlobalConfig->debug );
}
else if ( line.find( "SUCCESS: 'Auth' password entered, but not yet verified", 0, FALSE ) > -1 )
{
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS for user password"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS for user password"), GlobalConfig->debug );
}
else if ( line.find( "Need 'token-insertion-request'", 0, FALSE ) > -1 )
{
// if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("token-insertion-request"), GlobalConfig->debug );
- KMessageBox::error ( 0, i18n("Token \"%1\" is not inserted!").arg(GlobalConfig->currentProfile->getPkcs11Id()), i18n("Token missing") );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("token-insertion-request"), GlobalConfig->debug );
+ KMessageBox::error ( 0, i18n("Token \"%1\" is not inserted!").tqarg(GlobalConfig->currentProfile->getPkcs11Id()), i18n("Token missing") );
abort = true;
}
@@ -818,7 +818,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).arg("SUCCESS for 'Private Key' password"), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got %1 message" ).tqarg("SUCCESS for 'Private Key' password"), GlobalConfig->debug );
}
else if ( line.find( "external program fork failed", 0, FALSE ) > -1 )
{
@@ -830,7 +830,7 @@ void OpenvpnManagementHandler::socketReadyRead()
else
{
if ( GlobalConfig->KvpncDebugLevel > 1 )
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got other management message: %1" ).arg(line), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "got other management message: %1" ).tqarg(line), GlobalConfig->debug );
}
if (abort)
{
@@ -861,7 +861,7 @@ void OpenvpnManagementHandler::socketReadyRead()
{
if ( GlobalConfig->KvpncDebugLevel > 4 )
{
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Socket state is strange: %1" ).arg( TQString().setNum( socket->state() ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Socket state is strange: %1" ).tqarg( TQString().setNum( socket->state() ) ), GlobalConfig->debug );
}
}
}
@@ -888,7 +888,7 @@ bool OpenvpnManagementHandler::doConnect()
{
if ( GlobalConfig->KvpncDebugLevel > 1 )
{
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connecting to the OpenVPN manage port (%1)..." ).arg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connecting to the OpenVPN manage port (%1)..." ).tqarg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
}
socket->connectToHost( "127.0.0.1", GlobalConfig->OpenvpnManagementPort );
@@ -919,7 +919,7 @@ void OpenvpnManagementHandler::hostFound()
// KMessageBox::error ( 0, TQString("bar"), TQString("foo") );
if ( GlobalConfig->KvpncDebugLevel > 1 )
{
- GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connecting to the OpenVPN manage port (%1)... host found" ).arg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
+ GlobalConfig->appendLogEntry( "OpenvpnManagementHandler: " + i18n( "Connecting to the OpenVPN manage port (%1)... host found" ).tqarg( TQString().setNum( GlobalConfig->OpenvpnManagementPort ) ), GlobalConfig->debug );
}
}