[Solved] FreeCAD is interfering with VLC (Video player)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by adrianinsaval »

wmayer has already pointed to where in the code this is happening so I don't think packaging matters much here, or even version since I doubt this has been changed in any recent times.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: FreeCAD is interfering with VLC (Video player)

Post by onekk »

Ok for the lines of code, but usually these are somewhat standard directories that in almost all distributuons are managed by "user profile" usually created by etc/skeleton.

So are a distribution task (or an user task) to use a package that create the skeleton files and create them on a "per user" base.

Said from a guy that uses OpenBox and no DE.

Regards.

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by adrianinsaval »

yeah but these directories aren't really mandatory AFAIK, FreeCAD certainly doesn't need them, and like I said I doubt the packaging of FreeCAD itself is relevant.
Rich83
Posts: 11
Joined: Mon Aug 08, 2022 5:34 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by Rich83 »

I have installed version the stable 0.20 AppImage and the latest available 0.21 dev build (FreeCAD_weekly-builds-29997-2022-08-10-conda-Linux-x86_64-py310.AppImage) and they both exhibit exactly the same behaviour as 0.19.4
Rich83
Posts: 11
Joined: Mon Aug 08, 2022 5:34 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by Rich83 »

adrianinsaval wrote: Wed Aug 10, 2022 12:04 pm yeah but these directories aren't really mandatory AFAIK
There's nothing mandatory about any of these directories and they should definitely not be assumed to exist
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD is interfering with VLC (Video player)

Post by wmayer »

Rich83 wrote: Tue Aug 09, 2022 6:32 pm Thanks very much for the reply, but why would you assume these directories DO exist? And why does FreeCAD explicitly add them to the list of favourite directories? It makes no sense - especially adding a directory called something like 'Music'.
It's because Qt adds them, too. And in FreeCAD code we only modify this list -- by adding an additional entry -- if the Qt implementation is used but not if the native dialog is used because there we cannot control the behaviour.

Here is a Python snippet that you can test in an externally running Python interpreter.

Code: Select all

from PySide2 import QtWidgets
app = QtWidgets.QApplication()
fd = QtWidgets.QFileDialog()
fd.show()
fd.exec() # this shows the native file dialog
fd.setOption(fd.DontUseNativeDialog)
fd.show()
fd.exec() # this shows the Qt implementation of the dialog
And if I rename e.g. the Videos directory then the Qt dialog also still adds the non-existing directory.
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD is interfering with VLC (Video player)

Post by wmayer »

Rich83
Posts: 11
Joined: Mon Aug 08, 2022 5:34 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by Rich83 »

Re git commit,

I have tried to build OpenCAD from source so I can investigate the issues further but I'm really struggling to get all the dependencies to behave and at the required versions.

I can see your commit addresses the bogus directory names - that's a good start.

But what about the more serious issue of the file dialogue interfering with external applications (in my case, VLC); does it do anything to address that? I can't tell from the code and am not familiar with QT - I was planning on diving into QT once I got the code to build, which hasn't happened.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: FreeCAD is interfering with VLC (Video player)

Post by onekk »

But as the file dialog is from Qt probably is not FC to be blamed.

VLC has different front ends for the GUI, and if you use Qt frontend there are chances that some other applications will alter the File dialog behaviour.

As example if you alter the order of visualization these changes are stored in a Qt file placed somewhere, usually in the .config dir.

Every application that use Qt file dialog will have the "modified" order, do it is the Qt framework that has no knowledge of which application is calling the dialog and don't permit "per application" settings.


I don't know in deep this aspect of Qt and if some preferences could be set when calling the File Dialog other than the "selection mask".

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Rich83
Posts: 11
Joined: Mon Aug 08, 2022 5:34 pm

Re: FreeCAD is interfering with VLC (Video player)

Post by Rich83 »

onekk wrote: Sat Aug 13, 2022 11:10 am But as the file dialog is from Qt probably is not FC to be blamed...
I'm inclined to agree that it's an issue within the Qt library rather than FC - it does seem to be frankly stupid behaviour of Qt to do this though; why on earth would you want entirely separate applications to share a single file dialogue configuration?

I'm not expecting an answer by the way - I'm just having a small rant at Qt.

Thanks for the input on this.

Rich
Post Reply