summaryrefslogtreecommitdiff
path: root/qmake/tools/qtextstream.cpp
Unidiff
Diffstat (limited to 'qmake/tools/qtextstream.cpp') (more/less context) (show 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
@@ -1080,25 +1080,25 @@ QTextStream &QTextStream::writeBlock( const QChar* p, uint len )
1080{ 1080{
1081#ifndef QT_NO_TEXTCODEC 1081#ifndef QT_NO_TEXTCODEC
1082 if ( mapper ) { 1082 if ( mapper ) {
1083 if ( !d->encoder ) 1083 if ( !d->encoder )
1084 d->encoder = mapper->makeEncoder(); 1084 d->encoder = mapper->makeEncoder();
1085 QConstString s( p, len ); 1085 QConstString s( p, len );
1086 int l = len; 1086 int l = len;
1087 QCString block = d->encoder->fromUnicode( s.string(), l ); 1087 QCString block = d->encoder->fromUnicode( s.string(), l );
1088 dev->writeBlock( block, l ); 1088 dev->writeBlock( block, l );
1089 } else 1089 } else
1090#endif 1090#endif
1091 if ( latin1 ) { 1091 if ( latin1 ) {
1092 char *str = QString::unicodeToAscii( p, len ); 1092 char *str = QString::unicodeToLatin1( p, len );
1093 dev->writeBlock( str, len ); 1093 dev->writeBlock( str, len );
1094 delete [] str; 1094 delete [] str;
1095 } else if ( internalOrder ) { 1095 } else if ( internalOrder ) {
1096 if ( doUnicodeHeader ) { 1096 if ( doUnicodeHeader ) {
1097 doUnicodeHeader = FALSE; 1097 doUnicodeHeader = FALSE;
1098 ts_putc( QChar::byteOrderMark ); 1098 ts_putc( QChar::byteOrderMark );
1099 } 1099 }
1100 dev->writeBlock( (char*)p, sizeof(QChar)*len ); 1100 dev->writeBlock( (char*)p, sizeof(QChar)*len );
1101 } else { 1101 } else {
1102 for (uint i=0; i<len; i++) 1102 for (uint i=0; i<len; i++)
1103 ts_putc( p[i] ); 1103 ts_putc( p[i] );
1104 } 1104 }