qt5base-lts/examples/network/torrent
Giuseppe D'Angelo 1018dba04f Torrent example: fix crash
Yet Another Side Effect of not keeping iterator stability.

Although not idiomatic, the pattern

  while (i != e) {
    auto cur = i++;
    if (cond)
      erase(cur);
  }

was actually correct. Move to the idiomatic erase pattern
instead (it = cont.erase(it)).

The example still has memory problems all over the place on
shutdown. At least now it doesn't crash when running.

Change-Id: I30bd2c4e2b3fa7fe4e28d4426ff3d894b9bae103
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-11 10:21:29 +02:00
..
forms Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
icons Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
.prev_CMakeLists.txt Regenerate examples 2020-02-04 18:50:39 +00:00
addtorrentdialog.cpp Cleanup network examples 2019-11-06 10:57:23 +01:00
addtorrentdialog.h Cleanup network examples 2019-11-06 10:57:23 +01:00
bencodeparser.cpp Unify license header usage. 2016-03-29 10:20:03 +00:00
bencodeparser.h Unify license header usage. 2016-03-29 10:20:03 +00:00
CMakeLists.txt Regenerate examples 2020-02-04 18:50:39 +00:00
connectionmanager.cpp Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
connectionmanager.h Unify license header usage. 2016-03-29 10:20:03 +00:00
filemanager.cpp Network examples: cleanup foreach usage 2019-01-06 13:39:49 +00:00
filemanager.h Cleanup network examples 2019-11-06 10:57:23 +01:00
icons.qrc Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
main.cpp Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
mainwindow.cpp torrent example: fix premature pessimisation 2020-05-05 05:28:19 +00:00
mainwindow.h Cleanup network examples 2019-11-06 10:57:23 +01:00
metainfo.cpp Network examples: cleanup foreach usage 2019-01-06 13:39:49 +00:00
metainfo.h Unify license header usage. 2016-03-29 10:20:03 +00:00
peerwireclient.cpp QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead 2020-02-27 13:56:45 +01:00
peerwireclient.h Cleanup network examples 2019-11-06 10:57:23 +01:00
ratecontroller.cpp Torrent example: fix crash 2020-05-11 10:21:29 +02:00
ratecontroller.h Cleanup network examples 2019-11-06 10:57:23 +01:00
torrent.pro qtlite: Skip building examples when configured with no-feature-itemviews 2018-01-12 07:58:20 +00:00
torrentclient.cpp QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead 2020-02-27 13:56:45 +01:00
torrentclient.h Cleanup network examples 2019-11-06 10:57:23 +01:00
torrentserver.cpp QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead 2020-02-27 13:56:45 +01:00
torrentserver.h Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
trackerclient.cpp Revert "QNetworkReply: deprecate the 'error' getter" 2020-02-28 07:21:14 +03:00
trackerclient.h Cleanup network examples 2019-11-06 10:57:23 +01:00