summaryrefslogtreecommitdiffstats
path: root/kode/code.cpp
diff options
context:
space:
mode:
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 9d02736c..da897693 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;
}