From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- buildtools/lib/parsers/qmake/tests/viewer.cpp | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'buildtools/lib/parsers/qmake/tests/viewer.cpp') 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 -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -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(), ""); + new TQListViewItem(parentProject.top(), ""); ASTVisitor::processNewLine(newline); } virtual void processComment(CommentAST *comment) { - new QListViewItem(parentProject.top(), ""); + new TQListViewItem(parentProject.top(), ""); ASTVisitor::processComment(comment); } virtual void processInclude(IncludeAST *include) { - new QListViewItem(parentProject.top(), "", include->projectName); + new TQListViewItem(parentProject.top(), "", include->projectName); QMake::ASTVisitor::processInclude(include); } Viewer *v; - QValueStack parentProject; + TQValueStack parentProject; }; -void Viewer::processAST(QMake::ProjectAST *projectAST, QListViewItem *globAfter) +void Viewer::processAST(QMake::ProjectAST *projectAST, TQListViewItem *globAfter) { ViewerVisitor visitor(this); visitor.processProject(projectAST); -- cgit v1.2.3