@ -357,9 +357,9 @@ KVpnc::~KVpnc()
void KVpnc : : initAction ( )
{
disconnectedIcon = K Global: : iconLoader ( ) - > loadIcon ( " disconnected " , KIcon : : NoGroup , 22 ) ;
connectedIcon = K Global: : iconLoader ( ) - > loadIcon ( " connected " , KIcon : : NoGroup , 22 ) ;
connectingIcon = K Global: : iconLoader ( ) - > loadIcon ( " connecting " , KIcon : : NoGroup , 22 ) ;
disconnectedIcon = TDE Global: : iconLoader ( ) - > loadIcon ( " disconnected " , KIcon : : NoGroup , 22 ) ;
connectedIcon = TDE Global: : iconLoader ( ) - > loadIcon ( " connected " , KIcon : : NoGroup , 22 ) ;
connectingIcon = TDE Global: : iconLoader ( ) - > loadIcon ( " connecting " , KIcon : : NoGroup , 22 ) ;
setIcon ( disconnectedIcon ) ;
( void * ) KStdAction : : quit ( this , TQT_SLOT ( quitCalled ( ) ) , actionCollection ( ) ) ;
@ -537,7 +537,7 @@ void KVpnc::slotSettings()
{
if ( ! GlobalConfig - > logfile . isOpen ( ) )
{
KStandardDirs * dirs = K Global: : dirs ( ) ;
KStandardDirs * dirs = TDE Global: : dirs ( ) ;
TQString logfileName = TQString ( dirs - > saveLocation ( " data " ) ) ;
TQString logfilePath = TQString ( logfileName + " /kvpnc/kvpnc.log " ) ;
//KMessageBox::information( this, "info", logfileName );
@ -1000,7 +1000,7 @@ void KVpnc::restore()
void KVpnc : : saveProperties ( KConfig * c )
{
TQString saveDir = K Global: : dirs ( ) - > saveLocation ( " appdata " , " sessions/ " + tqApp - > sessionId ( ) + " / " , true ) ;
TQString saveDir = TDE Global: : dirs ( ) - > saveLocation ( " appdata " , " sessions/ " + tqApp - > sessionId ( ) + " / " , true ) ;
c = new KSimpleConfig ( saveDir + " list " , false ) ;
c - > setGroup ( " Saved Session " ) ;
@ -1010,7 +1010,7 @@ void KVpnc::saveProperties ( KConfig* c )
void KVpnc : : readProperties ( KConfig * c )
{
TQString saveDir = K Global: : dirs ( ) - > saveLocation ( " appdata " , " sessions/ " + tqApp - > sessionId ( ) + " / " , true ) ;
TQString saveDir = TDE Global: : dirs ( ) - > saveLocation ( " appdata " , " sessions/ " + tqApp - > sessionId ( ) + " / " , true ) ;
c = new KSimpleConfig ( saveDir + " list " , true ) ;
c - > setGroup ( " Saved Session " ) ;
delete c ;
@ -7973,12 +7973,12 @@ void KVpnc::connectClicked()
if ( GlobalConfig - > currentProfile - > getExecuteCmdBeforeConnect ( ) )
executeCommandBeforeConnect ( ) ;
SshProcess = new K Process;
SshProcess = new TDE Process;
* SshProcess < < GlobalConfig - > pathToSsh ;
// SshProcess->setExecutable(GlobalConfig->pathToSsh);
/*
connect ( m_process , TQT_SIGNAL ( processExited ( K Process* ) ) ,
this , TQT_SLOT ( slotProcessExited ( K Process* ) ) ) ; */
connect ( m_process , TQT_SIGNAL ( processExited ( TDE Process* ) ) ,
this , TQT_SLOT ( slotProcessExited ( TDE Process* ) ) ) ; */
// TQString AskPassScript= tmpPath+"ssh."+GlobalConfig->currentProfile->getName()+".askpass.sh";
//
@ -8144,8 +8144,8 @@ void KVpnc::connectClicked()
}
connect ( SshProcess , TQT_SIGNAL ( receivedStdout ( K Process * , char * , int ) ) , this , TQT_SLOT ( readFromStdout_ssh ( K Process * , char * , int ) ) ) ;
connect ( SshProcess , TQT_SIGNAL ( receivedStderr ( K Process * , char * , int ) ) , this , TQT_SLOT ( readFromStderr_ssh ( K Process * , char * , int ) ) ) ;
connect ( SshProcess , TQT_SIGNAL ( receivedStdout ( TDE Process * , char * , int ) ) , this , TQT_SLOT ( readFromStdout_ssh ( TDE Process * , char * , int ) ) ) ;
connect ( SshProcess , TQT_SIGNAL ( receivedStderr ( TDE Process * , char * , int ) ) , this , TQT_SLOT ( readFromStderr_ssh ( TDE Process * , char * , int ) ) ) ;
// connect( SshProcess, TQT_SIGNAL( processExited() ), this, TQT_SLOT( sshExited() ) );
GlobalConfig - > appendLogEntry ( i18n ( " Trying to connect to server \" %1 \" with ... \n " ) . arg ( GlobalConfig - > currentProfile - > getGateway ( ) ) , GlobalConfig - > info ) ;
@ -8179,11 +8179,11 @@ void KVpnc::connectClicked()
return ;
}
// SshProcess->setUsePty( K Process::All ,true);
// SshProcess->setUsePty( TDE Process::All ,true);
// if ( !SshProcess->start( KProcess::NotifyOnExit,KProcess::Communication(K Process::All)))
// if ( !SshProcess->start( KProcess::RunMode(KProcess::NotifyOnExit),KProcess::Communication(K Process::All)))
if ( ! SshProcess - > start ( KProcess: : NotifyOnExit , K Process: : All ) )
// if ( !SshProcess->start( TDEProcess::NotifyOnExit,TDEProcess::Communication(TDE Process::All)))
// if ( !SshProcess->start( TDEProcess::RunMode(TDEProcess::NotifyOnExit),TDEProcess::Communication(TDE Process::All)))
if ( ! SshProcess - > start ( TDEProcess: : NotifyOnExit , TDE Process: : All ) )
{
KMessageBox : : sorry ( this , i18n ( " \" %1 \" start failed! " ) . arg ( " ssh " ) ) ;
GlobalConfig - > appendLogEntry ( i18n ( " \" %1 \" start failed! " ) . arg ( " ssh " ) , GlobalConfig - > error ) ;
@ -11370,7 +11370,7 @@ void KVpnc::vpnTypesInfoClicked()
{
this - > slotStatusMsg ( i18n ( " Calling KVpnc website... " ) , ID_FLASH_MSG ) ;
TQString donateurl = " http://home.gna.org/kvpnc/en/donate.html " ;
TQString browser = TQString ( KConfigGroup ( K Global: : config ( ) , " General " ) . readEntry ( " BrowserApplication " ) ) . remove ( " ! " , " " ) ;
TQString browser = TQString ( KConfigGroup ( TDE Global: : config ( ) , " General " ) . readEntry ( " BrowserApplication " ) ) . remove ( " ! " , " " ) ;
if ( browser . isEmpty ( ) )
browser = " konqueror " ;
@ -11407,7 +11407,7 @@ void KVpnc::vpnTypesInfoClicked()
void KVpnc : : reportBugClicked ( )
{
TQString bugreporturl = " http://bugs.trinitydesktop.org " ;
TQString browser = TQString ( KConfigGroup ( K Global: : config ( ) , " General " ) . readEntry ( " BrowserApplication " ) ) . remove ( " ! " , " " ) ;
TQString browser = TQString ( KConfigGroup ( TDE Global: : config ( ) , " General " ) . readEntry ( " BrowserApplication " ) ) . remove ( " ! " , " " ) ;
if ( browser . isEmpty ( ) )
browser = " konqueror " ;
@ -17719,7 +17719,7 @@ void KVpnc::readFromStderr_vtun()
}
}
void KVpnc : : readFromStdout_ssh ( K Process * , char * buffer , int buflen )
void KVpnc : : readFromStdout_ssh ( TDE Process * , char * buffer , int buflen )
{
// while ( SshProcess->canReadLineStdout() )
// {
@ -18133,7 +18133,7 @@ void KVpnc::readFromStdout_ssh ( KProcess *, char *buffer, int buflen )
}
}
void KVpnc : : readFromStderr_ssh ( K Process * , char * buffer , int buflen )
void KVpnc : : readFromStderr_ssh ( TDE Process * , char * buffer , int buflen )
{
// while ( SshProcess->canReadLineStderr() )
// {
@ -22918,7 +22918,7 @@ void KVpnc::saveGuiOptions()
void KVpnc : : startConnectionStatusCheck ( )
{
KStandardDirs * dirs = K Global: : dirs ( ) ;
KStandardDirs * dirs = TDE Global: : dirs ( ) ;
TQString PingCheckScript = TQString ( dirs - > findResource ( " data " , " kvpnc/ping_check.sh " ) ) ;
//GlobalConfig->appendLogEntry( TQString("PingCheckScript : " +PingCheckScript), GlobalConfig->debug);
ConnectionStatusCheckProcess = new TQProcess ( this ) ;