diff options
author | Vitaly Fanaskov <vitaly.fanaskov@qt.io> | 2020-01-16 17:21:15 +0100 |
---|---|---|
committer | Vitaly Fanaskov <vitaly.fanaskov@qt.io> | 2020-01-17 02:22:22 +0100 |
commit | 63b0b857f3cc84315a10c9b6d988bd657e7ce998 (patch) | |
tree | c2e221ed7fd2ba5ef094d1172efa9a1b21a311d1 /src/gui/kernel/qpalette.h | |
parent | 983432effdae888a372d814ff9516abbcb7a3c29 (diff) |
QPalette: fix function swap and move operator
Additional data should also be taken into account when using move
operator and function swap. This is already implemented for move
constructor.
Task-number: QTBUG-78544
Change-Id: I24ba34b0957a8fba7e15a934f2d08222dc95650f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qpalette.h')
-rw-r--r-- | src/gui/kernel/qpalette.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h index c95640d383..fd0ef2e2d9 100644 --- a/src/gui/kernel/qpalette.h +++ b/src/gui/kernel/qpalette.h @@ -72,11 +72,12 @@ public: { other.d = nullptr; } inline QPalette &operator=(QPalette &&other) noexcept { - qSwap(d, other.d); return *this; + swap(other); return *this; } void swap(QPalette &other) noexcept { + qSwap(data, other.data); qSwap(d, other.d); } |