diff options
author | Mike Krus <mike.krus@kdab.com> | 2017-07-19 14:34:44 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2017-07-20 10:06:21 +0000 |
commit | e43d60db88cb906c2985e6d163eb4d2213c2a560 (patch) | |
tree | 3c6748105425ca757d9aba7ce25e47c15c60e842 /tests/auto | |
parent | c7c2b043228293a05d9ff60cfef3aa93089d0b71 (diff) | |
download | qtivi-e43d60db88cb906c2985e6d163eb4d2213c2a560.tar.gz |
Add proper support for flags
QFace supports both enums and flags but the current generator
exports everything as Q_ENUM.
This makes sure flags get generated with Q_FLAG / Q_DECLARE_FLAGS.
Annotation @config {type: “Foo”} will use Foo as the flag type,
otherwise an ’s’ will be appended to the flag type name.
Change-Id: Ie51f0e4ece96ffcee068aeff9df1a64a0e60fd36
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/core/ivigenerator/org.example.echo.qface | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/core/ivigenerator/org.example.echo.qface b/tests/auto/core/ivigenerator/org.example.echo.qface index 80d89cc..a7d4331 100644 --- a/tests/auto/core/ivigenerator/org.example.echo.qface +++ b/tests/auto/core/ivigenerator/org.example.echo.qface @@ -30,6 +30,7 @@ interface Echo { real floatValue2; string stringValue; model<Contact> contactList; + WeekDay weekDay; string echo(string msg); string id() const; @@ -78,6 +79,15 @@ flag AirflowDirection { Floor = 4 } +@config: { type: "DaysOfTheWeek" } +flag WeekDay { + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5 +} + /** * The contact information */ |