Solving the problem of launching the settings dialog without xine support #14
Merged
MicheleC
merged 1 commits from feat/settings
into master
5 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'feat/settings'
Deleting a branch is permanent. It CANNOT be undone. Continue?
The settings dialog crashes if built without
xine
support. These changes do not affect the recording process.These changes solve the problem of opening the settings dialog box if the build is carried out without
xine
support.The main reason for adding this is that the recorderClicked slot only applies to
xine
. Filesrc/pref.cpp
:In addition, in this file this slot is already bound to the
HAVE_XINE
macro:It seems that in the
src/kmplayerconfig.cpp
file someone forgot to do the same for therecorderClicked
slot.I am interested to understand where the crash happens. Is it because
recorder->find(id)
returns a null pointer? In that case it may be more appropriate to check for that and return from the call instead of introducing a #ifdef block (we could in fact remove the original one too).Using #ifdef blocks to protect from crashes is not really good practice, because it only hides a problem away rather than fixing it properly. If someone uses a different settings for some #define, the problem could show up again.
Yes, sure.link
The problem occurs when the
~/.trinity/share/config/kmplayerrc
file has not yet been created.An option without macros might look like this:
That's a better solution IMO. You can improve even further by avoiding a double call to
find()
:You can now try to remove the
#ifdef HAVE_XINE
in src/pref.cpp:438 and see if all still works fine.Btw, I could not access the link above, but I think we are both clear on the solution now :-)
Ok, I'll add it now and check it. But I already think that everything will be okay.
Now I also cannot access this information, apparently there are some problems with the server. Here I re-uploaded it. Link
Excellent. If you update the patch, then we can approve and merge it in the new form.
3ccdc7986f
to0a09dae2f6
5 months agoAdded changes, checked it works!
Patch looks good and well prepared. One last touch: can you remove the #ifdef HAVE_XINE in src/pref.cpp:438 if it doesn't cause any side effect?
Okay, I'll test this with an additional call to connect.
0a09dae2f6
to6212c1b319
5 months agoI added the changes, everything works fine. No side effects occurred after adding these changes.
Now all looks good. We removed a bad hackish solution (the #ifdef) and replace it with a proper fix 🙂
6212c1b319
into master 5 months agoMerged and backport. Thanks @ormorph for the patch, the testing and the patience to update through the process.
Reviewers
6212c1b319
.