[vlc-devel] [PATCH 5/9] qt: postpone the creation of the systray

Pierre Lamot pierre at videolabs.io
Fri Aug 28 16:25:52 CEST 2020


  This speedup the application startup as the systray creation is done
  synchronously.
---
 modules/gui/qt/maininterface/main_interface.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/maininterface/main_interface.cpp b/modules/gui/qt/maininterface/main_interface.cpp
index abfdf350d1..1d48ef5ddf 100644
--- a/modules/gui/qt/maininterface/main_interface.cpp
+++ b/modules/gui/qt/maininterface/main_interface.cpp
@@ -164,7 +164,8 @@ MainInterface::MainInterface(intf_thread_t *_p_intf , QWidget* parent, Qt::Windo
     /*********************************
      * Create the Systray Management *
      *********************************/
-    initSystray();
+    //postpone systray initialisation to speedup starting time
+    QMetaObject::invokeMethod(this, &MainInterface::initSystray, Qt::QueuedConnection);
 
     /*************************************************************
      * Connect the input manager to the GUI elements it manages  *
-- 
2.25.1



More information about the vlc-devel mailing list