<!doctype html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body>OEM can, and most definitely will, patch the code however it wants. That's not our problem. There's transfinite number of bits of code that you could remove because it slows things down or consumes memory, for an aspect that OEM does not care about.<br><br><div class="gmail_quote">Le 27 septembre 2019 17:48:33 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><br></div><div>On Fri, Sep 27, 2019, at 16:28, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>Hi,<br></div><div><br></div><div>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></div></blockquote><div><br></div><div>OEM could decide to build VLC with Qt support and wayland. In that case, they control the whole VLC/Wayland/Qt chain and they don't need that extra check. Wayland is more and more used on embedded devices. For me, this patch is totally legit, as long as it is enabled by default on default Linux distribs.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div>Besides it's not even that slow without the sanitizers.<br></div><div><br></div><div class="qt-gmail_quote"><div>Le 27 septembre 2019 11:18:46 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>Qt check is useless for builds that require the Qt interface to be used<br></div><div>like embedded systems targets or that cannot fail to start like for<br></div><div>Windows static builds. As it takes time to start the vlc-qt-check, this<br></div><div>patch provides a way to disable this.<br></div><div><br></div><div>This shouldn't be used for any other build or test.<hr> configure.ac | 5 +++++<br></div><div> modules/gui/qt/Makefile.am | 4 ++++<br></div><div> modules/gui/qt/qt.cpp | 18 +++++++++++-------<br></div><div> 3 files changed, 20 insertions(+), 7 deletions(-)<br></div><div><br></div><div>diff --git a/configure.ac b/configure.ac<br></div><div>index 210b4ca5371..b864ab2e483 100644<br></div><div>--- a/configure.ac<br></div><div>+++ b/configure.ac<br></div><div>@@ -3932,6 +3932,11 @@ AC_ARG_ENABLE([qt-qml-debug],<br></div><div> AS_HELP_STRING([--enable-qt-qml-debug], [enable qml debuger]))<br></div><div> AM_CONDITIONAL(QT_QML_DEBUG, [test "${enable_qt_qml_debug}" = "yes"])<br></div><div><br></div><div>+AC_ARG_ENABLE([qt-check],<br></div><div>+ AS_HELP_STRING([--disable-qt-check],<br></div><div>+ [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></div><div>+AM_CONDITIONAL([HAVE_QT_CHECK], [test "${enable_qt_check}" != "no"])<br></div><div>+<br></div><div> AS_IF([test "${enable_qt}" != "no"], [<br></div><div> ALIASES="${ALIASES} qvlc"<br></div><div> ])<br></div><div>diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am<br></div><div>index af4a5d05cc8..06c372d6cbb 100644<br></div><div>--- a/modules/gui/qt/Makefile.am<br></div><div>+++ b/modules/gui/qt/Makefile.am<br></div><div>@@ -681,16 +681,20 @@ gui/qt/resources.cpp: gui/qt/vlc.qrc $(libqt_plugin_la_RES) $(libqt_plugin_la_QM<br></div><div><br></div><div> endif<br></div><div><br></div><div>+if HAVE_QT_CHECK<br></div><div> vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp<br></div><div> vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC<br></div><div> vlc_qt_check_LDADD = $(QT_LIBS)<br></div><div>+endif<br></div><div><br></div><div> if ENABLE_QT<br></div><div> gui_LTLIBRARIES += libqt_plugin.la<br></div><div> BUILT_SOURCES += $(nodist_libqt_plugin_la_SOURCES)<br></div><div> if !HAVE_WIN32<br></div><div> if !HAVE_OS2<br></div><div>+if HAVE_QT_CHECK<br></div><div> pkglibexec_PROGRAMS += vlc-qt-check<br></div><div> endif<br></div><div> endif<br></div><div> endif<br></div><div>+endif<br></div><div>diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp<br></div><div>index 798f1c41e82..a5796fbd535 100644<br></div><div>--- a/modules/gui/qt/qt.cpp<br></div><div>+++ b/modules/gui/qt/qt.cpp<br></div><div>@@ -29,14 +29,16 @@<br></div><div><br></div><div> #include <stdlib.h><br></div><div> #include <unistd.h><br></div><div>-#ifndef _POSIX_SPAWN<br></div><div>-# define _POSIX_SPAWN (-1)<br></div><div>-#endif<br></div><div>-#if (_POSIX_SPAWN >= 0)<br></div><div>-# include <spawn.h><br></div><div>-# include <sys/wait.h><br></div><div><br></div><div>+#ifdef HAVE_QT_CHECK<br></div><div>+# ifndef _POSIX_SPAWN<br></div><div>+# define _POSIX_SPAWN (-1)<br></div><div>+# endif<br></div><div>+# if (_POSIX_SPAWN >= 0)<br></div><div>+# include <spawn.h><br></div><div>+# include <sys/wait.h><br></div><div> extern "C" char **environ;<br></div><div>+# endif<br></div><div> #endif<br></div><div><br></div><div> #include <QApplication><br></div><div>@@ -411,7 +413,8 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )<br></div><div> return VLC_EGENERIC;<br></div><div> #endif<br></div><div><br></div><div>-#if (_POSIX_SPAWN >= 0)<br></div><div>+#ifdef HAVE_QT_CHECK<br></div><div>+# if (_POSIX_SPAWN >= 0)<br></div><div> /* Check if QApplication works */<br></div><div> char *path = config_GetSysPath(VLC_PKG_LIBEXEC_DIR, "vlc-qt-check");<br></div><div> if (unlikely(path == NULL))<br></div><div>@@ -433,6 +436,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )<br></div><div> msg_Dbg(p_this, "Qt check failed (%d). Skipping.", status);<br></div><div> return VLC_EGENERIC;<br></div><div> }<br></div><div>+# endif<br></div><div> #endif<br></div><div><br></div><div> /* Get the playlist before the lock to avoid a lock-order-inversion */<br></div><div>--<br></div><div>2.23.0<hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>