summaryrefslogtreecommitdiffstats
path: root/src/importipsecprofiledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/importipsecprofiledialog.cpp')
-rw-r--r--src/importipsecprofiledialog.cpp194
1 files changed, 97 insertions, 97 deletions
diff --git a/src/importipsecprofiledialog.cpp b/src/importipsecprofiledialog.cpp
index 82de933..c448819 100644
--- a/src/importipsecprofiledialog.cpp
+++ b/src/importipsecprofiledialog.cpp
@@ -34,16 +34,16 @@
#include <kpassdlg.h>
#include <kpushbutton.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qurl.h>
+#include <tqfile.h>
+#include <tqurl.h>
#include <kurl.h>
-#include <qtextstream.h>
-#include <qcheckbox.h>
-#include <qlistview.h>
+#include <tqtextstream.h>
+#include <tqcheckbox.h>
+#include <tqlistview.h>
#include <string>
-#include <qprocess.h>
-#include <qregexp.h>
-#include <qdialog.h>
+#include <tqprocess.h>
+#include <tqregexp.h>
+#include <tqdialog.h>
#include <iostream>
@@ -56,7 +56,7 @@
//END INCLUDES
-ImportIpsecProfileDialog::ImportIpsecProfileDialog ( KVpncConfig *GlobalConfig, QWidget *parent, const QString& caption, QString file )
+ImportIpsecProfileDialog::ImportIpsecProfileDialog ( KVpncConfig *GlobalConfig, TQWidget *parent, const TQString& caption, TQString file )
: KDialogBase ( parent, "Import_Ipsec_profile", true, caption, KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true )
{
if ( !file.isEmpty() )
@@ -70,7 +70,7 @@ ImportIpsecProfileDialog::ImportIpsecProfileDialog ( KVpncConfig *GlobalConfig,
main = new ImportOpenvpnProfileDialogBase ( this );
setMainWidget ( main );
- //main->setMinimumSize(main->sizeHint());
+ //main->setMinimumSize(main->tqsizeHint());
main->FilenameUrlrequester->setFilter ( "*.conf" );
main->FilenameUrlrequester->setURL ( filename );
@@ -108,7 +108,7 @@ void ImportIpsecProfileDialog::reject()
void ImportIpsecProfileDialog::canAccept()
{
- QFile f ( filename );
+ TQFile f ( filename );
if ( !f.exists() )
{
KMessageBox::sorry ( 0, i18n ( "File not found." ), i18n ( "No File" ) );
@@ -118,44 +118,44 @@ void ImportIpsecProfileDialog::canAccept()
}
- QFile IpsecConfigFile ( filename );
- QString importprefix = QFileInfo ( filename ).dirPath();
+ TQFile IpsecConfigFile ( filename );
+ TQString importprefix = TQFileInfo ( filename ).dirPath();
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "IPSec import: import prefix: %1" ).arg ( importprefix ), GlobalConfig->debug );
- QString certprefix = locateLocal ( "data", "kvpnc" );
+ TQString certprefix = locateLocal ( "data", "kvpnc" );
if ( IpsecConfigFile.open ( IO_ReadOnly ) )
{
- QPtrList<VpnAccountData> *ImportedAccountList = new QPtrList<VpnAccountData>();
+ TQPtrList<VpnAccountData> *ImportedAccountList = new TQPtrList<VpnAccountData>();
ImportedAccountList->setAutoDelete ( TRUE ); // the list owns the objects
- QPtrList<IpsecImportSection> *IpsecImportSectionList = new QPtrList<IpsecImportSection>();
+ TQPtrList<IpsecImportSection> *IpsecImportSectionList = new TQPtrList<IpsecImportSection>();
bool isIpsecGlobalSection=false;
bool firstSectionFound=false;
bool defaultSectionFound=false;
bool useNat=false;
bool disableOpportunisticEncryption=true;
- QStringList InterfaceList;
+ TQStringList InterfaceList;
int IpsecVersion=1;
// bool pskIsInFile=true;
- QString PskFile="/etc/ipsec.secrets";
- QString CertPath="/etc/ipsec.d/certs";
+ TQString PskFile="/etc/ipsec.secrets";
+ TQString CertPath="/etc/ipsec.d/certs";
- QString IpsecConfigSection="";
+ TQString IpsecConfigSection="";
bool validLineFound=false;
- QString line = NULL;
- QString IpsecConfigSectionName="";
- QString IpsecConfigData="";
+ TQString line = NULL;
+ TQString IpsecConfigSectionName="";
+ TQString IpsecConfigData="";
bool sectionEndFound=false;
// std::cout << "pass1: collecting sections" << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: pass1: collecting sections" ),GlobalConfig->debug );
- QTextStream stream ( &IpsecConfigFile );
+ TQTextStream stream ( &IpsecConfigFile );
while ( !stream.atEnd() )
{
line = stream.readLine().replace ( "\"","" );
@@ -217,11 +217,11 @@ void ImportIpsecProfileDialog::canAccept()
}
if ( line.startsWith ( "version" ) )
{
- IpsecVersion=QString ( line.simplifyWhiteSpace().section ( '#',0,0 ).section ( " ",1,1 ).stripWhiteSpace() ).toFloat();
+ IpsecVersion=TQString ( line.simplifyWhiteSpace().section ( '#',0,0 ).section ( " ",1,1 ).stripWhiteSpace() ).toFloat();
validLineFound=true;
// std::cout << "ipsec version found: " << IpsecVersion << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: ipsec version found: " ) + QString().setNum ( IpsecVersion ) ,GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: ipsec version found: " ) + TQString().setNum ( IpsecVersion ) ,GlobalConfig->debug );
}
if ( line.startsWith ( "config setup" ) )
{
@@ -235,7 +235,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( isIpsecGlobalSection==true )
{
- QString line2 = GlobalConfig->removeWhiteSpaceAtBegin ( line );
+ TQString line2 = GlobalConfig->removeWhiteSpaceAtBegin ( line );
// std::cout << "global section line: " << line2 << std::endl;
if ( line2.startsWith ( "plutodebug" ) )
{
@@ -271,7 +271,7 @@ void ImportIpsecProfileDialog::canAccept()
}
else
{
- InterfaceList = QStringList::split ( ' ',line2.replace ( "interfaces=","" ).replace ( QRegExp ( "ipsec[0-9]=" ),"" ) );
+ InterfaceList = TQStringList::split ( ' ',line2.replace ( "interfaces=","" ).replace ( TQRegExp ( "ipsec[0-9]=" ),"" ) );
// std::cout << "interface list: " << InterfaceList << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: use interface from list:" ) + " "+InterfaceList.join ( ", " ),GlobalConfig->debug );
@@ -293,7 +293,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( !sectionEndFound && firstSectionFound==true )
{
// collecting data
- QString cleanLine = GlobalConfig->removeWhiteSpaceAtBegin ( line ) +"\n";
+ TQString cleanLine = GlobalConfig->removeWhiteSpaceAtBegin ( line ) +"\n";
// std:: cout << "clean line: \"" << cleanLine << "\"" << std::endl;
if ( !cleanLine.startsWith ( "#" ) && !cleanLine.startsWith ( "include" ) && cleanLine != "" && !line.startsWith ( "conn" ) && cleanLine != "\n" )
{
@@ -331,15 +331,15 @@ void ImportIpsecProfileDialog::canAccept()
// std::cout << "sections: IpsecImportSectionList: " << IpsecImportSectionList->count() << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: sections: " ) + QString().setNum ( IpsecImportSectionList->count() ),GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: sections: " ) + TQString().setNum ( IpsecImportSectionList->count() ),GlobalConfig->debug );
if ( !IpsecImportSectionList->isEmpty() )
{
for ( int i=0; i< ( int ) IpsecImportSectionList->count();i++ )
{
IpsecImportSection *section = IpsecImportSectionList->at ( i );
- QString Name= section->SectionName;
- QStringList data = QStringList::split ( '\n',section->SectionData.join ( "\n" ) );
+ TQString Name= section->SectionName;
+ TQStringList data = TQStringList::split ( '\n',section->SectionData.join ( "\n" ) );
// std::cout << " => processing section: \"" << Name << "\"" << std::endl;
@@ -348,9 +348,9 @@ void ImportIpsecProfileDialog::canAccept()
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: => processing section: " ) +"\"" + Name + "\"",GlobalConfig->debug );
- for ( QStringList::Iterator it2 = data.begin(); it2 != data.end(); ++it2 )
+ for ( TQStringList::Iterator it2 = data.begin(); it2 != data.end(); ++it2 )
{
- QString dataline = *it2;
+ TQString dataline = *it2;
// std::cout << "dataline found: \"" << dataline.remove("\n") << "\"" << std::endl;
if ( GlobalConfig->removeWhiteSpaceAtBegin ( dataline ).startsWith ( "also=" ) )
{
@@ -358,11 +358,11 @@ void ImportIpsecProfileDialog::canAccept()
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: also= found, looking for other section..." ),GlobalConfig->debug );
- QString newdata = QString ( section->SectionData.join ( "\n" ) );
- newdata.replace ( QRegExp ( "^.*also=.*$" ),"" );
+ TQString newdata = TQString ( section->SectionData.join ( "\n" ) );
+ newdata.replace ( TQRegExp ( "^.*also=.*$" ),"" );
section->SectionData= newdata;
- QString OtherSection=dataline.simplifyWhiteSpace().section ( '#',0,0 ).section ( "=",1,1 );
+ TQString OtherSection=dataline.simplifyWhiteSpace().section ( '#',0,0 ).section ( "=",1,1 );
// we have to find the other section and replace this line by the config data of the other section (after the =)
bool section_found=false;
for ( IpsecImportSection * it3 = IpsecImportSectionList->first(); it3; it3 = IpsecImportSectionList->next() )
@@ -377,23 +377,23 @@ void ImportIpsecProfileDialog::canAccept()
section_found=true;
// data.remove(dataline);
dataline="";
- // QStringList otherdata = QStringList::split("\n",QString(it3->SectionData.join("\n")));
- QString OtherData = QString ( it3->SectionData.join ( "\n" ) );
+ // TQStringList otherdata = TQStringList::split("\n",TQString(it3->SectionData.join("\n")));
+ TQString OtherData = TQString ( it3->SectionData.join ( "\n" ) );
- QStringList newdata;
+ TQStringList newdata;
- for ( QStringList::Iterator it6 = data.begin(); it6 != data.end(); ++it6 )
+ for ( TQStringList::Iterator it6 = data.begin(); it6 != data.end(); ++it6 )
{
// std::cout << " also line: " << *it6 << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: also line: " ) + QString ( *it6 ),GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: also line: " ) + TQString ( *it6 ),GlobalConfig->debug );
- if ( QString ( *it6 ).find ( "also=" ) < 0 )
+ if ( TQString ( *it6 ).find ( "also=" ) < 0 )
{
// std::cout << " also= found." << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: also= found." ),GlobalConfig->debug );
- newdata.append ( QString ( *it6 ) );
+ newdata.append ( TQString ( *it6 ) );
}
else
{
@@ -426,17 +426,17 @@ void ImportIpsecProfileDialog::canAccept()
for ( int i=0; i< ( int ) IpsecImportSectionList->count();i++ )
{
IpsecImportSection *section2 = IpsecImportSectionList->at ( i );
- QString Name= section2->SectionName;
+ TQString Name= section2->SectionName;
if ( Name == "%default" )
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: => appending %default section: " ) +"\"" + section2->SectionData.join ( "\n" ) ,GlobalConfig->debug );
- QStringList defaultdata = QStringList::split ( '\n',section2->SectionData.join ( "\n" ) );
+ TQStringList defaultdata = TQStringList::split ( '\n',section2->SectionData.join ( "\n" ) );
- for ( QStringList::Iterator defaultit = defaultdata.begin(); defaultit != defaultdata.end(); ++defaultit )
+ for ( TQStringList::Iterator defaultit = defaultdata.begin(); defaultit != defaultdata.end(); ++defaultit )
{
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: => appending %default line: " ) +"\"" + *defaultit,GlobalConfig->debug );
@@ -454,8 +454,8 @@ void ImportIpsecProfileDialog::canAccept()
// KVpncConfig->IpsecImportSection *it5=NULL;
// for ( it5 = IpsecImportSectionList->first(); it5; it5 = IpsecImportSectionList->next() )
// {
-// QString SectionName= it5->SectionName;
-// QStringList data = it5->SectionData;
+// TQString SectionName= it5->SectionName;
+// TQStringList data = it5->SectionData;
//
// std::cout << SectionName << std::endl;
// std::cout << data.join("\n") << std::endl;
@@ -465,7 +465,7 @@ void ImportIpsecProfileDialog::canAccept()
for ( int i=0; i< ( int ) IpsecImportSectionList->count();i++ )
{
IpsecImportSection *section = IpsecImportSectionList->at ( i );
- QString Name= section->SectionName;
+ TQString Name= section->SectionName;
if ( Name == "%default" )
{
IpsecImportSectionList->remove ( IpsecImportSectionList->at ( i ) );
@@ -480,8 +480,8 @@ void ImportIpsecProfileDialog::canAccept()
IpsecImportSection *it5=NULL;
for ( it5 = IpsecImportSectionList->first(); it5; it5 = IpsecImportSectionList->next() )
{
- QString SectionName= it5->SectionName;
- QStringList data = it5->SectionData;
+ TQString SectionName= it5->SectionName;
+ TQStringList data = it5->SectionData;
GlobalConfig->appendLogEntry ( SectionName ,GlobalConfig->debug );
GlobalConfig->appendLogEntry ( data.join ( "\n" ) ,GlobalConfig->debug );
@@ -500,27 +500,27 @@ void ImportIpsecProfileDialog::canAccept()
{
IpsecImportSection *section = IpsecImportSectionList->at ( i );
- QStringList sectiondata = QStringList::split ( '\n',section->SectionData.join ( "\n" ) );
+ TQStringList sectiondata = TQStringList::split ( '\n',section->SectionData.join ( "\n" ) );
// std::cout << " => processing section: \"" << section->SectionName << "\"" << std::endl;
// std::cout << " => data: \"" << section->SectionData.join("\n") << "\"" << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: => processing section: " ) +"\"" + section->SectionName + "\"" ,GlobalConfig->debug );
- VpnAccountData *profiledata = new VpnAccountData ( VpnAccountData::freeswan,QString ( section->SectionName ) ) ;
+ VpnAccountData *profiledata = new VpnAccountData ( VpnAccountData::freeswan,TQString ( section->SectionName ) ) ;
- for ( QStringList::Iterator it2 = sectiondata.begin(); it2!= sectiondata.end() ; it2++ )
+ for ( TQStringList::Iterator it2 = sectiondata.begin(); it2!= sectiondata.end() ; it2++ )
{
- QString dataline = *it2;
+ TQString dataline = *it2;
- QString line2 = GlobalConfig->removeWhiteSpaceAtBegin ( dataline ); // line of text excluding '\n' and replace all white chars with one blank
+ TQString line2 = GlobalConfig->removeWhiteSpaceAtBegin ( dataline ); // line of text excluding '\n' and replace all white chars with one blank
// std::cout << "dataline: \"" << line2 << "\"";
if ( line2.startsWith ( "rightsubnet=" ) )
{
validLineFound=true;
- QString RightSubnet=line2.section ( "rightsubnet=",1,-1 );
+ TQString RightSubnet=line2.section ( "rightsubnet=",1,-1 );
// std::cout << "right subnet (remote) found: " << RightSubnet << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: right subnet (remote) found: " ) + RightSubnet ,GlobalConfig->debug );
@@ -535,7 +535,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftsubnet=" ) )
{
validLineFound=true;
- QString LeftSubnet=line2.section ( "leftsubnet=",1,-1 );
+ TQString LeftSubnet=line2.section ( "leftsubnet=",1,-1 );
// std::cout << "left subnet (local) found: " << LeftSubnet << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: left subnet (local) found: " ) + LeftSubnet ,GlobalConfig->debug );
@@ -548,7 +548,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightnexthop=" ) )
{
validLineFound=true;
- QString RightNextHop=line2.section ( "rightnexthop=",1,-1 );
+ TQString RightNextHop=line2.section ( "rightnexthop=",1,-1 );
// std::cout << "right next hop (remote) found: " << RightNextHop << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: right next hop (remote) found: " ) +RightNextHop ,GlobalConfig->debug );
@@ -561,7 +561,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftnexthop=" ) )
{
validLineFound=true;
- QString LeftNextHop=line2.section ( "leftnexthop=",1,-1 );
+ TQString LeftNextHop=line2.section ( "leftnexthop=",1,-1 );
std::cout << "left next hop (local) found: " << LeftNextHop << std::endl;
if (GlobalConfig->KvpncDebugLevel > 2)
GlobalConfig->appendLogEntry("import ipsec config: left next hop (local) found: " +LeftNextHop ,GlobalConfig->debug);
@@ -574,7 +574,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "left=" ) )
{
validLineFound=true;
- QString left=line2.section ( "left=",1,-1 );
+ TQString left=line2.section ( "left=",1,-1 );
// local ip cant be set yet.
// std::cout << "left found: " << left << std::endl;
// if (GlobalConfig->KvpncDebugLevel > 2)
@@ -587,7 +587,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "right=" ) )
{
validLineFound=true;
- QString right=line2.section ( "right=",1,-1 );
+ TQString right=line2.section ( "right=",1,-1 );
// std::cout << "right (remote gateway) found: " << right << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: right (remote gateway) found: " ) + right ,GlobalConfig->debug );
@@ -599,7 +599,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftcert=" ) )
{
validLineFound=true;
- QString LeftCert=line2.section ( "leftcert=",1,-1 );
+ TQString LeftCert=line2.section ( "leftcert=",1,-1 );
// std::cout << "left cert (local) found: " << LeftCert << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: left cert (local) found: " ) + LeftCert ,GlobalConfig->debug );
@@ -611,7 +611,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightcert=" ) )
{
validLineFound=true;
- QString RightCert=line2.section("rightcert=",1,-1);
+ TQString RightCert=line2.section("rightcert=",1,-1);
// std::cout << "right cert (remote) found: " << RightCert << std::endl;
if (GlobalConfig->KvpncDebugLevel > 2)
GlobalConfig->appendLogEntry(i18n ("import ipsec config: right cert (remote) found: ") + RightCert ,GlobalConfig->debug);
@@ -624,7 +624,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightca=" ) )
{
validLineFound=true;
- QString RightCA=line2.section ( "rightca=",1,-1 );
+ TQString RightCA=line2.section ( "rightca=",1,-1 );
// std::cout << "right CA (remote) found: " << RightCA << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: right CA (remote) found: " ) +RightCA ,GlobalConfig->debug );
@@ -636,7 +636,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightid=" ) )
{
validLineFound=true;
- QString RightID=line2.section ( "rightid=",1,-1 );
+ TQString RightID=line2.section ( "rightid=",1,-1 );
// std::cout << "right ID (remote) found: " << RightID << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: right ID (remote) found: " ) + RightID ,GlobalConfig->debug );
@@ -650,7 +650,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftid=" ) )
{
validLineFound=true;
- QString LeftID=line2.section ( "leftid=",1,-1 );
+ TQString LeftID=line2.section ( "leftid=",1,-1 );
// std::cout << "local ID (local) found: " << LeftID << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: local ID (local) found: " ) + LeftID ,GlobalConfig->debug );
@@ -664,7 +664,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightrsasigkey=" ) )
{
validLineFound=true;
- QString RightRsaSigKey=line2.section ( "rightrsasigkey=",1,-1 );
+ TQString RightRsaSigKey=line2.section ( "rightrsasigkey=",1,-1 );
// std::cout << "right uses (remote) " << RightRsaSigKey << std::endl;
if (RightRsaSigKey=="%cert")
{
@@ -690,7 +690,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftrsasigkey=" ) )
{
validLineFound=true;
- QString LeftRsaSigKey=line2.section ( "leftrsasigkey=",1,-1 );
+ TQString LeftRsaSigKey=line2.section ( "leftrsasigkey=",1,-1 );
// std::cout << "right uses (remote) " << LeftRsaSigKey << std::endl;
if (LeftRsaSigKey=="%cert")
{
@@ -716,7 +716,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "authby=" ) )
{
validLineFound=true;
- QString Authby=line2.simplifyWhiteSpace().section ( "authby=",1,1 );
+ TQString Authby=line2.simplifyWhiteSpace().section ( "authby=",1,1 );
// std::cout << "left and right use certs " << std::endl;
if ( Authby.find ( "rsasig", 0 , FALSE ) > -1 )
{
@@ -750,7 +750,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "auto=start" ) )
{
// validLineFound=true;
- // QString Authby=line2.simplifyWhiteSpace().section('#',0,0).section("=",1,1);
+ // TQString Authby=line2.simplifyWhiteSpace().section('#',0,0).section("=",1,1);
// std::cout << "profile should be started" << std::endl;
// if (GlobalConfig->KvpncDebugLevel > 2)
// GlobalConfig->appendLogEntry("import ipsec config: profile should be started" ,GlobalConfig->debug);
@@ -762,7 +762,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftsourceip=" ) )
{
validLineFound=true;
- QString leftsourceip=line2.section ( "leftsourceip=",1,-1 );
+ TQString leftsourceip=line2.section ( "leftsourceip=",1,-1 );
std::cout << "left (local) have to use IP address " << leftsourceip << std::endl;
if (GlobalConfig->KvpncDebugLevel > 2)
GlobalConfig->appendLogEntry("import ipsec config: left (local) have to use IP address " + leftsourceip ,GlobalConfig->debug);
@@ -774,7 +774,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "virtual_private=" ) )
{
validLineFound=true;
- QString virtualprivate=line2.section ( "virtual_private=",1,-1 );
+ TQString virtualprivate=line2.section ( "virtual_private=",1,-1 );
std::cout << "virtual private networks " << virtualprivate << std::endl;
if (GlobalConfig->KvpncDebugLevel > 2)
GlobalConfig->appendLogEntry("import ipsec config: virtual private networks " +virtualprivate ,GlobalConfig->debug);
@@ -787,7 +787,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightsourceip=" ) )
{
validLineFound=true;
- QString rightsourceip=line2.section ( "rightsourceip=",1,-1 );
+ TQString rightsourceip=line2.section ( "rightsourceip=",1,-1 );
std::cout << "right (remote) have to use IP address " << rightsourceip << std::endl;
if (GlobalConfig->KvpncDebugLevel > 2)
GlobalConfig->appendLogEntry("import ipsec config: right (remote) have to use IP address " + rightsourceip ,GlobalConfig->debug);
@@ -800,7 +800,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "esp=" ) )
{
validLineFound=true;
- QString IpsecEsp=line2.section ( "esp=",1,-1 );
+ TQString IpsecEsp=line2.section ( "esp=",1,-1 );
// std::cout << "esp settings found: " << IpsecEsp << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: esp settings found: " ) + IpsecEsp ,GlobalConfig->debug );
@@ -813,7 +813,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "ike=" ) )
{
validLineFound=true;
- QString IpsecIke=line2.section ( "ike=",1,-1 );
+ TQString IpsecIke=line2.section ( "ike=",1,-1 );
// std::cout << "ike settings found: " << IpsecIke << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: ike settings found: " ) + IpsecIke ,GlobalConfig->debug );
@@ -826,7 +826,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "type=" ) )
{
validLineFound=true;
- QString IpsecVpnMode=line2.section ( "type=",1,1 );
+ TQString IpsecVpnMode=line2.section ( "type=",1,1 );
// std::cout << "IpsecType found: " << IpsecType << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: IPsec vpn mode found: " ) + IpsecVpnMode ,GlobalConfig->debug );
@@ -841,7 +841,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "leftxauthclient=" ) )
{
validLineFound=true;
- QString useXauth=line2.section ( "leftxauthclient=",1,1 );
+ TQString useXauth=line2.section ( "leftxauthclient=",1,1 );
if (useXauth=="yes")
{
//std::cout << "Use XAUTH: " << i18n("yes") << std::endl;
@@ -863,7 +863,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "rightxauthserver=" ) )
{
validLineFound=true;
- QString useXauth=line2.section ( "rightxauthserver=",1,-1 );
+ TQString useXauth=line2.section ( "rightxauthserver=",1,-1 );
if (useXauth == "yes")
{
//std::cout << "Use XAUTH: " << i18n("yes") << std::endl;
@@ -885,10 +885,10 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "keyingtries=" ) )
{
validLineFound=true;
- int MaxConnectTries=QString(line2.section ( "keyingtries=",1,1 )).toInt();
+ int MaxConnectTries=TQString(line2.section ( "keyingtries=",1,1 )).toInt();
// std::cout << "keyingtries found: " << MaxConnectTries << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
- GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: keyingtries found: " ) + QString().setNum(MaxConnectTries) ,GlobalConfig->debug );
+ GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: keyingtries found: " ) + TQString().setNum(MaxConnectTries) ,GlobalConfig->debug );
profiledata->setMaxConnectTries ( MaxConnectTries );
// std::cout << " => set it for profile " << IpsecConfigSection << " ." << std::endl;
// if (GlobalConfig->KvpncDebugLevel > 2)
@@ -897,7 +897,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "pfs=" ) )
{
validLineFound=true;
- QString UsePerfectForwardSecrety=line2.section ( "pfs=",1,1 ).remove ( '"' );
+ TQString UsePerfectForwardSecrety=line2.section ( "pfs=",1,1 ).remove ( '"' );
if (UsePerfectForwardSecrety =="yes")
{
//std::cout << "Use PFS: " << i18n("yes") << std::endl;
@@ -919,7 +919,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "pfsgroup=" ) )
{
validLineFound=true;
- QString PerfectForwardSecrety=line2.section ( "pfsgroup=",1,1 );
+ TQString PerfectForwardSecrety=line2.section ( "pfsgroup=",1,1 );
// std::cout << "keyingtries found: " << MaxConnectTries << std::endl;
if ( GlobalConfig->KvpncDebugLevel > 2 )
GlobalConfig->appendLogEntry ( i18n ( "import ipsec config: PFS group found: " ) + PerfectForwardSecrety ,GlobalConfig->debug );
@@ -931,7 +931,7 @@ void ImportIpsecProfileDialog::canAccept()
if ( line2.startsWith ( "aggrmode=" ) )
{
validLineFound=true;
- QString UseAgressiveMode=line2.section ( "aggrmode=",1,1 ).remove ( '"' );
+ TQString UseAgressiveMode=line2.section ( "aggrmode=",1,1 ).remove ( '"' );
if (UseAgressiveMode == "yes")
{
//std::cout << "Exchange mode: " << i18n("aggressive") << std::endl;
@@ -982,11 +982,11 @@ void ImportIpsecProfileDialog::canAccept()
// FIXME we only use the first in list
- QString Interface = InterfaceList.first();
+ TQString Interface = InterfaceList.first();
profiledata->setNetworkDevice ( Interface );
profiledata->setName ( "kvpnc_import_"+profiledata->getName() );
- profiledata->setDescription ( QString ( i18n ( "import from " ) +filename ) );
+ profiledata->setDescription ( TQString ( i18n ( "import from " ) +filename ) );
ImportedAccountList->append ( profiledata );
}
}
@@ -1007,11 +1007,11 @@ void ImportIpsecProfileDialog::canAccept()
selectdlg.ImportProfileListView->addColumn ( i18n ( "Gateway" ) );
selectdlg.ImportProfileListView->addColumn ( i18n ( "Authentication" ) );
selectdlg.ImportProfileListView->addColumn ( i18n ( "Remote network" ) );
- QCheckListItem *item;
+ TQCheckListItem *item;
for ( it = ImportedAccountList->first(); it; it = ImportedAccountList->next() )
{
- QString name = it->getName();
- QString type="";
+ TQString name = it->getName();
+ TQString type="";
if ( it->getConnectionType() == VpnAccountData::cisco )
type = "cisco" ;
else if ( it->getConnectionType() == VpnAccountData::ciscoorig )
@@ -1032,7 +1032,7 @@ void ImportIpsecProfileDialog::canAccept()
type = i18n ( "other" );
// litem->setSelectable(true);
- item = new QCheckListItem ( selectdlg.ImportProfileListView,it->getName(),QCheckListItem::RadioButton );
+ item = new TQCheckListItem ( selectdlg.ImportProfileListView,it->getName(),TQCheckListItem::RadioButton );
item->setText ( 1,type );
item->setText ( 2,it->getGateway() );
if ( it->getAuthType() == VpnAccountData::cert )
@@ -1042,13 +1042,13 @@ void ImportIpsecProfileDialog::canAccept()
else
item->setText ( 3,i18n ( "unknown" ) );
selectdlg.ImportProfileListView->insertItem ( item );
- QString RemoteNetDiv="/";
+ TQString RemoteNetDiv="/";
if ( it->getRemoteNetAddr() == "" )
{
it->setRemoteNetMask ( "" );
RemoteNetDiv="";
}
- item->setText ( 4,QString ( it->getRemoteNetAddr() +RemoteNetDiv+it->getRemoteNetMask() ) );
+ item->setText ( 4,TQString ( it->getRemoteNetAddr() +RemoteNetDiv+it->getRemoteNetMask() ) );
// std::cout << "insert profile into listview: " << name << std::endl;
}
@@ -1058,18 +1058,18 @@ void ImportIpsecProfileDialog::canAccept()
if ( ret == true )
{
- QListViewItemIterator it2 ( selectdlg.ImportProfileListView );
+ TQListViewItemIterator it2 ( selectdlg.ImportProfileListView );
for ( ; it2.current(); ++it2 )
{
if ( profilefound==false )
{
- if ( ( ( QCheckListItem* ) it2.current() )->isOn() )
+ if ( ( ( TQCheckListItem* ) it2.current() )->isOn() )
{
VpnAccountData *data=NULL;
it = 0;
for ( it = ImportedAccountList->first(); it; it = ImportedAccountList->next() )
{
- if ( it->getName() == ( ( QCheckListItem* ) it2.current() )->text() && ( ( QCheckListItem* ) it2.current() )->isOn() )
+ if ( it->getName() == ( ( TQCheckListItem* ) it2.current() )->text() && ( ( TQCheckListItem* ) it2.current() )->isOn() )
{
acc = it;
profilefound=true;
@@ -1095,6 +1095,6 @@ void ImportIpsecProfileDialog::canAccept()
importOk = false;
//std::cout << "accept" << std::endl;
- QDialog::accept();
+ TQDialog::accept();
}