Jojo-Schmitz / MuseScore

MuseScore is a open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
http://musescore.org
Other
36 stars 3 forks source link

Musescore 3.7 does not remember favorite paths in open/save dialog. #436

Open zorba77 opened 4 months ago

zorba77 commented 4 months ago

Step to reproduce:

The same for file save dialog (except that the demos path is absent)

OS: Ubuntu 22.04.4 LTS, Arch.: x86_64, MuseScore version (64-bit): 3.7.0.8678350200, revision: acbfac0

Jojo-Schmitz commented 4 months ago

a) does 3.6.2 behave differently, i.e. is it a regression? b) does any 4.x behave differently, i.e. is it a new feature which I missed to port over?

zorba77 commented 4 months ago

a) 3.6.2 works fine, it's a regression. When I open MS 3.7 it delete also old 3.6.2 favorite paths b) 4.2.1 works fine, and it's independent from 3.X settings (favorite paths are not deleted by MS 3.7). 4.X seems to use another file dialog, it does not seem the kde dialog, but I don't know

Jojo-Schmitz commented 4 months ago

OK, so a regression :-(

zorba77 commented 2 months ago

Any news for this regression in the open/save dialog?

Jojo-Schmitz commented 2 months ago

As under Windows there is no such favorites panel (using the natiive file dialogs), I'm having a hard time reproducing the issue, the file open dialog looks and works exactly the same in 3.6.2 and 3.7, under Windows

Jojo-Schmitz commented 2 months ago

And yes, 4.x after 4.2.1 doesn't use the KDE file dialog (under Linux) anymore as far as I know

zorba77 commented 2 months ago

I suppose that also on Windows' file dialog there's a panel on the left with standard folders, but I don't remember. How can I help you to find the problem?

Jojo-Schmitz commented 2 months ago

There is such a panel: image But no favourites

zorba77 commented 2 months ago

dialog this is the Kubuntu open dialog. It seems that favorite paths are stored in the file $HOME/.config/QtProject.conf shortcuts=file:///home/ab, file:///home/ab/Documenti/MuseScore3/Spartiti, ...

zorba77 commented 2 months ago
  1. Open MS 3.6.2, open file dialog, add a new folder on the left by dragging
  2. close MS 3.6.2, the file $HOME/.config/QtProject.conf is written with a new voice in the variable "shortcuts"
  3. Open MS 3.6.2, the new path is loaded and is present in the file dialog
  4. Close MS 3.6.2
  5. Open MS 3.7, in the file dialog there isn't the new path, so, probably, the file QtProject.conf is ignored (or something goes wrong)
  6. Close MS 3.7, the file QtProject.conf is written without the new path, only default paths are restored
zorba77 commented 2 months ago

is this useful? https://musescore.org/en/node/75306

zorba77 commented 2 months ago

image this is the 3.6.2 file dialog. It's different than 3.7, see above. The file dialog seems created in file "file.cpp", function "QStringList MuseScore::getOpenScoreNames", line 1109 and following. See line 1143: // setup side bar urls QList urls = sidebarUrls(); Is it this the function that populates the side bar? Use the native dialog may resolve the bug?

In file preferences.cpp

#if defined(Q_OS_MAC) || defined(Q_OS_WIN) // use system native file dialog, Qt file dialog is very slow on Windows and Mac
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(true)},
#else // don't use system native file dialog, this is causing issues on some Linuxes
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(false)},

So, only under Linux native dialogs are not used

Jojo-Schmitz commented 2 months ago

I don't see any significalt difference between those 2 screenshots, just the section to the right. And yes, only Linux by default uses, the non-native file dialogs (which means it uses the Qt dialogs), but you can configure that in the advanced preferences

You're quoting the code wrongly BTW:

#if defined(Q_OS_MAC) || defined(Q_OS_WIN) // use system native file dialog, Qt file dialog is very slow on Windows and Mac
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(true)},
#else // don't use system native file dialog, this is causing issues on some Linuxes
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(false)},  // false, not true
#endif
zorba77 commented 2 months ago

Yes, because I was working on the code , sorry. Using the native dialog also on Linux fix the problem. I suppose it's better, for non advanced users, make this option the default also on linux. Otherwise it's necessary to investigate why the side bar isn't populated on qtdialog

zorba77 commented 2 months ago

but you can configure that in the advanced preferences

this doesn't work, neither on MS 3.6.2 or 3.7 The native dialog appears only if I set it in the file preferences.cpp, like Windows and MacOs

Jojo-Schmitz commented 2 months ago

It certainly works for me, on Windows, to switch to the non-native dialog, 3.6.2 and 3.7: image

And it doesn't remember the favorite paths (those in the left hand part of the dialog), not in 3.6.2 nor in 3.7, so no regression there (but indeed I guess it should remeber them).

Mu4 doesn't use the non-native dialogs at all anymore IIRC

zorba77 commented 1 month ago

Yes, now also 3.6.2 doesn't remember favorite paths (strange, in previous tests it worked), almost on Linux. The use of Native dialogs resolve the issue, so I suppose the best solution is to make it the default choice also on Linux, like Windows and Macos, modifying the file preferences.cpp.

Jojo-Schmitz commented 1 month ago

But see https://musescore.org/en/node/366348

Jojo-Schmitz commented 1 month ago

is this useful? https://musescore.org/en/node/75306

Yes it might be careful indeed. Indicating that this probably is a Qt issue which I'd be unable to fix