summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r--src/corelib/kernel/qvariant.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 8d342cb1229..6d7d56efc6b 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -364,7 +364,14 @@ class Q_CORE_EXPORT QVariant
};
struct Private
{
- inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
+ inline Private(): type(Invalid), is_shared(false), is_null(true)
+ { data.ptr = 0; }
+
+ // Internal constructor for initialized variants.
+ explicit inline Private(uint variantType)
+ : type(variantType), is_shared(false), is_null(false)
+ {}
+
inline Private(const Private &other)
: data(other.data), type(other.type),
is_shared(other.is_shared), is_null(other.is_null)