Feature request #100571 : import/export preferences and shortcuts

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

Feature request #100571 : import/export preferences and shortcuts

syrma
Hi,

I have been working on this request : https://musescore.org/en/node/100571 . The idea I've gone with was to make separate features for shortcuts and preferences, so as to allow the user to export/share something specific according to their need. This has been made easier by the fact that preferences and shortcuts are stored in different files by MuseScore. I have also separated them in two specific patches.

The feature for importing and exporting preferences has been added in pull request #2444 (link here : https://github.com/musescore/MuseScore/pull/2444 ). It needs review, but I have not met any strange behavior by testing it. (there might be a need to consider some error case though)

However, when it comes to the feature for shortcuts, I still have a slight problem. Exporting seems to run fine. Importing on the other hand, while the import itself seem to work, makes the application unresponsive to the keyboard until it is restarted.
The current code can be found here : https://github.com/syrma/MuseScore/commit/99960e3ae9be623dea9e65b1c7a1c60e00b8853f

 Could you please point to me what I am doing wrong?

Also, should I include some conditional code to prevent an error (like the user giving an invalid file, or modifying the file in a way that makes it impossible to read by the software), or is this already managed somewhere else?

I would be grateful for any kind of input!