diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-04 23:08:03 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 20:33:51 +0900 |
commit | 1172d1f64cfe6adbb35b1f31363ef25b0d1de9f5 (patch) | |
tree | c3740dbabf2e4fa9a9d54327430b7e451797e1d3 /src | |
parent | 1cf53c1d53e516c56d46c90e1d63810451cfbdb9 (diff) | |
download | kvpnc-1172d1f64cfe6adbb35b1f31363ef25b0d1de9f5.tar.gz kvpnc-1172d1f64cfe6adbb35b1f31363ef25b0d1de9f5.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 45065b5c5e1dbc25db326bdbe086a0f42dbda5a9)
Diffstat (limited to 'src')
-rw-r--r-- | src/kvpnc.cpp | 30 | ||||
-rw-r--r-- | src/kvpncconfig.cpp | 10 | ||||
-rw-r--r-- | src/main.cpp | 4 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/kvpnc.cpp b/src/kvpnc.cpp index 6bcb0a5..c33d1b1 100644 --- a/src/kvpnc.cpp +++ b/src/kvpnc.cpp @@ -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 ); diff --git a/src/kvpncconfig.cpp b/src/kvpncconfig.cpp index a4af3fe..1b90197 100644 --- a/src/kvpncconfig.cpp +++ b/src/kvpncconfig.cpp @@ -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" ) ); diff --git a/src/main.cpp b/src/main.cpp index 729dead..bfa6cc5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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" ) + ")" ); |