diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/lib/parsers/autotools/tests/viewer.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/lib/parsers/autotools/tests/viewer.cpp')
-rw-r--r-- | buildtools/lib/parsers/autotools/tests/viewer.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/buildtools/lib/parsers/autotools/tests/viewer.cpp b/buildtools/lib/parsers/autotools/tests/viewer.cpp index 24d6aea4..0dc8e733 100644 --- a/buildtools/lib/parsers/autotools/tests/viewer.cpp +++ b/buildtools/lib/parsers/autotools/tests/viewer.cpp @@ -19,61 +19,61 @@ ***************************************************************************/ #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 <autotoolsast.h> #include <autotoolsdriver.h> using namespace AutoTools; -Viewer::Viewer(QWidget *parent, const char *name) +Viewer::Viewer(TQWidget *parent, const char *name) :ViewerBase(parent, name) { - 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("*.am"); - for (QStringList::iterator it = l.begin(); it != l.end(); ++it) - (*it) = QDir::cleanDirPath(allLocation->text() + "/" + (*it)); + TQDir d(allLocation->text()); + TQStringList l = d.entryList("*.am"); + 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(), "*.am", this); + TQString fileName = TQFileDialog::getOpenFileName(TQDir::currentDirPath(), "*.am", 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(); @@ -86,30 +86,30 @@ 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); } } -void Viewer::processAST(ProjectAST *projectAST, QListViewItem *globAfter) +void Viewer::processAST(ProjectAST *projectAST, TQListViewItem *globAfter) { - QListViewItem *projectIt; + TQListViewItem *projectIt; if (!parentProject.top()) - projectIt = new QListViewItem(ast, "Project"); + projectIt = new TQListViewItem(ast, "Project"); else { if ( projectAST->isConditionalScope() || projectAST->isRule() ) - projectIt = new QListViewItem(parentProject.top(), globAfter, projectAST->scopedID); + projectIt = new TQListViewItem(parentProject.top(), globAfter, projectAST->scopedID); } projectIt->setOpen(true); - QListViewItem *after = 0; - for (QValueList<AST*>::const_iterator it = projectAST->statements.constBegin(); + TQListViewItem *after = 0; + for (TQValueList<AST*>::const_iterator it = projectAST->statements.constBegin(); it != projectAST->statements.constEnd(); ++it) { AST *ast = *it; @@ -118,7 +118,7 @@ void Viewer::processAST(ProjectAST *projectAST, QListViewItem *globAfter) switch (ast->nodeType()) { case AST::AssignmentAST: { AssignmentAST *assignmentAST = static_cast<AssignmentAST*>(ast); - QListViewItem *item = new QListViewItem(projectIt, after, + TQListViewItem *item = new TQListViewItem(projectIt, after, assignmentAST->scopedID, assignmentAST->op, assignmentAST->values.join("")); item->setMultiLinesEnabled(true); after = item; } @@ -127,25 +127,25 @@ void Viewer::processAST(ProjectAST *projectAST, QListViewItem *globAfter) case AST::TargetAST: { AutomakeTargetAST* ata = static_cast<AutomakeTargetAST*>(ast); - QListViewItem* item = new QListViewItem(projectIt, after, - ata->target, QString::null, ata->deps.join("")); + TQListViewItem* item = new TQListViewItem(projectIt, after, + ata->target, TQString::null, ata->deps.join("")); after = item; } break; case AST::NewLineAST: -// after = new QListViewItem(projectIt, after, "<newline>"); +// after = new TQListViewItem(projectIt, after, "<newline>"); break; case AST::CommentAST: -// after = new QListViewItem(projectIt, after, "<comment>"); +// after = new TQListViewItem(projectIt, after, "<comment>"); break; case AST::MakefileConditionalAST: { ConditionAST* ata = static_cast<ConditionAST*>(ast); - QListViewItem* item = new QListViewItem(projectIt, after, - ata->type, ata->conditionName, QString::null ); + TQListViewItem* item = new TQListViewItem(projectIt, after, + ata->type, ata->conditionName, TQString::null ); after = item; } case AST::ProjectAST: { |