summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-02-04 06:57:16 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-02-04 06:57:16 (GMT)
commit7ced970542d1532fb9613897bc99828178aac5fe (patch)
treea611c64360cb7341aa95af91c11f0c11da176799
parent6eda5790bc5ef3752589d7407efa63f86bba4bed (diff)
downloadQt-7ced970542d1532fb9613897bc99828178aac5fe.zip
Qt-7ced970542d1532fb9613897bc99828178aac5fe.tar.gz
Qt-7ced970542d1532fb9613897bc99828178aac5fe.tar.bz2
Initialize primitives when creating a new QVariant
Change-Id: Ib9a089a9d912acac4d40c3a1e36e08e86d7832aa Task-number: QTBUG-16683 Reviewed-by: Olivier Goffart
-rw-r--r--src/corelib/kernel/qmetatype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 26249ab..8eeee30 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -138,7 +138,7 @@ template <typename T>
void *qMetaTypeConstructHelper(const T *t)
{
if (!t)
- return new T;
+ return new T();
return new T(*static_cast<const T*>(t));
}