summaryrefslogtreecommitdiff
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-08-03 16:23:25 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-08-06 11:54:11 +0000
commit87973325f1b99f2b25a5a0224e623803872ce2ef (patch)
treea1a6c59870156df6200bfdd6f34da38c158cd446 /tests/auto/tools
parent71334c324e702c434d446e5fc329294c97b8516d (diff)
downloadqtbase-87973325f1b99f2b25a5a0224e623803872ce2ef.tar.gz
Handle even more include in enum cases
The solution in d3ed7dac8aa2f4ede0c409254b9dd44842086be0 was needlessly complicated, and broke a valid use case. The issue of no identifier being available to parse after the include has been processed can instead be solved by moving the test for the closing brace after the include processing. Fixes: QTBUG-94790 Pick-to: 6.2 6.1 5.15 Change-Id: Ieec4b89e1d117637f11479e8bddc4060f93da43d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/enum_with_include.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/enum_with_include.h b/tests/auto/tools/moc/enum_with_include.h
index b8abf77f12..cd53ba6a28 100644
--- a/tests/auto/tools/moc/enum_with_include.h
+++ b/tests/auto/tools/moc/enum_with_include.h
@@ -34,6 +34,11 @@ class Foo : public QObject {
enum en {
#include <enum_inc.h>
};
+
+ enum class en2 {
+ #include <enum_inc.h>
+ reference = 42
+ };
Q_OBJECT
};
#endif