Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property get is not a function (Qt 5.15) #27

Open
jamesjer opened this issue Feb 28, 2021 · 1 comment
Open

Property get is not a function (Qt 5.15) #27

jamesjer opened this issue Feb 28, 2021 · 1 comment

Comments

@jamesjer
Copy link

Using the Fedora 33 build of MuseScore plus TempoChanges 3.4.0, I see these messages on the console:

file:///home/jamesjer/Documents/MuseScore3/Plugins/MuseScore_TempoChanges-3.4.0/TempoChanges.qml:450: TypeError: Property 'get' of object 1 is not a function

I see two of those messages every time I use the plugin. Fedora 33 currently uses Qt 5.15.2. I wondered if the messages might be related to the deprecation of the "onFoo:" properties, so I changed line 449 to:

function onCurrentIndexChanged() { // update the value fields to match the new beatBase

With that change, the error messages are gone. The plugin appeared to operate normally both before and after making the change. I believe the onFoo properties were not deprecated until Qt 5.15, so I don't know at what point you will want to make this change, but just wanted to point out that you will probably want to do so in the future.

@jeetee
Copy link
Owner

jeetee commented Mar 1, 2021

5.15.2 still includes the possibility for using QtQuick.Controls 1.1 (1.4) which still have the onCurrentIndexChanged function.

Your change made it so the event handler is no longer called, but is now just an uncalled function (so no, the plugin likely doesn't work in the same way any longer). You should be able to validate this by inserting a console.log("I was here"); statement inside that function and run it from the Plugin Creator. I'm betting you won't see the log output happening.

What it seems to complain about is the line below, that you can't use get on beatBase.model any longer. Which I also don't (yet) understand, as https://doc.qt.io/qt-5/qml-qtqml-models-listmodel.html#get-method seems to indicate that this is still perfectly ok.

Anyhow; as MuseScore 3 is still on 5.9/5.12 and 5.15 isn't happening until MS4.0 (if it doesn't go straight to 6) and there is no decision yet on how the plugin framework will evolve I'll keep this in mind when the alpha/beta is released to review and update as necessary. Thanks for the heads-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants