From: Olivier Goffart Date: Thu, 16 Mar 2017 13:19:36 +0000 (+0100) Subject: Propagator: change order of destruction X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~789^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=21909cae04a89d4499f6771284f386746d4b0cd5;p=nextcloud-desktop.git Propagator: change order of destruction The destructor of the PropagateItemJob will access the propagator's _activeJobList. So the _rootJob needs to be destroyed before it. Order of destruction is the reverse of the order of the members in the class. So put it at the end so it can be destroyed first. (This made TestSyncEngine::testDirDownloadWithError crash sometimes in the master branch) --- diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 8fd4720c1..0e7be74d7 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -257,10 +257,7 @@ public: class OwncloudPropagator : public QObject { Q_OBJECT - PropagateItemJob *createJob(const SyncFileItemPtr& item); - QScopedPointer _rootJob; - public: const QString _localDir; // absolute path to the local directory. ends with '/' const QString _remoteFolder; // remote folder, ends with '/' @@ -386,6 +383,7 @@ signals: private: AccountPtr _account; + QScopedPointer _rootJob; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // access to signals which are protected in Qt4