summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-05-11 13:11:59 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-05-13 12:08:57 +0000
commit629f5a46d531886cebe654a4ddb9269b62874e6a (patch)
treedd5f9168e9a1eda8d1a6c8d84b2ccdec2c2f68a0 /src/tools/moc
parentd6efc6b543d1a8fe2e1232750a98e396db07be0f (diff)
moc: Generate qt_static_metacall for creatable-only gadgets
Prior to this, moc would not generate the function unless the gadget class had a property or a non-constructor invokable. Change-Id: Ic020ea5f8f59702f5e9e194a46e26850e53e5cfe Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/generator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 3b00e21208..5be58d3c4b 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -448,7 +448,8 @@ void Generator::generateCode()
// Generate internal qt_static_metacall() function
//
const bool hasStaticMetaCall = !isQt &&
- (cdef->hasQObject || !cdef->methodList.isEmpty() || !cdef->propertyList.isEmpty());
+ (cdef->hasQObject || !cdef->methodList.isEmpty()
+ || !cdef->propertyList.isEmpty() || !cdef->constructorList.isEmpty());
if (hasStaticMetaCall)
generateStaticMetacall();