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 /languages/ada/addclass.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 'languages/ada/addclass.cpp')
-rw-r--r-- | languages/ada/addclass.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/languages/ada/addclass.cpp b/languages/ada/addclass.cpp index 5a5ccb13..ee28ff93 100644 --- a/languages/ada/addclass.cpp +++ b/languages/ada/addclass.cpp @@ -2,13 +2,13 @@ #include <sys/types.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qtextstream.h> -#include <qregexp.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> +#include <tqtextstream.h> +#include <tqregexp.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <klineedit.h> @@ -30,10 +30,10 @@ AddClassInfo::AddClassInfo() } -QString AddClassInfo::adaFileName() const +TQString AddClassInfo::adaFileName() const { - QString dest = className; - dest.replace(QRegExp("\\."), "/"); + TQString dest = className; + dest.replace(TQRegExp("\\."), "/"); return sourceDir + "/" + dest + ".ada"; } @@ -55,7 +55,7 @@ AddClassInfo &AddClass::info() } -void AddClass::setBaseClasses(const QStringList &classes) +void AddClass::setBaseClasses(const TQStringList &classes) { m_baseClasses = classes; } @@ -65,7 +65,7 @@ bool AddClass::showDialog() { AddClassDlg dlg; - QString dir = m_info.projectDir; + TQString dir = m_info.projectDir; if (m_info.sourceDir.isEmpty()) m_info.sourceDir = "src"; if (dir.isEmpty()) @@ -100,7 +100,7 @@ bool AddClass::showDialog() dlg.Documentation->setText(m_info.documentation); dlg.License->setEditText(m_info.license); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { m_info.projectDir = ""; m_info.sourceDir = dlg.SourcePath->text(); @@ -130,17 +130,17 @@ bool AddClass::showDialog() } -static bool makeDirs(const QString &dest) +static bool makeDirs(const TQString &dest) { - QStringList dirs = QStringList::split("/", dest); + TQStringList dirs = TQStringList::split("/", dest); - QString d = ""; + TQString d = ""; - for (QStringList::Iterator it=dirs.begin(); it != dirs.end(); ++it) + for (TQStringList::Iterator it=dirs.begin(); it != dirs.end(); ++it) { d = d + "/" + *it; - QFileInfo fi(d); + TQFileInfo fi(d); if (fi.exists() && !fi.isDir()) { @@ -149,7 +149,7 @@ static bool makeDirs(const QString &dest) } if (!fi.exists()) - if (::mkdir(QFile::encodeName(d), 0755) != 0) + if (::mkdir(TQFile::encodeName(d), 0755) != 0) return false; } @@ -159,7 +159,7 @@ static bool makeDirs(const QString &dest) bool AddClass::generate() { - QString code; + TQString code; // license @@ -204,7 +204,7 @@ bool AddClass::generate() } // find class and package name - QString className, packageName; + TQString className, packageName; int i = m_info.className.findRev('.'); if (i == -1) @@ -228,7 +228,7 @@ bool AddClass::generate() { code += "/**\n"; - QTextStream ts(&m_info.documentation, IO_ReadOnly); + TQTextStream ts(&m_info.documentation, IO_ReadOnly); while (!ts.eof()) code += " * " + ts.readLine() + "\n"; @@ -283,7 +283,7 @@ bool AddClass::generate() { code += " implements "; unsigned int c=0; - for (QStringList::Iterator it = m_info.implements.begin(); it != m_info.implements.end(); ++it, c++) + for (TQStringList::Iterator it = m_info.implements.begin(); it != m_info.implements.end(); ++it, c++) { code += *it; if (c+1 < m_info.implements.count()) @@ -321,8 +321,8 @@ bool AddClass::generate() // create directories - QString dest = packageName; - dest.replace(QRegExp("\\."), "/"); + TQString dest = packageName; + dest.replace(TQRegExp("\\."), "/"); dest = m_info.sourceDir + "/" + dest; if (!makeDirs(dest)) @@ -330,19 +330,19 @@ bool AddClass::generate() // write out the file - if (QFile::exists(m_info.adaFileName())) + if (TQFile::exists(m_info.adaFileName())) { /// @todo ask before overwriting! } - QFile of(m_info.adaFileName()); + TQFile of(m_info.adaFileName()); if (!of.open(IO_WriteOnly)) { /// @todo message to user return false; } - QTextStream os(&of); + TQTextStream os(&of); os << code; of.close(); |