summaryrefslogtreecommitdiffstats
path: root/kode/code.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kode/code.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kode/code.cpp')
-rw-r--r--kode/code.cpp36
1 files changed, 18 insertions, 18 deletions
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 <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
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;
}