From e43d60db88cb906c2985e6d163eb4d2213c2a560 Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Wed, 19 Jul 2017 14:34:44 +0100 Subject: Add proper support for flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/core/ivigenerator/org.example.echo.qface | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/auto') 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 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 */ -- cgit v1.2.1