Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI,cmake: Get default video path on Linux with GLib #10979

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tytan652
Copy link
Collaborator

@tytan652 tytan652 commented Jul 13, 2024

Description

Qt does not always rely on xdg-user-dirs behavior to get the video directory. So the GLib API that relies on this behavior is used.

Note that GLib is already used by Qt itself for its event loop on Linux, so adding GLib as a dependency of the UI is not an issue.

Closes #3746

Motivation and Context

Get the XDG video directory through a widespread UTF-8 implementation.

How Has This Been Tested?

  • Removed RecFilePath and FFFilePath from my profile config
  • Ran OBS and change a random profile setting and save it
  • Check the profile config and see that the value are the XDG video directory.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@tytan652 tytan652 added Enhancement Improvement to existing functionality Linux Affects Linux labels Jul 13, 2024
@tytan652 tytan652 force-pushed the xdg-user-dirs_through_glib branch 2 times, most recently from 4f5c8c1 to fa979db Compare July 13, 2024 09:56
@kkartaltepe
Copy link
Collaborator

If we were going to do this, not adding 224 lines of cmake is a strong benefit of #3746

@tytan652
Copy link
Collaborator Author

If we were going to do this, not adding 224 lines of cmake is a strong benefit of #3746

Half of it is because of the legacy path (duplication), also a finder does not usually need changes post merge (low maintenance burden).

Copy link
Member

@PatTheMav PatTheMav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say much about the correctness of using glib but changes look fine to me.

Qt does not always rely on xdg-user-dirs behavior to get the video
directory.
So the GLib API that relies on this behavior is used.

Note that GLib is already used by Qt itself for its event loop on Linux,
so adding GLib as a dependency of the UI is not an issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality Linux Affects Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants