Fix a crash when accessing a dangling UploadDevice pointer #2984
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>
Mon, 23 Mar 2015 15:13:52 +0000 (16:13 +0100)
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>
Mon, 23 Mar 2015 15:14:54 +0000 (16:14 +0100)
commit3c9acdf724e3bc01be2da1ea0d6467a8f42c6ae6
treee2282348cc9aee975f17d8a0c01a10d970c8dc34
parente81d1ab9b8f96dada21d4f1419f48f974033c92b
Fix a crash when accessing a dangling UploadDevice pointer #2984

This is largely a guess, but this is the only place where we use
a QIODevice to push data through QNAM and that the QIODevice isn't
a direct child of the QNetworkReply.

Fix the issue by making sure that we don't go back to the event loop
and possibly handle network events between the destruction of the
upload QIODevice and the QNetworkReply, which might lead to QNAM
dereferencing a dangling QIODevice pointer.
src/libsync/networkjobs.cpp
src/libsync/propagateupload.cpp
src/libsync/propagateupload.h