Plugin additional properties?

• Aug 14, 2012 - 12:23

Perhaps it would make some sense to add the following two known properties to the plugin object in the QML plugin framework:

1) requiresScore bool (default: true)

This would simplify the plugin setup; instead of duplicating in most plugins the test if (typeof curScore === 'undefined') with a (usually silent) Qt:quit(), the framework would check if a score is open and display a warning dlg box to the user, like: "This plugin requires a score to work on" before shutting it down.

The property could be set to false in the plugin declaration to let it run without any score, if the plugin allows it (most don't).

2) minFrameworkVersion int (default: framework version of running executable)

Initially there will be only one version of the framework (say, 2.0 or 020000), but it will for sure evolve over time. A way for the plugin to state that it requires at least a given version in order to run may simplify plugin compatibility checks. If version 020100 of the framework adds a feature and a plugin uses it, it would set minFrameworkVersion to 020100.

Again, a warning dlg box could be displayed if the plugin requires a framework version higher than the one running.

If 'we' commit (with a blood pact!) to NEVER drop or change existing features, a maxFramerworkVersion property is not required, strictly speaking, but it might be a wise addition anyway.

Comments?

M.

Do you still have an unanswered question? Please log in first to post your question.