summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-13 17:14:43 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-01 07:39:55 +0000
commitef05c48898e90e4ff40d8c4493f4b80bc22c1703 (patch)
treee568f3d1a746d89e44a306d6e201f2adafde77a9 /src/corelib/kernel
parent869459f3c83eeeb404105ea656e1220c3de489e6 (diff)
Fix -Wdeprecated-copy warnings
Implicit copy constructors or methods are considered deprecated for classes that has one of the two or a destructor. The warning is enabled with -Wextra in gcc 9 Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qvariant.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index f95502e75f..3cc6d559c1 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -398,10 +398,13 @@ class Q_CORE_EXPORT QVariant
: type(variantType), is_shared(false), is_null(false)
{}
- inline Private(const Private &other) Q_DECL_NOTHROW
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ Private(const Private &other) Q_DECL_NOTHROW
: data(other.data), type(other.type),
is_shared(other.is_shared), is_null(other.is_null)
{}
+ Private &operator=(const Private &other) Q_DECL_NOTHROW = default;
+#endif
union Data
{
char c;