diff options
Diffstat (limited to 'python/pyqt/pylupdate3/proparser.cpp')
-rw-r--r-- | python/pyqt/pylupdate3/proparser.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/python/pyqt/pylupdate3/proparser.cpp b/python/pyqt/pylupdate3/proparser.cpp index f018b4c3..6010cbeb 100644 --- a/python/pyqt/pylupdate3/proparser.cpp +++ b/python/pyqt/pylupdate3/proparser.cpp @@ -14,58 +14,58 @@ ** **********************************************************************/ -#include <qregexp.h> -#include <qstringlist.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include "proparser.h" -QMap<QString, QString> proFileTagMap( const QString& text ) +TQMap<TQString, TQString> proFileTagMap( const TQString& text ) { - QString t = text; + TQString t = text; /* Strip comments, merge lines ending with backslash, add spaces around '=' and '+=', replace '\n' with ';', and simplify white spaces. */ - t.replace( QRegExp(QString("#[^\n]$")), QString(" ") ); - t.replace( QRegExp(QString("\\\\\\s*\n")), QString(" ") ); - t.replace( QRegExp(QString("=")), QString(" = ") ); - t.replace( QRegExp(QString("\\+ =")), QString(" += ") ); - t.replace( QRegExp(QString("\n")), QString(";") ); + t.replace( TQRegExp(TQString("#[^\n]$")), TQString(" ") ); + t.replace( TQRegExp(TQString("\\\\\\s*\n")), TQString(" ") ); + t.replace( TQRegExp(TQString("=")), TQString(" = ") ); + t.replace( TQRegExp(TQString("\\+ =")), TQString(" += ") ); + t.replace( TQRegExp(TQString("\n")), TQString(";") ); t = t.simplifyWhiteSpace(); - QMap<QString, QString> tagMap; + TQMap<TQString, TQString> tagMap; - QStringList lines = QStringList::split( QChar(';'), t ); - QStringList::Iterator line; + TQStringList lines = TQStringList::split( TQChar(';'), t ); + TQStringList::Iterator line; for ( line = lines.begin(); line != lines.end(); ++line ) { - QStringList toks = QStringList::split( QChar(' '), *line ); + TQStringList toks = TQStringList::split( TQChar(' '), *line ); if ( toks.count() >= 3 && - (toks[1] == QString("=") || toks[1] == QString("+=")) ) { - QString tag = toks.first(); - int k = tag.findRev( QChar(':') ); // as in 'unix:' + (toks[1] == TQString("=") || toks[1] == TQString("+=")) ) { + TQString tag = toks.first(); + int k = tag.findRev( TQChar(':') ); // as in 'unix:' if ( k != -1 ) tag = tag.mid( k + 1 ); toks.remove( toks.begin() ); - QString action = toks.first(); + TQString action = toks.first(); toks.remove( toks.begin() ); if ( tagMap.contains(tag) ) { - if ( action == QString("=") ) - tagMap.replace( tag, toks.join(QChar(' ')) ); + if ( action == TQString("=") ) + tagMap.replace( tag, toks.join(TQChar(' ')) ); else - tagMap[tag] += QChar( ' ' ) + toks.join( QChar(' ') ); + tagMap[tag] += TQChar( ' ' ) + toks.join( TQChar(' ') ); } else { - tagMap[tag] = toks.join( QChar(' ') ); + tagMap[tag] = toks.join( TQChar(' ') ); } } } - QRegExp var( "\\$\\$[a-zA-Z0-9_]+" ); - QMap<QString, QString>::Iterator it; + TQRegExp var( "\\$\\$[a-zA-Z0-9_]+" ); + TQMap<TQString, TQString>::Iterator it; for ( it = tagMap.begin(); it != tagMap.end(); ++it ) { int i = 0; |