From: Manuel Nickschas Date: Wed, 27 May 2020 21:21:20 +0000 (+0200) Subject: common: Make SyncableObject non-copyable X-Git-Tag: test-travis-01~2 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=673ded0d543cbdc2cf6e746b6bee7c1d21af8f90;hp=673ded0d543cbdc2cf6e746b6bee7c1d21af8f90 common: Make SyncableObject non-copyable QObjects are non-copyable for good reasons. SyncableObject, although deriving from QObject, was made sort-of copyable by adding custom copy ctor and copy assignment operator that did not make a full copy of the underlying QObject, but just copied (most) properties. Several classes deriving from SyncableObject then implemented their own versions of those special member functions on top of that. This was not only rather unexpected and intransparent behavior due to the incomplete copy functionality, but also a most fragile hack since one had to remember to update those functions when adding or modifying properties. In addition, newer compilers apply a somewhat stricter interpretation of the C++ standard, basically enforcing the Rule of Three by omitting implicit generation of copy ctor and/or copy assignment operating in case certain user-defined special member functions exist. In particular, Clang 10 started to emit several warnings (and we already worked around a similar warning from GCC 9+ in cc21148). Instead of adding more workarounds further obfuscating matters, remove the relevant special member functions altogether and thus make SyncableObject and its derivatives non-copyable as they should be. Modify affected code to cope with this cleanly, and without abusing unexpected behavior. ---