[vlc-commits] [Git][videolan/vlc][master] qt: get rid of `MainCtx::useTopLevelWindowForToolTip()`
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Mon Mar 16 12:33:46 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
f35b6d5a by Fatih Uzunoglu at 2026-03-16T12:00:22+01:00
qt: get rid of `MainCtx::useTopLevelWindowForToolTip()`
We only support the latest patch version of Qt.
In some specific cases, we provide special care for
certain versions (such as Qt 6.2.4) when feasible and
when it does not hinder maintenance. The versions
checked in this function do not require special care,
so we can get rid of it.
- - - - -
2 changed files:
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/widgets/qml/ToolTipExt.qml
Changes:
=====================================
modules/gui/qt/maininterface/mainctx.hpp
=====================================
@@ -260,22 +260,6 @@ public:
void setVideoSurfaceProvider(VideoSurfaceProvider* videoSurfaceProvider);
int mouseHideTimeout() const { return m_mouseHideTimeout; }
-
- Q_INVOKABLE static inline bool useTopLevelWindowForToolTip() {
- assert(qGuiApp);
- if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 8, 0))
- return false; // Feature is not available
-#ifndef QT_STATIC // We have patched contrib Qt to fix both of the spotted Qt bugs
- if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 8, 2))
- return false; // This feature was not tested properly upstream, and often causes crashes (QTBUG-131898, #28919).
-#endif
- if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 9, 2))
- {
- static const bool isWayland = qGuiApp->platformName().startsWith(QLatin1String("wayland"));
- return !isWayland; // QTBUG-135158
- }
- return true;
- }
Q_INVOKABLE bool backdropBlurRequested() const { return var_InheritBool(p_intf, "qt-backdrop-blur"); }
=====================================
modules/gui/qt/widgets/qml/ToolTipExt.qml
=====================================
@@ -41,7 +41,7 @@ T.ToolTip {
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
Component.onCompleted: {
- if (MainCtx.useTopLevelWindowForToolTip()) {
+ if (control.popupType !== undefined) {
console.assert(typeof control.popupType === "number")
control.popupType = 1 // Popup.Window
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f35b6d5a5e63f71079f4cf1a510cba70663c6ddf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f35b6d5a5e63f71079f4cf1a510cba70663c6ddf
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list