dh4 / mupen64plus-qt

A customizable launcher for Mupen64Plus
BSD 3-Clause "New" or "Revised" License
95 stars 10 forks source link

Settings dialog: roms list emptied when new setting applied #57

Closed mazes-80 closed 2 years ago

mazes-80 commented 3 years ago

I was hit by this bug since a while, sorry feedback comes late. Any time I use the setting dialog the romsList is emptied.

Using QDebug.h I found that `romList->findItems("*", Qt::MatchWildcard) returned an empty list

  1. one can add as many times he whiches an already included directory.
  2. editSettings empties the roms value

I tried to replace Wildcard with RegExp matching and all is good: sed -i -e '/MatchWildcard/{s/Wildcard/RegExp/; s/"\*"/".*"/}' src/dialogs/settingsdialog.cpp

Without this really tiny change all the settings dialog was unusable for me. I noticed the wildcard were used for other things, but didn't notice the bug they involved. Anyway the RegExp way should return the intended value.

Hope this remark to be helpful. I guess cen64-qt may be hit by this issue to.

3XC4L1B3R commented 2 years ago

experienced this issue when I apt installed. built deb from source, still experienced this issue. applied @mazes-80 's fix and rebuilt, still experienced this issue.

one thing that works for me is directly editing mupen64plus-qt.conf, adding my rom dir, opening the settings ui, and clicking cancel. then the list is loaded and I can see all my roms in the ui. opening settings and clicking the OK button still resets it to blank, but at least it works for a while...

mazes-80 commented 2 years ago

have you tried compiling from git sources, patch already included, seems to work for an other debian user #61.

I use another distro, but it also works for 1.14 there

dh4 commented 2 years ago

Version 1.15 (just released) should fix this issue.

mazes-80 commented 2 years ago

Do you have an idea on why the Qt::MatchWildcard ceased to work ? I can't remember exactly when this problem first occured, but I remember it used to work some years ago. I can only suspect it began to be buggy after transition to qt5 (but really no certitude). The fix is ok, I'm following things from far any time I open a bug here, and always use latest git version.

dh4 commented 2 years ago

I don't know why, no. I know there's a specific version of Qt where it stopped working (most likely 5.15), but I haven't looked into what changed inside the framework that caused it.

There are other places I used it. Removed them with this commit: https://github.com/dh4/mupen64plus-qt/commit/7baec6ed489f77327fb6e49daae14496924903f1

Meant to do that before releasing 1.15 but I forgot. Hopefully those keep working as expected. I have no idea why those uses of it work fine still but the other one is broken. Using findItems() to glob match like that probably isn't the "proper" way to do it anyways.

Still haven't built this with Qt 6 yet, but I'll need to do that at some point and make sure everything builds and works correctly.