diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-13 20:49:57 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-05-15 09:00:10 +0000 |
commit | 8b771e782d054d4fd4135491c35d032bc850947a (patch) | |
tree | 490ef7d423dd98557a6b999e62d0ccf1b856ec56 /src/widgets | |
parent | c871ba2b23719354659938e5fb8c7898b22ab459 (diff) |
QNetworkReply: replace a QQueue with a std::vector
The 'queue' was never used as a queue: it was populated, and then
exchanged into a local copy to be consumed in a loop. This loop used
dequeue(), but of course it could just const-iterate the container and
dump it as the end, since the member variable was already reset at
that point, no-one could tell the difference from the outside.
So, no need for a queue. A vector will do very nicely.
The loop now uses ranged-for and qExchange(), greatly simplifying the
code over the old version.
Add another qExchange() call as a drive-by.
Change-Id: I6147453dc9edfe9500833627b123bb3a31114651
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets')
0 files changed, 0 insertions, 0 deletions