From: Manuel Nickschas Date: Wed, 30 May 2018 20:20:17 +0000 (+0200) Subject: core: Properly parent QObject-derived attributes X-Git-Tag: travis-deploy-test~66 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=9f2fbea7c308914d0b737ec9a936a004d4687223;ds=sidebyside core: Properly parent QObject-derived attributes In order to be able to move the Core instance to another thread, all QObject-derived attributes must be properly parented, so they move with their parent object. --- diff --git a/src/core/core.cpp b/src/core/core.cpp index 48e4f0f4..b103b42d 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -81,6 +81,12 @@ Core::Core() delete _instance; } _instance = this; + + // Parent all QObject-derived attributes, so when the Core instance gets moved into another + // thread, they get moved with it + _server.setParent(this); + _v6server.setParent(this); + _storageSyncTimer.setParent(this); }