summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp')
-rw-r--r--kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp b/kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp
index 961cbc0..e39d4f1 100644
--- a/kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp
+++ b/kmyfirewall/compilers/iptables/kmfiptablesscriptgenerator.cpp
@@ -13,10 +13,10 @@
#include "kmfiptablesscriptgenerator.h"
// QT includes
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qmultilineedit.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqmultilineedit.h>
+#include <tqtabwidget.h>
// KDE includes
#include <kdebug.h>
@@ -59,15 +59,15 @@ KMFIPTablesScriptGenerator::~KMFIPTablesScriptGenerator()
{
}
-const QString& KMFIPTablesScriptGenerator::compile( KMFIPTDoc* doc ) {
+const TQString& KMFIPTablesScriptGenerator::compile( KMFIPTDoc* doc ) {
m_iptDoc = doc;
- QString script;
- m_stream = new QTextOStream( &script );
+ TQString script;
+ m_stream = new TQTextOStream( &script );
printScriptHeader();
printScriptStartFunction();
printScriptStopFunction();
printScriptExecLogic();
- return *(new QString( script ) );
+ return *(new TQString( script ) );
}
@@ -247,7 +247,7 @@ void KMFIPTablesScriptGenerator::printScriptTableChainDefinition( IPTable *tbl )
IPTChain* c = tbl->chains().at( i );
if ( !c->isBuildIn() ) {
*m_stream << "\n# Create Chain: " + c->name() << endl;
- QString s2 = c->createIPTablesChainDefinition();
+ TQString s2 = c->createIPTablesChainDefinition();
if ( !s2.isEmpty() ) {
*m_stream << s2 << " || { status=\"1\"; echo \"Setting up Chain: " + c->name() + " FAILED !!!\"; echo \"Ann Error occoured! Clearing rules\"; stopFirewall; exit 1; }\n";
}
@@ -261,12 +261,12 @@ void KMFIPTablesScriptGenerator::printScriptTableRules( IPTable *tbl ) {
IPTChain* c = tbl->chains().at( i );
*m_stream << "\n# Define Rules for Chain: " + c->name() << endl ;
*m_stream << printScriptDebug( "Create Rules for Chain: " + c->name() ) + " " << endl;
- QPtrList<QStringList> rules = c->createIPTablesChainRules();
- QStringList* curr_rule;
- QString rule_name;
+ TQPtrList<TQStringList> rules = c->createIPTablesChainRules();
+ TQStringList* curr_rule;
+ TQString rule_name;
for ( curr_rule = rules.first(); curr_rule; curr_rule = rules.next() ) {
rule_name = *curr_rule->at( 0 );
- QString s = *curr_rule->at( 1 );
+ TQString s = *curr_rule->at( 1 );
if ( !s.isEmpty() ) {
*m_stream << s << " || { status=\"1\"; echo \" Setting up Rule: " + rule_name + " FAILED! Clearing Rules!\"; stopFirewall; exit 1; }\n" << endl;
}
@@ -301,10 +301,10 @@ void KMFIPTablesScriptGenerator::printScriptModuleLoad() {
void KMFIPTablesScriptGenerator::printScriptHeader() {
KMFTarget *tg = m_iptDoc->target();
- QString version = KMYFIREWALL_VERSION;
- QString copyright_string = COPYRIGHT_STRING;
- QString maintainer = MAINTAINER;
- QString license = LICENSE;
+ TQString version = KMYFIREWALL_VERSION;
+ TQString copyright_string = COPYRIGHT_STRING;
+ TQString maintainer = MAINTAINER;
+ TQString license = LICENSE;
*m_stream <<
"#!/bin/sh\n"
"#\n"
@@ -321,15 +321,15 @@ void KMFIPTablesScriptGenerator::printScriptHeader() {
}
-const QString& KMFIPTablesScriptGenerator::printScriptDebug( const QString& msg, bool newLine ) {
- QString script;
+const TQString& KMFIPTablesScriptGenerator::printScriptDebug( const TQString& msg, bool newLine ) {
+ TQString script;
*m_stream << "if [ \"$verbose\" = \"1\" ]; then\n" ;
*m_stream << "echo " ;
if ( ! newLine )
*m_stream << "-n " ;
*m_stream << "\"" + msg +"\"\n";
*m_stream << "fi\n" << endl;
- return *(new QString( script ) );
+ return *(new TQString( script ) );
}
}