aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/theme.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-12-08 21:45:21 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-12-10 02:42:47 +0100
commitaf356e3bc87f8029026d1eaa345f7197c0705ffa (patch)
tree6355f1205627931c69ef59a20df92fd63d3ae658 /tests/auto/qml/qmlcppcodegen/data/theme.cpp
parent25333a6af2647545f770b2df34e4cb4f7f6217bd (diff)
qmlcachegen: Don't generate bad code if we cannot resolve a return type
If we cannot resolve a return type, we need to refrain from calling the method. Pick-to: 6.2 Task-number: QTBUG-99042 Change-Id: Ie5ba0367c83c178f7e5c112072ca97d3c1c1fb1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/theme.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/theme.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/theme.cpp b/tests/auto/qml/qmlcppcodegen/data/theme.cpp
index a728533489..c5dea8c0a8 100644
--- a/tests/auto/qml/qmlcppcodegen/data/theme.cpp
+++ b/tests/auto/qml/qmlcppcodegen/data/theme.cpp
@@ -13,4 +13,13 @@ int Theme::index(Area area) const
return -1;
}
+QRectF Theme::area(Area area) const
+{
+ switch(area) {
+ case TopLeft: return QRectF(0.0, 0.0, 5.0, 10.0);
+ case BottomRight: return QRectF(5.0, 10.0, 1.0, 1.0);
+ }
+ return QRectF();
+}
+
}