Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.6.2
-
None
Description
Calling QTextStream::pos() causes invalid behaviour of QTextStream::readLine ().
Somewhere at the boundary of inner QTextStreamPrivate::readBuffer of 16Kb occurs the malfunction of QTextStream::readLine ().
It may be illustrated by the simple attached project ReadLineBug.pro that processes file test.s19 that is attached also.
When macro BUG_SWITCHED_ON is defined one would obtain output of INCORRECT behavior that finishes as
...
#348 'S315400015a000000568000005690000056a0000056b3b'
#349 'S315400015b00000056c0000056d0000056e0000056f1b'
INVALID VALUE of txpos
#350 'S0200000443A5C50726F6A656374735C5A6F6E645C64656275675C74312E73313955'
INVALID VALUE of txpos
INVALID LINE HAS BEEN READ
If one would undefine macro BUG_SWITCHED_ON then the program ReadLineBug
demonstrates correct behavior and its output finishes as
...
#397 'S315400018b00000062c0000062d0000062e0000062f14'
#398 'S315400018c000000630000006310000063200000633f4'
#399 'S315400018d000000634000006350000063600000637d4'
#400 'S315400018e000000638000006390000063a0000063bb4'
file has been read OK