[vlc-commits] [Git][videolan/vlc][master] qt: alert interface window on new error

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jul 21 12:22:36 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
69e070bc by Fatih Uzunoglu at 2025-07-21T11:33:51+00:00
qt: alert interface window on new error

I do not connect to the window directly because I
want the connection to be gone when `InterfaceWindowHandler`
is gone. This is particularly important if
`InterfaceWindowHandler` is created multiple times
with the same target window, as we are not using
unique connection (can not, due to lambda slot).

- - - - -


1 changed file:

- modules/gui/qt/maininterface/interface_window_handler.cpp


Changes:

=====================================
modules/gui/qt/maininterface/interface_window_handler.cpp
=====================================
@@ -23,6 +23,7 @@
 #include "util/keyhelper.hpp"
 #include "dialogs/systray/systray.hpp"
 #include "widgets/native/qvlcframe.hpp"
+#include "dialogs/dialogs/dialogmodel.hpp"
 #include <QScreen>
 #include <QQmlProperty>
 #include <cmath>
@@ -153,6 +154,13 @@ InterfaceWindowHandler::InterfaceWindowHandler(qt_intf_t *_p_intf, MainCtx* main
     connect(this, &InterfaceWindowHandler::kc_pressed,
             m_mainCtx, &MainCtx::kc_pressed);
 
+    const auto dem = DialogErrorModel::getInstance<false>(); // expected to be already created
+    assert(dem);
+    connect(dem, &DialogErrorModel::rowsInserted, this, [w = QPointer(m_window)]() {
+        if (Q_LIKELY(w))
+            w->alert(0);
+    });
+
     m_window->installEventFilter(this);
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/69e070bc02a5b340af1771d68ad1e94bf09e6676

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/69e070bc02a5b340af1771d68ad1e94bf09e6676
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