author | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
commit | 155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff) | |
tree | e6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/tools/qdatastream.cpp | |
parent | 86703e8a5527ef114facd02c005b6b3a7e62e263 (diff) | |
download | opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2 |
update qmake to 1.05a
-rw-r--r-- | qmake/tools/qdatastream.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/qmake/tools/qdatastream.cpp b/qmake/tools/qdatastream.cpp index 9c573c7..51a1448 100644 --- a/qmake/tools/qdatastream.cpp +++ b/qmake/tools/qdatastream.cpp | |||
@@ -745,18 +745,26 @@ QDataStream &QDataStream::readBytes( char *&s, uint &l ) | |||
745 | \sa readBytes(), QIODevice::readBlock(), writeRawBytes() | 745 | \sa readBytes(), QIODevice::readBlock(), writeRawBytes() |
746 | */ | 746 | */ |
747 | 747 | ||
748 | QDataStream &QDataStream::readRawBytes( char *s, uint len ) | 748 | QDataStream &QDataStream::readRawBytes( char *s, uint len ) |
749 | { | 749 | { |
750 | CHECK_STREAM_PRECOND | 750 | CHECK_STREAM_PRECOND |
751 | if ( printable ) { // printable data | 751 | if ( printable ) { // printable data |
752 | register Q_INT8 *p = (Q_INT8*)s; | 752 | register Q_INT8 *p = (Q_INT8*)s; |
753 | while ( len-- ) | 753 | if ( version() < 4 ) { |
754 | *this >> *p++; | 754 | while ( len-- ) { |
755 | Q_INT32 tmp; | ||
756 | *this >> tmp; | ||
757 | *p++ = tmp; | ||
758 | } | ||
759 | } else { | ||
760 | while ( len-- ) | ||
761 | *this >> *p++; | ||
762 | } | ||
755 | } else { // read data char array | 763 | } else { // read data char array |
756 | dev->readBlock( s, len ); | 764 | dev->readBlock( s, len ); |
757 | } | 765 | } |
758 | return *this; | 766 | return *this; |
759 | } | 767 | } |
760 | 768 | ||
761 | 769 | ||
762 | /***************************************************************************** | 770 | /***************************************************************************** |
@@ -1007,18 +1015,24 @@ QDataStream &QDataStream::writeBytes(const char *s, uint len) | |||
1007 | 1015 | ||
1008 | \sa writeBytes(), QIODevice::writeBlock(), readRawBytes() | 1016 | \sa writeBytes(), QIODevice::writeBlock(), readRawBytes() |
1009 | */ | 1017 | */ |
1010 | 1018 | ||
1011 | QDataStream &QDataStream::writeRawBytes( const char *s, uint len ) | 1019 | QDataStream &QDataStream::writeRawBytes( const char *s, uint len ) |
1012 | { | 1020 | { |
1013 | CHECK_STREAM_PRECOND | 1021 | CHECK_STREAM_PRECOND |
1014 | if ( printable ) { // write printable | 1022 | if ( printable ) { // write printable |
1015 | register Q_INT8 *p = (Q_INT8*)s; | 1023 | if ( version() < 4 ) { |
1016 | while ( len-- ) | 1024 | register char *p = (char *)s; |
1017 | *this << *p++; | 1025 | while ( len-- ) |
1026 | *this << *p++; | ||
1027 | } else { | ||
1028 | register Q_INT8 *p = (Q_INT8*)s; | ||
1029 | while ( len-- ) | ||
1030 | *this << *p++; | ||
1031 | } | ||
1018 | } else { // write data char array | 1032 | } else { // write data char array |
1019 | dev->writeBlock( s, len ); | 1033 | dev->writeBlock( s, len ); |
1020 | } | 1034 | } |
1021 | return *this; | 1035 | return *this; |
1022 | } | 1036 | } |
1023 | 1037 | ||
1024 | #endif // QT_NO_DATASTREAM | 1038 | #endif // QT_NO_DATASTREAM |