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/runner.cpp | 10 ++-- buildtools/lib/parsers/qmake/tests/viewer.cpp | 70 +++++++++++----------- buildtools/lib/parsers/qmake/tests/viewer.h | 10 ++-- buildtools/lib/parsers/qmake/tests/viewer_main.cpp | 4 +- 4 files changed, 47 insertions(+), 47 deletions(-) (limited to 'buildtools/lib/parsers/qmake/tests') diff --git a/buildtools/lib/parsers/qmake/tests/runner.cpp b/buildtools/lib/parsers/qmake/tests/runner.cpp index 140b39f4..6f1d5956 100644 --- a/buildtools/lib/parsers/qmake/tests/runner.cpp +++ b/buildtools/lib/parsers/qmake/tests/runner.cpp @@ -24,7 +24,7 @@ #include "qmakedriver.h" #include "qmakeastvisitor.h" -#include +#include #include #include @@ -93,7 +93,7 @@ private: QMake::ASTVisitor::leaveFunctionScope(p); } - QString replaceWs(QString s) + TQString replaceWs(TQString s) { return s.replace("\n", "%nl").replace("\t", "%tab").replace(" ", "%spc"); } @@ -122,9 +122,9 @@ private: QMake::ASTVisitor::processInclude(a); } - QString getIndent() + TQString getIndent() { - QString ind; + TQString ind; for( int i = 0 ; i < indent ; i++) ind += " "; return ind; @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) if ( !silent ) { pa.processProject(projectAST); - QString profile; + TQString profile; projectAST->writeBack(profile); kdDebug(9024) << "QMake file written back:\n" << profile << endl; } 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); diff --git a/buildtools/lib/parsers/qmake/tests/viewer.h b/buildtools/lib/parsers/qmake/tests/viewer.h index b22632a1..07e91da1 100644 --- a/buildtools/lib/parsers/qmake/tests/viewer.h +++ b/buildtools/lib/parsers/qmake/tests/viewer.h @@ -20,7 +20,7 @@ #ifndef VIEWER_H #define VIEWER_H -#include +#include #include "viewerbase.h" @@ -33,11 +33,11 @@ class QListViewItem; class Viewer: public ViewerBase { Q_OBJECT public: - Viewer(QWidget *parent = 0, const char *name = 0); - void processAST(QMake::ProjectAST *projectAST, QListViewItem *globAfter = 0); + Viewer(TQWidget *parent = 0, const char *name = 0); + void processAST(QMake::ProjectAST *projectAST, TQListViewItem *globAfter = 0); public slots: - virtual void tabWidget2_selected(const QString&); - virtual void files_currentChanged(QListBoxItem*); + virtual void tabWidget2_selected(const TQString&); + virtual void files_currentChanged(TQListBoxItem*); virtual void choose_clicked(); virtual void addAll_clicked(); private: diff --git a/buildtools/lib/parsers/qmake/tests/viewer_main.cpp b/buildtools/lib/parsers/qmake/tests/viewer_main.cpp index d2a8a1ad..c31ea02c 100644 --- a/buildtools/lib/parsers/qmake/tests/viewer_main.cpp +++ b/buildtools/lib/parsers/qmake/tests/viewer_main.cpp @@ -17,12 +17,12 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include +#include #include "viewer.h" int main(int argc, char **argv) { - QApplication app(argc, argv); + TQApplication app(argc, argv); Viewer viewer; app.setMainWidget(&viewer); -- cgit v1.2.1