summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/generator.h
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-16 15:05:48 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-18 21:05:59 +0100
commit66ec281ba2b992d9300e5a7f2bf0bb8d1d22ff2d (patch)
tree6c407d77ee8666283497144a18e91f717bbf9efc /src/tools/moc/generator.h
parentb20cbf7102c62c8c769ed1d1b0c4949e603a7a4c (diff)
Ensure that moc doesn't resolve the qreal meta-type id
When cross-compiling, the qreal type can be different on the target than on the host (e.g. double on host, and float on target). moc is a host binary, so it shouldn't try to resolve the type id of qreal, but instead always output "QMetaType::QReal" (which is just an alias for QMetaType::Double or QMetaType::Float, depending on the target). This was a regression introduced in commit f95181c7bb340744a0ce172e8c5a8fcdc2543297 (new meta-object format); the special-casing for qreal should have been kept. Moved the code that generates the type info into its own function so the logic is shared by generateFunctions() and generateProperties(). Change-Id: I2b76cf063a08ba95a7e6033549452355f67283ac Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/tools/moc/generator.h')
-rw-r--r--src/tools/moc/generator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h
index c85d24fd15..8ebc00b100 100644
--- a/src/tools/moc/generator.h
+++ b/src/tools/moc/generator.h
@@ -61,6 +61,7 @@ private:
void generateFunctions(const QList<FunctionDef> &list, const char *functype, int type, int &paramsIndex);
void generateFunctionRevisions(const QList<FunctionDef>& list, const char *functype);
void generateFunctionParameters(const QList<FunctionDef> &list, const char *functype);
+ void generateTypeInfo(const QByteArray &typeName, bool allowEmptyName = false);
void registerEnumStrings();
void generateEnums(int index);
void registerPropertyStrings();