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

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.


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_
Mscore-developer mailing list
[hidden email]