summaryrefslogtreecommitdiff
path: root/qmake/tools/qtextstream.cpp
authorllornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
committer llornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
commit155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (side-by-side diff)
treee6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/tools/qtextstream.cpp
parent86703e8a5527ef114facd02c005b6b3a7e62e263 (diff)
downloadopie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2
update qmake to 1.05a
Diffstat (limited to 'qmake/tools/qtextstream.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/tools/qtextstream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/tools/qtextstream.cpp b/qmake/tools/qtextstream.cpp
index 75c6531..ddca5bd 100644
--- a/qmake/tools/qtextstream.cpp
+++ b/qmake/tools/qtextstream.cpp
@@ -1060,65 +1060,65 @@ QTextStream &QTextStream::writeBlock( const char* p, uint len )
if ( !mapper && !latin1 )
ts_putc( QChar::byteOrderMark );
}
// QCString and const char * are treated as Latin-1
if ( !mapper && latin1 ) {
dev->writeBlock( p, len );
} else if ( !mapper && internalOrder ) {
QChar *u = new QChar[len];
for ( uint i = 0; i < len; i++ )
u[i] = p[i];
dev->writeBlock( (char*)u, len * sizeof(QChar) );
delete [] u;
} else {
for ( uint i = 0; i < len; i++ )
ts_putc( (uchar)p[i] );
}
return *this;
}
QTextStream &QTextStream::writeBlock( const QChar* p, uint len )
{
#ifndef QT_NO_TEXTCODEC
if ( mapper ) {
if ( !d->encoder )
d->encoder = mapper->makeEncoder();
QConstString s( p, len );
int l = len;
QCString block = d->encoder->fromUnicode( s.string(), l );
dev->writeBlock( block, l );
} else
#endif
if ( latin1 ) {
- char *str = QString::unicodeToAscii( p, len );
+ char *str = QString::unicodeToLatin1( p, len );
dev->writeBlock( str, len );
delete [] str;
} else if ( internalOrder ) {
if ( doUnicodeHeader ) {
doUnicodeHeader = FALSE;
ts_putc( QChar::byteOrderMark );
}
dev->writeBlock( (char*)p, sizeof(QChar)*len );
} else {
for (uint i=0; i<len; i++)
ts_putc( p[i] );
}
return *this;
}
/*!
Resets the text stream.
\list
\i All flags are set to 0.
\i The field width is set to 0.
\i The fill character is set to ' ' (Space).
\i The precision is set to 6.
\endlist
\sa setf(), width(), fill(), precision()
*/
void QTextStream::reset()
{
fflags = 0;
fwidth = 0;