summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codeimport/pythonimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/codeimport/pythonimport.cpp')
-rw-r--r--umbrello/umbrello/codeimport/pythonimport.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/umbrello/umbrello/codeimport/pythonimport.cpp b/umbrello/umbrello/codeimport/pythonimport.cpp
index af59cf8a..2436699a 100644
--- a/umbrello/umbrello/codeimport/pythonimport.cpp
+++ b/umbrello/umbrello/codeimport/pythonimport.cpp
@@ -13,8 +13,8 @@
#include "pythonimport.h"
// qt/kde includes
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -41,26 +41,26 @@ void PythonImport::initVars() {
m_braceWasOpened = false;
}
-bool PythonImport::preprocess(QString& line) {
+bool PythonImport::preprocess(TQString& line) {
if (NativeImportBase::preprocess(line))
return true;
// Handle single line comment
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
- QString cmnt = line.mid(pos);
+ TQString cmnt = line.mid(pos);
m_source.append(cmnt);
m_srcIndex++;
if (pos == 0)
return true;
line = line.left(pos);
- line.remove( QRegExp("\\s+$") );
+ line.remove( TQRegExp("\\s+$") );
}
// Transform changes in indentation into braces a la C++/Java/Perl/...
- pos = line.find( QRegExp("\\S") );
+ pos = line.find( TQRegExp("\\S") );
if (pos == -1)
return true;
bool isContinuation = false;
- int leadingWhite = line.left(pos).contains( QRegExp("\\s") );
+ int leadingWhite = line.left(pos).contains( TQRegExp("\\s") );
if (leadingWhite > m_srcIndent[m_srcIndentIndex]) {
if (m_srcIndex == 0) {
kError() << "PythonImport::preprocess(): internal error 1" << endl;
@@ -80,7 +80,7 @@ bool PythonImport::preprocess(QString& line) {
}
}
if (line.endsWith(":")) {
- line.replace( QRegExp(":$"), "{" );
+ line.replace( TQRegExp(":$"), "{" );
m_braceWasOpened = true;
} else {
m_braceWasOpened = false;
@@ -90,20 +90,20 @@ bool PythonImport::preprocess(QString& line) {
return false; // The input was not completely consumed by preprocessing.
}
-void PythonImport::fillSource(const QString& word) {
- QString lexeme;
+void PythonImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = word[i];
+ const TQChar& c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
m_srcIndex++;
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
m_srcIndex++;
}
}
@@ -117,7 +117,7 @@ void PythonImport::skipBody() {
if (m_source[m_srcIndex] != "{")
skipStmt("{");
int braceNesting = 0;
- QString token;
+ TQString token;
while (!(token = advance()).isNull()) {
if (token == "}") {
if (braceNesting <= 0)
@@ -131,16 +131,16 @@ void PythonImport::skipBody() {
bool PythonImport::parseStmt() {
const uint srcLength = m_source.count();
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
if (keyword == "class") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
+ m_comment = TQString();
if (advance() == "(") {
while (m_srcIndex < srcLength - 1 && advance() != ")") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -157,7 +157,7 @@ bool PythonImport::parseStmt() {
skipBody();
return true;
}
- const QString& name = advance();
+ const TQString& name = advance();
// operation
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
if (advance() != "(") {
@@ -166,7 +166,7 @@ bool PythonImport::parseStmt() {
return true;
}
while (m_srcIndex < srcLength && advance() != ")") {
- const QString& parName = m_source[m_srcIndex];
+ const TQString& parName = m_source[m_srcIndex];
UMLAttribute *att = Import_Utils::addMethodParameter(op, "string", parName);
if (advance() != ",")
break;