summaryrefslogtreecommitdiff
path: root/qmake/tools/qtextstream.cpp
Unidiff
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
@@ -1068,49 +1068,49 @@ QTextStream &QTextStream::writeBlock( const char* p, uint len )
1068 for ( uint i = 0; i < len; i++ ) 1068 for ( uint i = 0; i < len; i++ )
1069 u[i] = p[i]; 1069 u[i] = p[i];
1070 dev->writeBlock( (char*)u, len * sizeof(QChar) ); 1070 dev->writeBlock( (char*)u, len * sizeof(QChar) );
1071 delete [] u; 1071 delete [] u;
1072 } else { 1072 } else {
1073 for ( uint i = 0; i < len; i++ ) 1073 for ( uint i = 0; i < len; i++ )
1074 ts_putc( (uchar)p[i] ); 1074 ts_putc( (uchar)p[i] );
1075 } 1075 }
1076 return *this; 1076 return *this;
1077} 1077}
1078 1078
1079QTextStream &QTextStream::writeBlock( const QChar* p, uint len ) 1079QTextStream &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 }
1105 return *this; 1105 return *this;
1106} 1106}
1107 1107
1108/*! 1108/*!
1109 Resets the text stream. 1109 Resets the text stream.
1110 1110
1111 \list 1111 \list
1112 \i All flags are set to 0. 1112 \i All flags are set to 0.
1113 \i The field width is set to 0. 1113 \i The field width is set to 0.
1114 \i The fill character is set to ' ' (Space). 1114 \i The fill character is set to ' ' (Space).
1115 \i The precision is set to 6. 1115 \i The precision is set to 6.
1116 \endlist 1116 \endlist