<html><head></head><body>Hi,<br><br>There are no builds that *require* Qt, as dummy is always available. To force Qt, you need to pass "-Iqt,none" regardless of this patch. This patch only breaks error handling effectively. And the check is already compiled out on Windows, while we already have the --disable-vlc switch for embedded builds. So neither of these scenarii are valid use cases AFAICT.<br><br>Besides it's not even that slow without the sanitizers.<br><br><div class="gmail_quote">Le 27 septembre 2019 11:18:46 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Qt check is useless for builds that require the Qt interface to be used<br>like embedded systems targets or that cannot fail to start like for<br>Windows static builds. As it takes time to start the vlc-qt-check, this<br>patch provides a way to disable this.<br><br>This shouldn't be used for any other build or test.<hr> configure.ac               |  5 +++++<br> modules/gui/qt/Makefile.am |  4 ++++<br> modules/gui/qt/qt.cpp      | 18 +++++++++++-------<br> 3 files changed, 20 insertions(+), 7 deletions(-)<br><br>diff --git a/configure.ac b/configure.ac<br>index 210b4ca5371..b864ab2e483 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -3932,6 +3932,11 @@ AC_ARG_ENABLE([qt-qml-debug],<br>   AS_HELP_STRING([--enable-qt-qml-debug], [enable qml debuger]))<br> AM_CONDITIONAL(QT_QML_DEBUG, [test "${enable_qt_qml_debug}" = "yes"])<br><br>+AC_ARG_ENABLE([qt-check],<br>+  AS_HELP_STRING([--disable-qt-check],<br>+    [Disable Qt check before starting the interface. This will prevent Qt module from determining if it can start correctly, and crash if it cannot.]))<br>+AM_CONDITIONAL([HAVE_QT_CHECK], [test "${enable_qt_check}" != "no"])<br>+<br> AS_IF([test "${enable_qt}" != "no"], [<br>   ALIASES="${ALIASES} qvlc"<br> ])<br>diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am<br>index af4a5d05cc8..06c372d6cbb 100644<br>--- a/modules/gui/qt/Makefile.am<br>+++ b/modules/gui/qt/Makefile.am<br>@@ -681,16 +681,20 @@ gui/qt/resources.cpp: gui/qt/vlc.qrc $(libqt_plugin_la_RES) $(libqt_plugin_la_QM<br><br> endif<br><br>+if HAVE_QT_CHECK<br> vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp<br> vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC<br> vlc_qt_check_LDADD = $(QT_LIBS)<br>+endif<br><br> if ENABLE_QT<br> gui_LTLIBRARIES += libqt_plugin.la<br> BUILT_SOURCES += $(nodist_libqt_plugin_la_SOURCES)<br> if !HAVE_WIN32<br> if !HAVE_OS2<br>+if HAVE_QT_CHECK<br> pkglibexec_PROGRAMS += vlc-qt-check<br> endif<br> endif<br> endif<br>+endif<br>diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp<br>index 798f1c41e82..a5796fbd535 100644<br>--- a/modules/gui/qt/qt.cpp<br>+++ b/modules/gui/qt/qt.cpp<br>@@ -29,14 +29,16 @@<br><br> #include <stdlib.h><br> #include <unistd.h><br>-#ifndef _POSIX_SPAWN<br>-# define _POSIX_SPAWN (-1)<br>-#endif<br>-#if (_POSIX_SPAWN >= 0)<br>-# include <spawn.h><br>-# include <sys/wait.h><br><br>+#ifdef HAVE_QT_CHECK<br>+# ifndef _POSIX_SPAWN<br>+#  define _POSIX_SPAWN (-1)<br>+# endif<br>+# if (_POSIX_SPAWN >= 0)<br>+#  include <spawn.h><br>+#  include <sys/wait.h><br> extern "C" char **environ;<br>+# endif<br> #endif<br><br> #include <QApplication><br>@@ -411,7 +413,8 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )<br>         return VLC_EGENERIC;<br> #endif<br><br>-#if (_POSIX_SPAWN >= 0)<br>+#ifdef HAVE_QT_CHECK<br>+# if (_POSIX_SPAWN >= 0)<br>     /* Check if QApplication works */<br>     char *path = config_GetSysPath(VLC_PKG_LIBEXEC_DIR, "vlc-qt-check");<br>     if (unlikely(path == NULL))<br>@@ -433,6 +436,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )<br>         msg_Dbg(p_this, "Qt check failed (%d). Skipping.", status);<br>         return VLC_EGENERIC;<br>     }<br>+# endif<br> #endif<br><br>     /* Get the playlist before the lock to avoid a lock-order-inversion */<br>--<br>2.23.0<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>