From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/cppparser/parser.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/cppparser/parser.h') diff --git a/lib/cppparser/parser.h b/lib/cppparser/parser.h index d675c3da..771df635 100644 --- a/lib/cppparser/parser.h +++ b/lib/cppparser/parser.h @@ -22,10 +22,10 @@ #include "ast.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -38,11 +38,11 @@ struct Error; class CommentFormatter { - static inline bool isWhite( QChar c ) { + static inline bool isWhite( TQChar c ) { return c.isSpace(); } - static void rStrip( QString str, QString& from ) { + static void rStrip( TQString str, TQString& from ) { if( str.isEmpty() ) return; int i = 0; @@ -66,7 +66,7 @@ class CommentFormatter { if( ip != (int)from.length() ) from = from.left( ip ); } - static void strip( QString str, QString& from ) { + static void strip( TQString str, TQString& from ) { if( str.isEmpty() ) return; int i = 0; @@ -92,8 +92,8 @@ class CommentFormatter { public: - static QString formatComment( QString comment ) { - QString ret; + static TQString formatComment( TQString comment ) { + TQString ret; int i = 0; int s = comment.length(); while( i < s && comment[i] == '/' ) { @@ -104,16 +104,16 @@ class CommentFormatter { ret = comment.mid( i ); } else { ///remove the star in each line - QStringList lines = QStringList::split( "\n", comment ); + TQStringList lines = TQStringList::split( "\n", comment ); if( lines.isEmpty() ) return ret; strip( "/**", lines.front() ); rStrip( "/**", lines.back() ); - QStringList::iterator it = lines.begin(); + TQStringList::iterator it = lines.begin(); ++it; - QStringList::iterator eit = lines.end(); + TQStringList::iterator eit = lines.end(); if( it != lines.end() ) { --eit; @@ -137,7 +137,7 @@ class CommentFormatter { }; class Comment { - QString m_text; + TQString m_text; int m_line; bool m_formatted; @@ -149,7 +149,7 @@ class Comment { } public: - Comment( QString text = "", int line = -1 ) : m_text( text ), m_line( line ), m_formatted(false) { + Comment( TQString text = "", int line = -1 ) : m_text( text ), m_line( line ), m_formatted(false) { } Comment( int line ) : m_line( line ) { @@ -165,7 +165,7 @@ class Comment { return !m_text.isEmpty(); } - operator QString() { + operator TQString() { format(); return m_text; } @@ -264,7 +264,7 @@ public: private: virtual bool reportError( const Error& err ); - /** @todo remove*/ virtual bool reportError( const QString& msg ); + /** @todo remove*/ virtual bool reportError( const TQString& msg ); /** @todo remove*/ virtual void syntaxError(); public /*rules*/ : @@ -431,7 +431,7 @@ public /*rules*/ : bool skipUntilDeclaration(); bool skipUntilStatement(); bool skip( int l, int r ); - QString toString( int start, int end, const QString& sep=" " ) const; + TQString toString( int start, int end, const TQString& sep=" " ) const; private: int currentLine(); -- cgit v1.2.3