aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-04-06 06:28:12 +0000
committerMike Buland <eichlan@xagasoft.com>2012-04-06 06:28:12 +0000
commitfe9f6c6bbc9e682af709fe08757c31ba17a298d1 (patch)
treee10ff71b5ed6b48a65419a1896f9b92b75fa4e07 /c++-qt/src
parentfba73219e3c7bf65b459a3303f579fd83c8fd0af (diff)
downloadlibgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.gz
libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.bz2
libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.tar.xz
libgats-fe9f6c6bbc9e682af709fe08757c31ba17a298d1.zip
I think I fixed a seeking bug in the qt gatsstream, but...I haven't tested it
yet.
Diffstat (limited to 'c++-qt/src')
-rw-r--r--c++-qt/src/gatsstream.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/c++-qt/src/gatsstream.cpp b/c++-qt/src/gatsstream.cpp
index d32b2b2..ae53d0d 100644
--- a/c++-qt/src/gatsstream.cpp
+++ b/c++-qt/src/gatsstream.cpp
@@ -86,15 +86,20 @@ void Gats::GatsStream::writeObject( Gats::Object *pObject )
86 pTmp->write( (const char *)&iSize, 4 ); 86 pTmp->write( (const char *)&iSize, 4 );
87 pObject->write( *pTmp ); 87 pObject->write( *pTmp );
88 iSize = htonl( pTmp->pos() ); 88 iSize = htonl( pTmp->pos() );
89 uint64_t iEndPos = pTmp->pos();
89 pTmp->seek( iSizePos ); 90 pTmp->seek( iSizePos );
90 pTmp->write( (const char *)&iSize, 4 ); 91 pTmp->write( (const char *)&iSize, 4 );
91 pTmp->close();
92 92
93 if( rStream.isSequential() ) 93 if( rStream.isSequential() )
94 { 94 {
95 pTmp->close();
95 rStream.write( ((QBuffer *)pTmp)->data() ); 96 rStream.write( ((QBuffer *)pTmp)->data() );
96 delete pTmp; 97 delete pTmp;
97 } 98 }
99 else
100 {
101 pTmp->seek( iSizePos );
102 }
98} 103}
99 104
100bool Gats::GatsStream::skipReadNulls() 105bool Gats::GatsStream::skipReadNulls()