If QT_VERSION is not defined, it gets define with the AUTO value. And
its definition is moved to the helper file.
find_qt now:
- Check quietly for Qt5 and Qt6
- If QT_VERSION is set to AUTO. It checks firstly if Qt5 was found it
will use it. If not it do the same for Qt6
- If QT_VERSION is set to 5 or 6, it checks if the choice was found and
use it. And if not, it falls back to the other if found.
- If neither Qt5 or Qt6 are found, a fatal error is emitted.
- The macro saved the _QT_VERSION in the cache to replace QT_VERSION,
so the process is not repeated each time that find_qt is used.
- When Qt::Gui is in the Linux component list, Qt::GuiPrivate is added.
So using the versioned one is no longer required.
Removing the first call to `video_output_stop` prevents the `data_mutex`
field in `struct video_output` from being destroyed while still in use.
The `render_preview_source` function will call `video_output_lock_frame`
upon that mutex and encounter a NULL pointer exception.
Co-authored-by: Paul Hindt <paulh@aja.com>
Due to how CMake and generated project files are structured, just using
AUTOUIC to pick up Qt `.ui` files will lead to a situation where
changing such a file doesn't trigger a regeneration of the associated
header files and thus a re-build of the target.
Upstream fix still requires `.ui` files to be added as target sources.
CMake issue: https://gitlab.kitware.com/cmake/cmake/-/issues/17959
Qt5X11Extras (QX11Info) was added in
762983b5d853ba8444c4efee450ea872b294060e, but it doesn't seem to
actually be used. Qt6 doesn't yet ship X11Extras, so let's remove it.
This leads to a crash when the output is stopped, either by clicking the
stop button or when exiting OBS studio.
This crash is:
- intermittent in release builds
- reliable for me in debug builds
It is held by an `OBSData`, which, if not null, will automatically
call `obs_data_release()` on scope exit.
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
Ignore wheelEvent using subclass
slider,spinbox,combobox with eventhandlers:
wheelEvent - ignore if widget is not focused,
leaveEvent - clear focus when mouse leaves event.
Use these new subclass widgets in properties
to ignore wheelEvent when scrolling.