exposing enums to plugins

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

exposing enums to plugins

heuchi
Since the question came up already, but I don't know if a decision has been
made so far:

Is adding a qml equivalent inside a class the model to use to expose enums to
qml if needed (like Werner did it for AccidentalType and AccidentalRole)?

About testing the qml enum (Werner asked for it). I tried this in my PR1931:

QVERIFY((int)BarLineType::NORMAL == (int)BarLine::QmlBarLineType::NORMAL);
QVERIFY((int)BarLineType::DOUBLE == (int)BarLine::QmlBarLineType::DOUBLE);
(and so on)

Is adding a simple if chain to compare every currently existing member of an
enum with its qml enum equivalent) a sensible way of testing?
There seems to be no way of knowing how much elements an enum has.

Heuchi




------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer