Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 45065b5c5e)
r14.1.x
Michele Calgaro 1 year ago
parent 1cf53c1d53
commit 1172d1f64c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -549,7 +549,7 @@ void KVpnc::slotSettings()
}
else
{
GlobalConfig->logFileStream << i18n ( "Log session started at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session started at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
}
}
}
@ -558,7 +558,7 @@ void KVpnc::slotSettings()
if ( GlobalConfig->logfile.isOpen() )
{
//TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.close();
}
}
@ -686,7 +686,7 @@ void KVpnc:: quitCalled()
if ( GlobalConfig->logfile.isOpen() )
{
// TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.flush();
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
@ -713,7 +713,7 @@ void KVpnc:: quitCalled()
if ( GlobalConfig->logfile.isOpen() )
{
// TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.flush();
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
@ -740,7 +740,7 @@ void KVpnc:: quitCalled()
if ( GlobalConfig->logfile.isOpen() )
{
// TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.flush();
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
@ -769,7 +769,7 @@ void KVpnc:: quitCalled()
if ( GlobalConfig->logfile.isOpen() )
{
// TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.flush();
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
@ -868,7 +868,7 @@ void KVpnc::closeEvent ( TQCloseEvent *e )
if ( GlobalConfig->logfile.isOpen() )
{
// TQTextStream s( &logfile );
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
}
@ -918,7 +918,7 @@ void KVpnc::closeEvent ( TQCloseEvent *e )
{
if ( GlobalConfig->logfile.isOpen() )
{
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( Qt::TextDate ) << endl;
GlobalConfig->logFileStream << i18n ( "Log session ended at: " ) << TQDateTime::currentDateTime().toString ( TQt::TextDate ) << endl;
GlobalConfig->logfile.flush();
GlobalConfig->logfile.close();
GlobalConfig->appPointer->processEvents();
@ -19981,7 +19981,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("%5: %2@%1, %3 [%4]").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(durationString).arg(PrettyTypeString).arg(ConnectionStatus);
LogMsg = i18n("Successful connected to server: \"%1\", user: \"%2\", IPSec ID: \"%3\" at %4").arg(GlobalConfig->currentProfile->getGateway()).arg(GlobalConfig->currentProfile->getUserName()).arg(GlobalConfig->currentProfile->getID()).arg(TQDateTime::currentDateTime().toString(Qt::TextDate) + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server: \"%1\", user: \"%2\", IPSec ID: \"%3\" at %4").arg(GlobalConfig->currentProfile->getGateway()).arg(GlobalConfig->currentProfile->getUserName()).arg(GlobalConfig->currentProfile->getID()).arg(TQDateTime::currentDateTime().toString(TQt::TextDate) + " [" + PrettyTypeString + "]");
}
if (GlobalConfig->currentProfile->getAuthType() == VpnAccountData::cert)
{
@ -19989,7 +19989,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("%5: %2@%1, %3 [%4]").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(durationString).arg(PrettyTypeString).arg(ConnectionStatus);
LogMsg = i18n("Successful connected to server: \"%1\", user: \"%2\" at %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(TQDateTime::currentDateTime().toString(Qt::TextDate) + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server: \"%1\", user: \"%2\" at %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(TQDateTime::currentDateTime().toString(TQt::TextDate) + " [" + PrettyTypeString + "]");
}
}
else if (GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::pptp)
@ -20001,7 +20001,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("Connected: %2@%1, %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(durationString);
TQString TypeString2 = " [" + PrettyTypeString + TQString("]");
LogMsg = i18n("Successful connected to server \"%1\"\nuser: \"%2\" at %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(TQString(TQDateTime::currentDateTime().toString(Qt::TextDate)) + TypeString2);
LogMsg = i18n("Successful connected to server \"%1\"\nuser: \"%2\" at %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(TQString(TQDateTime::currentDateTime().toString(TQt::TextDate)) + TypeString2);
}
else if (GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::racoon || GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::l2tpd_racoon || GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::freeswan || GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::l2tpd_freeswan)
{
@ -20044,7 +20044,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("Connected: %2@%1, %3").arg(GlobalConfig->currentProfile->getGateway()).arg(Username).arg(durationString);
}
LogMsg = i18n("Policy successful activated and daemon (%1) running for server \"%2\" (%3) at date %4, profile \"%5\".").arg(DaemonString).arg(GlobalConfig->currentProfile->getGateway()).arg(GlobalConfig->TmpGatewayIP).arg(TQDateTime::currentDateTime().toString(Qt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
LogMsg = i18n("Policy successful activated and daemon (%1) running for server \"%2\" (%3) at date %4, profile \"%5\".").arg(DaemonString).arg(GlobalConfig->currentProfile->getGateway()).arg(GlobalConfig->TmpGatewayIP).arg(TQDateTime::currentDateTime().toString(TQt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
}
else if (GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::openvpn)
@ -20055,7 +20055,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("Connected: %1, %2, profile \"%3\"").arg(GlobalConfig->currentProfile->getGateway()).arg(durationString).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(GlobalConfig->currentProfile->getGateway()).arg(TQDateTime::currentDateTime().toString(Qt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(GlobalConfig->currentProfile->getGateway()).arg(TQDateTime::currentDateTime().toString(TQt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
}
else if (GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::vtun)
{
@ -20065,7 +20065,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("Connected: %1, %2, profile \"%3\"").arg(TQString(GlobalConfig->currentProfile->getGateway())).arg(durationString).arg(TQString(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]"));
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(TQString(GlobalConfig->currentProfile->getGateway())).arg(TQDateTime::currentDateTime().toString(Qt::TextDate)).arg(TQString(GlobalConfig->currentProfile->getName()) + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(TQString(GlobalConfig->currentProfile->getGateway())).arg(TQDateTime::currentDateTime().toString(TQt::TextDate)).arg(TQString(GlobalConfig->currentProfile->getName()) + " [" + PrettyTypeString + "]");
}
else if (GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::ssh)
{
@ -20075,7 +20075,7 @@ void KVpnc::setGuiStatus ( int status )
ConnectMsg = i18n("%4: %1, %2, profile \"%3\"").arg(TQString(GlobalConfig->currentProfile->getGateway())).arg(durationString ).arg(TQString(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]"));
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(GlobalConfig->currentProfile->getGateway()).arg(TQDateTime::currentDateTime().toString(Qt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
LogMsg = i18n("Successful connected to server \"%1\" at %2, profile \"%3\".").arg(GlobalConfig->currentProfile->getGateway()).arg(TQDateTime::currentDateTime().toString(TQt::TextDate)).arg(GlobalConfig->currentProfile->getName() + " [" + PrettyTypeString + "]");
}
if (status == GlobalConfig->connected)
KNotifyClient::event ( topLevelWidget() ->winId(), "connection established", ConnectMsg );

@ -204,15 +204,15 @@ void KVpncConfig::appendLogEntry( TQString msg, LogType type )
{
// TQTextStream s( &logfile );
logFileStream << i18n( "Log session started at: " );
logFileStream << TQDateTime::currentDateTime().toString( Qt::TextDate );
logFileStream << TQDateTime::currentDateTime().toString( TQt::TextDate );
logFileStream << "\n";
logfile.flush();
}
}
else
{
TQString date = TQDate().currentDate().toString(Qt::ISODate)+ " ";
TQString time = TQTime().currentTime().toString(Qt::ISODate)+ " ";
TQString date = TQDate().currentDate().toString(TQt::ISODate)+ " ";
TQString time = TQTime().currentTime().toString(TQt::ISODate)+ " ";
TQString prefix="";
switch ( type )
{
@ -1032,7 +1032,7 @@ void KVpncConfig::loadOptions()
else
{
TQTextStream s( &logfile );
s << i18n( "Log session started at: " ) << TQDateTime::currentDateTime().toString( Qt::TextDate ) << endl;
s << i18n( "Log session started at: " ) << TQDateTime::currentDateTime().toString( TQt::TextDate ) << endl;
}
}
@ -1652,7 +1652,7 @@ bool KVpncConfig::exportKvpncConfig(TQString filename)
TQString date (__DATE__);
TQString day= date.section(' ',0,0);
TQString month= TQString().setNum(TQDate::fromString(date.section(' ',0,0),Qt::ISODate).month());
TQString month= TQString().setNum(TQDate::fromString(date.section(' ',0,0),TQt::ISODate).month());
TQString year= date.section(' ',2,2);
TQString currentdate ( date+" "+ TQTime().currentTime().toString( "hh:mm" ) );

@ -33,10 +33,10 @@
#include "kvpnc.h"
static const char *description =
I18N_NOOP ( "TDE frontend for various vpn clients\nCurrently supported protocols:\n* Cisco (vpnc (free), vpnclient (propritary))\n* IPSec (FreeS/WAN, Openswan, strongSwan, racoon)\n* PPTP\n* OpenVPN\n* L2TP (l2tpd, xl2tpd, openl2tp) over IPSec (racoon, FreeS/WAN, Openswan, strongSwan)\n* Vtun\n* SSH" );
// TQDate().fromString(, Qt::LocalDate ).toString( "yyyyMMdd" )
// TQDate().fromString(, TQt::LocalDate ).toString( "yyyyMMdd" )
TQString date ( __DATE__ );
TQString day= date.section ( ' ',0,0 );
TQString month= TQString().setNum ( TQDate::fromString ( date.section ( ' ',0,0 ),Qt::ISODate ).month() );
TQString month= TQString().setNum ( TQDate::fromString ( date.section ( ' ',0,0 ),TQt::ISODate ).month() );
TQString year= date.section ( ' ',2,2 );
TQString currentdate ( "+SVN(" + date+" "+ TQTime().fromString ( TQString ( __TIME__ ) ).toString ( "hhmm" ) + ")" );

Loading…
Cancel
Save