diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /umbrello/umbrello/import_rose.cpp | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/import_rose.cpp')
-rw-r--r-- | umbrello/umbrello/import_rose.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/umbrello/umbrello/import_rose.cpp b/umbrello/umbrello/import_rose.cpp index 3968e72a..a04dfc43 100644 --- a/umbrello/umbrello/import_rose.cpp +++ b/umbrello/umbrello/import_rose.cpp @@ -31,12 +31,12 @@ namespace Import_Rose { typedef TQPtrList<PetalNode> PetalNodeList; -uint nClosures; // Multiple closing parentheses may appear on a single +uint nClosures; // Multiple closing tqparentheses may appear on a single // line. The parsing is done line-by-line and using // recursive descent. This means that we can only handle - // _one_ closing parenthesis at a time, i.e. the closing + // _one_ closing tqparenthesis at a time, i.e. the closing // of the currently parsed node. Since we may see more - // closing parentheses than we can handle, we need a + // closing tqparentheses than we can handle, we need a // counter indicating how many additional node closings // have been seen. @@ -106,8 +106,8 @@ bool checkClosing(TQStringList& tokens) { if (tokens.count() == 0) return false; if (tokens.last() == ")") { - // For a single closing parenthesis, we just return true. - // But if there are more closing parentheses, we need to increment + // For a single closing tqparenthesis, we just return true. + // But if there are more closing tqparentheses, we need to increment // nClosures for each scope. tokens.pop_back(); while (tokens.count() && tokens.last() == ")") { @@ -125,7 +125,7 @@ bool checkClosing(TQStringList& tokens) { * or a quoted string. */ bool isImmediateValue(TQString s) { - return s.contains(TQRegExp("^[\\d\\-\"]")); + return s.tqcontains(TQRegExp("^[\\d\\-\"]")); } /** @@ -133,7 +133,7 @@ bool isImmediateValue(TQString s) { * Examples of immediate value lists: * number list: ( 123 , 456 ) * string list: ( "SomeText" 888 ) - * Any enclosing parentheses are removed. + * Any enclosing tqparentheses are removed. * All extracted items are also removed from `l'. * For the example given above the following is returned: * "123 456" @@ -236,7 +236,7 @@ TQString extractValue(TQStringList& l, TQTextStream& stream) { } else { result = shift(l); if (l.first() != ")") { - kError() << loc() << "expecting closing parenthesis" << endl; + kError() << loc() << "expecting closing tqparenthesis" << endl; return result; } l.pop_front(); @@ -286,7 +286,7 @@ PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) { TQStringList tokens = scan(line); TQString stringOrNodeOpener = shift(tokens); TQString name; - if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(TQRegExp("^[A-Za-z]"))) { + if (nt == PetalNode::nt_object && !stringOrNodeOpener.tqcontains(TQRegExp("^[A-Za-z]"))) { kError() << loc() << "unexpected line " << line << endl; return NULL; } @@ -301,7 +301,7 @@ PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) { // Decrement nClosures exactly once, namely for the own scope. // Each recursion of readAttributes() is only responsible for // its own scope. I.e. each further scope closing is handled by - // an outer recursion in case of multiple closing parentheses. + // an outer recursion in case of multiple closing tqparentheses. nClosures--; break; } @@ -339,7 +339,7 @@ PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) { // Decrement nClosures exactly once, namely for the own scope. // Each recursion of readAttributes() is only responsible for // its own scope. I.e. each further scope closing is handled by - // an outer recursion in case of multiple closing parentheses. + // an outer recursion in case of multiple closing tqparentheses. nClosures--; break; } @@ -365,18 +365,18 @@ bool loadFromMDL(TQIODevice& file) { linum = 0; while (!(line = stream.readLine()).isNull()) { linum++; - if (line.contains( TQRegExp("^\\s*\\(object Petal") )) { - while (!(line = stream.readLine()).isNull() && !line.contains(')')) { + if (line.tqcontains( TQRegExp("^\\s*\\(object Petal") )) { + while (!(line = stream.readLine()).isNull() && !line.tqcontains(')')) { linum++; // CHECK: do we need petal version info? } if (line.isNull()) break; } else { TQRegExp objectRx("^\\s*\\(object "); - if (line.contains(objectRx)) { + if (line.tqcontains(objectRx)) { nClosures = 0; TQStringList initialArgs = scan(line); - initialArgs.pop_front(); // remove opening parenthesis + initialArgs.pop_front(); // remove opening tqparenthesis root = readAttributes(initialArgs, stream); } } |