From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kode/code.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kode/code.cpp') diff --git a/kode/code.cpp b/kode/code.cpp index 9d02736c6..da8976931 100644 --- a/kode/code.cpp +++ b/kode/code.cpp @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include using namespace KODE; @@ -41,7 +41,7 @@ Code::Code( int indent ) void Code::clear() { mIndent = 0; - mText = QString::null; + mText = TQString::null; } bool Code::isEmpty() const @@ -65,7 +65,7 @@ void Code::unindent() if ( mIndent < 0 ) mIndent = 0; } -void Code::addLine( const QString &line ) +void Code::addLine( const TQString &line ) { mText += spaces( mIndent ); mText += line; @@ -77,22 +77,22 @@ void Code::newLine() mText += '\n'; } -QString Code::spaces( int count ) +TQString Code::spaces( int count ) { - QString str; + TQString str; for( int i = 0; i < count; ++i ) { str += ' '; } return str; } -void Code::addBlock( const QString &block ) +void Code::addBlock( const TQString &block ) { - QStringList lines = QStringList::split( "\n", block, true ); + TQStringList lines = TQStringList::split( "\n", block, true ); if ( !lines.isEmpty() && lines.last().isEmpty() ) { lines.pop_back(); } - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = lines.begin(); it != lines.end(); ++it ) { if ( !(*it).isEmpty() ) mText += spaces( mIndent ); mText += *it; @@ -100,7 +100,7 @@ void Code::addBlock( const QString &block ) } } -void Code::addBlock( const QString &block, int indent ) +void Code::addBlock( const TQString &block, int indent ) { int tmp = mIndent; mIndent = indent; @@ -113,26 +113,26 @@ void Code::addBlock( const Code &c ) addBlock( c.text() ); } -void Code::addWrappedText( const QString &txt ) +void Code::addWrappedText( const TQString &txt ) { int maxWidth = 80 - mIndent; unsigned int pos = 0; while ( pos < txt.length() ) { - QString line = txt.mid( pos, maxWidth ); + TQString line = txt.mid( pos, maxWidth ); addLine( line ); pos += maxWidth; } } -void Code::addFormattedText( const QString &text ) +void Code::addFormattedText( const TQString &text ) { int maxWidth = 80 - mIndent; int lineLength = 0; - QString line; - const QStringList words = QStringList::split( ' ', text, false ); + TQString line; + const TQStringList words = TQStringList::split( ' ', text, false ); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = words.begin(); it != words.end(); ++it ) { if ( (int)(*it).length() + lineLength >= maxWidth ) { addLine( line ); @@ -147,7 +147,7 @@ void Code::addFormattedText( const QString &text ) addLine( line ); } -Code &Code::operator+=( const QString &str ) +Code &Code::operator+=( const TQString &str ) { addLine( str ); @@ -156,7 +156,7 @@ Code &Code::operator+=( const QString &str ) Code &Code::operator+=( const char *str ) { - addLine( QString::fromLocal8Bit( str ) ); + addLine( TQString::fromLocal8Bit( str ) ); return *this; } -- cgit v1.2.1