summaryrefslogtreecommitdiffstats
path: root/buildtools/lib/parsers/qmake/tests/runner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/lib/parsers/qmake/tests/runner.cpp')
-rw-r--r--buildtools/lib/parsers/qmake/tests/runner.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/buildtools/lib/parsers/qmake/tests/runner.cpp b/buildtools/lib/parsers/qmake/tests/runner.cpp
index 6f1d5956..5dd417db 100644
--- a/buildtools/lib/parsers/qmake/tests/runner.cpp
+++ b/buildtools/lib/parsers/qmake/tests/runner.cpp
@@ -21,8 +21,8 @@
#include <cstdlib>
#include <iostream>
#include <stdio.h>
-#include "qmakedriver.h"
-#include "qmakeastvisitor.h"
+#include "tqmakedriver.h"
+#include "tqmakeastvisitor.h"
#include <tqstring.h>
@@ -34,92 +34,92 @@ static const KCmdLineOptions options[] =
{
{"silent", "Enable Parser debug output", 0},
{"!debug", "Disable output of the generated AST", 0},
- {"!+files", "QMake project files", 0}
+ {"!+files", "TQMake project files", 0}
};
-class PrintAST : QMake::ASTVisitor
+class PrintAST : TQMake::ASTVisitor
{
public:
- PrintAST() : QMake::ASTVisitor()
+ PrintAST() : TQMake::ASTVisitor()
{
indent = 0;
}
- virtual void processProject( QMake::ProjectAST* p )
+ virtual void processProject( TQMake::ProjectAST* p )
{
- QMake::ASTVisitor::processProject(p);
+ TQMake::ASTVisitor::processProject(p);
}
private:
- virtual void enterRealProject( QMake::ProjectAST* p )
+ virtual void enterRealProject( TQMake::ProjectAST* p )
{
kdDebug(9024) << getIndent() << "--------- Entering Project: " << replaceWs(p->fileName()) << "| LineEnding:" << p->lineEnding() << " --------------" << endl;
indent += 4;
- QMake::ASTVisitor::enterRealProject(p);
+ TQMake::ASTVisitor::enterRealProject(p);
}
- virtual void leaveRealProject( QMake::ProjectAST* p )
+ virtual void leaveRealProject( TQMake::ProjectAST* p )
{
indent -= 4;
kdDebug(9024) << getIndent() << "--------- Leaving Project: " << replaceWs(p->fileName()) << " --------------" << endl;
- QMake::ASTVisitor::leaveRealProject(p);
+ TQMake::ASTVisitor::leaveRealProject(p);
}
- virtual void enterScope( QMake::ProjectAST* p )
+ virtual void enterScope( TQMake::ProjectAST* p )
{
kdDebug(9024) << getIndent() << "--------- Entering Scope: " << replaceWs(p->scopedID) << " --------------" << endl;
indent += 4;
- QMake::ASTVisitor::enterScope(p);
+ TQMake::ASTVisitor::enterScope(p);
}
- virtual void leaveScope( QMake::ProjectAST* p )
+ virtual void leaveScope( TQMake::ProjectAST* p )
{
indent -= 4;
kdDebug(9024) << getIndent() << "--------- Leaving Scope: " << replaceWs(p->scopedID) << " --------------" << endl;
- QMake::ASTVisitor::leaveScope(p);
+ TQMake::ASTVisitor::leaveScope(p);
}
- virtual void enterFunctionScope( QMake::ProjectAST* p )
+ virtual void enterFunctionScope( TQMake::ProjectAST* p )
{
kdDebug(9024) << getIndent() << "--------- Entering FunctionScope: " << replaceWs(p->scopedID) << "(" << replaceWs(p->args) << ")"<< " --------------" << endl;
indent += 4;
- QMake::ASTVisitor::enterFunctionScope(p);
+ TQMake::ASTVisitor::enterFunctionScope(p);
}
- virtual void leaveFunctionScope( QMake::ProjectAST* p )
+ virtual void leaveFunctionScope( TQMake::ProjectAST* p )
{
indent -= 4;
kdDebug(9024) << getIndent() << "--------- Leaving FunctionScope: " << replaceWs(p->scopedID) << "(" << replaceWs(p->args) << ")"<< " --------------" << endl;
- QMake::ASTVisitor::leaveFunctionScope(p);
+ TQMake::ASTVisitor::leaveFunctionScope(p);
}
TQString replaceWs(TQString s)
{
- return s.replace("\n", "%nl").replace("\t", "%tab").replace(" ", "%spc");
+ return s.tqreplace("\n", "%nl").tqreplace("\t", "%tab").tqreplace(" ", "%spc");
}
- virtual void processAssignment( QMake::AssignmentAST* a)
+ virtual void processAssignment( TQMake::AssignmentAST* a)
{
kdDebug(9024) << getIndent() << "Assignment(" << replaceWs(a->indent) << "):" << replaceWs(a->scopedID) << " " << replaceWs(a->op) << " " << replaceWs(a->values.join("|")) << endl;
- QMake::ASTVisitor::processAssignment(a);
+ TQMake::ASTVisitor::processAssignment(a);
}
- virtual void processNewLine( QMake::NewLineAST* n)
+ virtual void processNewLine( TQMake::NewLineAST* n)
{
kdDebug(9024) << getIndent() << "Newline " << endl;
- QMake::ASTVisitor::processNewLine(n);
+ TQMake::ASTVisitor::processNewLine(n);
}
- virtual void processComment( QMake::CommentAST* a)
+ virtual void processComment( TQMake::CommentAST* a)
{
kdDebug(9024) << getIndent() << "Comment: " << replaceWs(a->comment) << endl;
- QMake::ASTVisitor::processComment(a);
+ TQMake::ASTVisitor::processComment(a);
}
- virtual void processInclude( QMake::IncludeAST* a)
+ virtual void processInclude( TQMake::IncludeAST* a)
{
kdDebug(9024) << getIndent() << "Include: " << replaceWs(a->projectName) << endl;
- QMake::ASTVisitor::processInclude(a);
+ TQMake::ASTVisitor::processInclude(a);
}
TQString getIndent()
@@ -133,7 +133,7 @@ private:
};
int main(int argc, char *argv[])
{
- KCmdLineArgs::init( argc, argv, "QMake Parser", "qmake-parser", "Parse QMake project files", "1.0.0");
+ KCmdLineArgs::init( argc, argv, "TQMake Parser", "qmake-parser", "Parse TQMake project files", "1.0.0");
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -152,8 +152,8 @@ int main(int argc, char *argv[])
debug = 1;
for( int i = 0 ; i < args->count() ; i++ )
{
- QMake::ProjectAST *projectAST;
- int ret = QMake::Driver::parseFile(args->url(i).path(), &projectAST, debug);
+ TQMake::ProjectAST *projectAST;
+ int ret = TQMake::Driver::parseFile(args->url(i).path(), &projectAST, debug);
PrintAST pa;
if ( ret == 0 )
if ( !silent )
@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
pa.processProject(projectAST);
TQString profile;
projectAST->writeBack(profile);
- kdDebug(9024) << "QMake file written back:\n" << profile << endl;
+ kdDebug(9024) << "TQMake file written back:\n" << profile << endl;
}
return ret;
}