aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 2ccd104ed9..5e4a576846 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -82,6 +82,7 @@ private slots:
void failures();
void fallbackLookups();
void fileImportsContainCxxTypes();
+ void flagEnum();
void flushBeforeCapture();
void fromBoolValue();
void funcWithParams();
@@ -1566,6 +1567,18 @@ void tst_QmlCppCodegen::fileImportsContainCxxTypes()
QCOMPARE(o->objectName(), u"horst guenther"_s);
}
+void tst_QmlCppCodegen::flagEnum()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/flagEnum.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+
+ QQmlCommunicationPermission *p = qobject_cast<QQmlCommunicationPermission *>(o.data());
+ QCOMPARE(p->communicationModes(), CommunicationPermission::Access);
+}
+
void tst_QmlCppCodegen::flushBeforeCapture()
{
QQmlEngine engine;