KeySig key exposure not working

• Mar 2, 2016 - 21:45
Reported version
2.1
Type
Plugins
Severity
S4 - Minor
Status
active
Project

Although KeySig has its key() and setKey(Key) methods declared as Q_INVOKABLE they don't work from within the plugin framework. Reason is they work with the Key enumeration, which isn't exposed.

My proposed fix is to:
1. Expose the Key enum the same way as done for #96631: Expose text styles to plugins (thus base this new PR onto that one)
2. Expose a Q_PROPERTY named 'key' from KeySig with correct read and write functions.
3. Remove Q_INVOKABLE from key() and setKey() as those are (from the plugin framework pov) replaced by the property from item 2


Comments

https://github.com/musescore/MuseScore/pull/2429

As you can see over at the PR, I've had to manually expand the MS_QML_ENUM macro to make this link correctly, which I don't understand. Nor is it the desired patch now.

If anyone could provide pointer to how to get the preprocessor output (Qt Creator/Win7) I could at least confirm that there's an expansions issue..

Any progress on this?
--From the comments on github it seems this approach didn't work.

Has anyone found any sort of work around?