This limits the length of the name label in the advanced audio
dialog to 80 characters, so the dialog doesn't get too wide. If the
name is truncated, "..." are added at the end of the label, and the
label's tooltip is set to the full name of the source.
Our QT_UTF8(str) macro uses QString::fromUtf8(str) with no size
argument. In Qt5, QString::fromUtf8 uses a default value of -1 for the
size arg. If size is -1, it is taken to be strlen(str). In Qt6,
QString::fromUtf8 doesn't use a default value for the size arg, but has
the same behavior if you manually specify -1 for the size. Let's
manually specify -1 to maintain the same behavior between Qt5 and Qt6.
https://doc.qt.io/qt-5/qstring.html#fromUtf8https://doc.qt.io/qt-6/qstring.html#fromUtf8
This changes cleans up some deprecated functions that were removed in
Qt6. Some are placed behind version ifdefs and others are replaced for
their non-deprecated Qt5 version.
Right after showing the OBSQTDisplay widget, it may happen that a
wl_surface is not yet created and attached to the window. When this
happens, creating the OBS display results in a crash.
Make QTToGSWindow return a boolean, indicating success or failure, and
don't create the OBS display on failure.
On Wayland, we want to query the window's underlying
platform for the Wayland surface, instead of foolishly
retrieving the X11 display.
Pass QWindow instead of WId directly, and set the surface
as the platform data on Wayland systems.
Replaces SetComboItemDisabled in context-bar-controls.cpp with a global
function in qt-wrappers called SetComboItemEnabled, which allows both
enabling and disabling items in a combo box.
These functions allow item delegates (editors) or item widgets with
event filters to detect whether a user has finished editing a line edit
control. This separates the code so it can be used elsewhere than just
in the source tree widget.
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.
The message boxes that tell you that the browser is initializing or that
you're authenticating with twitch are annoying on startup. It makes
sense to do it in the settings/autoconfig dialogs where you sort of need
to know what's going on while waiting for it to connect, but on startup
it's not really necessary and can be kind of annoying.
Adds functions for executing functions within separate threads without
blocking the user interface, or by blocking the user interface with a
dialog box.
Allows creating a QThread via an std::function. A backward-compatible
alternative to QThread::create for Qt versions older than 5.10 (when it
became available in Qt).
A helper function used with QMetaObject::invokeMethod which allows the
ability to use Qt::DirectConnection if on the Qt UI thread, or
Qt::BlockingQueuedConnection if on another thread to ensure that
regardless of what thread the invokeMethod is called from, that it will
wait until the invoked method has been called.