From 21909cae04a89d4499f6771284f386746d4b0cd5 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 16 Mar 2017 14:19:36 +0100 Subject: [PATCH] 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) --- src/libsync/owncloudpropagator.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 2.30.2