summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-22 03:05:11 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-22 03:05:11 (GMT)
commit2575eac4c26ad92dde95959a82f576edc3e76e1d (patch)
tree90166b4b59c991b1f97ad822976a8c9287aaf5f3 /src/tools
parentd62ebb5cc452c894afde0da4ba4dd3bc2456ceb9 (diff)
downloadQt-2575eac4c26ad92dde95959a82f576edc3e76e1d.zip
Qt-2575eac4c26ad92dde95959a82f576edc3e76e1d.tar.gz
Qt-2575eac4c26ad92dde95959a82f576edc3e76e1d.tar.bz2
Naively fix handling of qreal properties for ARM.
This gets things working, but isn't ideal as it treats qreal properties as type double on ARM (where they should be of type float).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/generator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 7d617a3..dbad4dc 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -758,6 +758,9 @@ void Generator::generateMetacall()
else if (cdef->enumDeclarations.value(p.type, false))
fprintf(out, " case %d: *reinterpret_cast<int*>(_v) = QFlag(%s()); break;\n",
propindex, p.read.constData());
+ else if (p.type == "qreal")
+ fprintf(out, " case %d: *reinterpret_cast< double*>(_v) = %s(); break;\n",
+ propindex, p.read.constData());
else
fprintf(out, " case %d: *reinterpret_cast< %s*>(_v) = %s(); break;\n",
propindex, p.type.constData(), p.read.constData());
@@ -782,6 +785,9 @@ void Generator::generateMetacall()
if (cdef->enumDeclarations.value(p.type, false)) {
fprintf(out, " case %d: %s(QFlag(*reinterpret_cast<int*>(_v))); break;\n",
propindex, p.write.constData());
+ } else if(p.type == "qreal") {
+ fprintf(out, " case %d: %s(*reinterpret_cast< double*>(_v)); break;\n",
+ propindex, p.write.constData());
} else {
fprintf(out, " case %d: %s(*reinterpret_cast< %s*>(_v)); break;\n",
propindex, p.write.constData(), p.type.constData());