summaryrefslogtreecommitdiffstats
path: root/languages/ada/addclass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/ada/addclass.cpp')
-rw-r--r--languages/ada/addclass.cpp56
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();