summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-11-18 12:04:13 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-12-13 05:10:10 +0100
commit0bc6c4f7ecfa332de57500fe722872eff4009b9b (patch)
tree5744580102b73fe1c173189f6651e07df1d2ece7 /src/testlib
parent2dd445a25acbf0ff56f0531b70fe04d33ce2349a (diff)
QTextStream: stream QStrings without modifying the user content
QTextStream::operator<< calls QTextStreamPrivate::putString, which was taking a copy of the user's string and modifying it depending on padding. That is not necessary, since we're only talking about padding. Instead, calculate the left and right paddings. For the case of "accounting padding", we move the sign (if any) to the beginning of the left padding and skip it in the data. The one side-effect I can think of is that the stream could flush in the middle of the writing operation. The debugging section had to be removed because it doesn't make sense anymore. Change-Id: I57fdbf98ec6f054f4e085f2e465de3dcbb6225ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/testlib')
0 files changed, 0 insertions, 0 deletions