projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
450c2bd
)
core: Properly parent QObject-derived attributes
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 30 May 2018 20:20:17 +0000
(22:20 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 6 Jun 2018 19:12:17 +0000
(21:12 +0200)
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.
src/core/core.cpp
patch
|
blob
|
history
diff --git
a/src/core/core.cpp
b/src/core/core.cpp
index
48e4f0f
..
b103b42
100644
(file)
--- 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);
}