diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-19 13:03:43 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-08 18:20:17 +0100 |
| commit | f247e94b51a825b09c33ad09098622677801a3b8 (patch) | |
| tree | b2606be27869c0557bfc5b3d7505b239f0e3a086 | |
| parent | eab6eb64d2fab21c4791738323ca7d670a907de1 (diff) | |
Enlarge QVariant's private to fit the new QString and QByteArray
Change-Id: I8baecd0a4db13200b34cdd7c8aebc2a1cc0a0c75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| -rw-r--r-- | src/corelib/kernel/qvariant.h | 3 | ||||
| -rw-r--r-- | tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 21802aee856..0457b6fbada 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -396,7 +396,7 @@ class Q_CORE_EXPORT QVariant struct Private { inline Private() noexcept : type(Invalid), is_shared(false), is_null(true) - { data.ptr = nullptr; } + {} // Internal constructor for initialized variants. explicit inline Private(uint variantType) noexcept @@ -412,6 +412,7 @@ class Q_CORE_EXPORT QVariant #endif union Data { + void *threeptr[3] = { nullptr, nullptr, nullptr }; char c; uchar uc; short s; diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 63810303948..c4af2267a80 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3614,8 +3614,7 @@ Q_DECLARE_METATYPE(Convertible); struct BigConvertible { double d; - double dummy; - double dummy2; + double dummy[sizeof(QVariant) / sizeof(double)]; operator int() const { return (int)d; } operator double() const { return d; } operator QString() const { return QString::number(d); } |
