path: root/src/xml/sax
diff options
authorMarc Mutz <>2014-08-27 00:04:11 +0200
committerMarc Mutz <>2015-07-04 06:03:39 +0000
commit160f4191d4de89c37d2f69b8023b3bfa457766cb (patch)
treef7ab44a484d74127c14402714316ebf04bf1a8b2 /src/xml/sax
parentb196573c9aea72fc5b35a4a9e8a7085af88385e8 (diff)
Micro-optimize QKeySequence datastream operator (II)
Instead of reading a QList with the keys and then assigning the list contents to the keysequence internals without any further checking (not even for the size of the list, even though op<< creates lists with just one element), do the processing by hand. The greatest benefit is that there is are no memory allocations anymore, except for the detach and whatever QDataStream does internally. The other benefit is that the output key sequence is not touched until the necessary values have been successfully read. This includes the detach. For this, some very basic error checking has been added. Also removed the magic number 4 in favor of the recently introduced QKeySequencePrivate::MaxKeyCount. Change-Id: If70f75cc043468d2774a7bb03eebdbf39422043a Reviewed-by: Friedemann Kleint <> Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/xml/sax')
0 files changed, 0 insertions, 0 deletions