summaryrefslogtreecommitdiffstats
path: root/buildtools/lib/parsers/qmake/tests/viewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/lib/parsers/qmake/tests/viewer.cpp')
-rw-r--r--buildtools/lib/parsers/qmake/tests/viewer.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/buildtools/lib/parsers/qmake/tests/viewer.cpp b/buildtools/lib/parsers/qmake/tests/viewer.cpp
index a550a426..4583ab11 100644
--- a/buildtools/lib/parsers/qmake/tests/viewer.cpp
+++ b/buildtools/lib/parsers/qmake/tests/viewer.cpp
@@ -19,15 +19,15 @@
***************************************************************************/
#include "viewer.h"
-#include <qdir.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qfiledialog.h>
-#include <qtextedit.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlistview.h>
-#include <qtabwidget.h>
+#include <tqdir.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqfiledialog.h>
+#include <tqtextedit.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlistview.h>
+#include <tqtabwidget.h>
#include <qmakeast.h>
#include <qmakedriver.h>
@@ -35,46 +35,46 @@
using namespace QMake;
-Viewer::Viewer(QWidget *parent, const char *name)
+Viewer::Viewer(TQWidget *parent, const char *name)
:ViewerBase(parent, name), projectAST(0)
{
- if (QFile::exists(QDir::currentDirPath() + "/" + "qtlist"))
+ if (TQFile::exists(TQDir::currentDirPath() + "/" + "qtlist"))
{
- QFile f(QDir::currentDirPath() + "/" + "qtlist");
+ TQFile f(TQDir::currentDirPath() + "/" + "qtlist");
f.open(IO_ReadOnly);
- QTextStream str(&f);
+ TQTextStream str(&f);
while (!str.eof())
files->insertItem(str.readLine());
}
ast->setSorting(-1);
-// parentProject.push((QListViewItem*)0);
+// parentProject.push((TQListViewItem*)0);
}
void Viewer::addAll_clicked()
{
if (allLocation->text().isEmpty())
return;
- QDir d(allLocation->text());
- QStringList l = d.entryList("*.pro *.pri");
- for (QStringList::iterator it = l.begin(); it != l.end(); ++it)
- (*it) = QDir::cleanDirPath(allLocation->text() + "/" + (*it));
+ TQDir d(allLocation->text());
+ TQStringList l = d.entryList("*.pro *.pri");
+ for (TQStringList::iterator it = l.begin(); it != l.end(); ++it)
+ (*it) = TQDir::cleanDirPath(allLocation->text() + "/" + (*it));
files->insertStringList(l);
}
void Viewer::choose_clicked()
{
- QString fileName = QFileDialog::getOpenFileName(QDir::currentDirPath(), "*.pro *.pri", this);
+ TQString fileName = TQFileDialog::getOpenFileName(TQDir::currentDirPath(), "*.pro *.pri", this);
if (!fileName.isEmpty())
files->insertItem(fileName);
}
-void Viewer::files_currentChanged(QListBoxItem* item)
+void Viewer::files_currentChanged(TQListBoxItem* item)
{
ast->clear();
- QFile f(item->text());
+ TQFile f(item->text());
f.open(IO_ReadOnly);
- QTextStream str(&f);
+ TQTextStream str(&f);
source->setText(str.read());
f.close();
@@ -87,11 +87,11 @@ void Viewer::files_currentChanged(QListBoxItem* item)
tabWidget2_selected("Source to be written back");
}
-void Viewer::tabWidget2_selected(const QString& text)
+void Viewer::tabWidget2_selected(const TQString& text)
{
if ((text == "Source to Be Written Back") && projectAST)
{
- QString buffer;
+ TQString buffer;
projectAST->writeBack(buffer);
writeBack->setText(buffer);
}
@@ -102,7 +102,7 @@ public:
ViewerVisitor(Viewer *v): ASTVisitor()
{
this->v = v;
- parentProject.push((QListViewItem*)0);
+ parentProject.push((TQListViewItem*)0);
}
virtual void processProject(ProjectAST *project)
@@ -112,10 +112,10 @@ public:
virtual void enterRealProject(ProjectAST *project)
{
- QListViewItem *projectIt;
+ TQListViewItem *projectIt;
if (!parentProject.top())
{
- projectIt = new QListViewItem(v->ast, "Project");
+ projectIt = new TQListViewItem(v->ast, "Project");
projectIt->setOpen(true);
parentProject.push(projectIt);
}
@@ -124,7 +124,7 @@ public:
}
virtual void enterScope(ProjectAST *scope)
{
- QListViewItem *projectIt = new QListViewItem(parentProject.top(), scope->scopedID, "scope");
+ TQListViewItem *projectIt = new TQListViewItem(parentProject.top(), scope->scopedID, "scope");
parentProject.push(projectIt);
ASTVisitor::enterScope(scope);
}
@@ -134,7 +134,7 @@ public:
}
virtual void enterFunctionScope(ProjectAST *fscope)
{
- QListViewItem *projectIt = new QListViewItem(parentProject.top(),
+ TQListViewItem *projectIt = new TQListViewItem(parentProject.top(),
fscope->scopedID + "(" + fscope->args + ")", "function scope");
parentProject.push(projectIt);
ASTVisitor::enterFunctionScope(fscope);
@@ -145,7 +145,7 @@ public:
}
virtual void processAssignment(AssignmentAST *assignment)
{
- QListViewItem *item = new QListViewItem(parentProject.top(),
+ TQListViewItem *item = new TQListViewItem(parentProject.top(),
assignment->scopedID, assignment->op, assignment->values.join("|"),
"assignment");
item->setMultiLinesEnabled(true);
@@ -154,26 +154,26 @@ public:
}
virtual void processNewLine(NewLineAST *newline)
{
- new QListViewItem(parentProject.top(), "<newline>");
+ new TQListViewItem(parentProject.top(), "<newline>");
ASTVisitor::processNewLine(newline);
}
virtual void processComment(CommentAST *comment)
{
- new QListViewItem(parentProject.top(), "<comment>");
+ new TQListViewItem(parentProject.top(), "<comment>");
ASTVisitor::processComment(comment);
}
virtual void processInclude(IncludeAST *include)
{
- new QListViewItem(parentProject.top(), "<include>", include->projectName);
+ new TQListViewItem(parentProject.top(), "<include>", include->projectName);
QMake::ASTVisitor::processInclude(include);
}
Viewer *v;
- QValueStack<QListViewItem *> parentProject;
+ TQValueStack<TQListViewItem *> parentProject;
};
-void Viewer::processAST(QMake::ProjectAST *projectAST, QListViewItem *globAfter)
+void Viewer::processAST(QMake::ProjectAST *projectAST, TQListViewItem *globAfter)
{
ViewerVisitor visitor(this);
visitor.processProject(projectAST);