Skip to content
  • Rémi Denis-Courmont's avatar
    qt: add dummy program to test QApplication · 63599c0a
    Rémi Denis-Courmont authored
    The QApplication constructor exits the entire process if it cannot find
    a working Qt back-end. This is unacceptable within VLC, as we expect to
    fallback to another interface plugin in such circumstances.
    
    Qt 4.x selected its back-end at build time. VLC would try to connect to
    the same back-end system (in practice: X11) to second-guess
    QApplication, and preempt the initialization failure.
    
    Qt 5.x selects its back-end at run time depending on installed back-end
    plugins and running windowing system(s). There are no reasonable and
    reliable ways to second-guess Qt anymore.
    
    This commit introduces a dummy executable program that simply tries to
    instantiate a QApplication. If it succeeds, it returns 0. Otherwise, it
    returns an error. This allows its parent process to safely check if Qt
    is available at run-time.
    63599c0a