Skip to content
  • Kai Uwe Broulik's avatar
    Install message handler after QApplication · cf6d43ac
    Kai Uwe Broulik authored
    When using qDebug et all we will use Connection::self()->sendMessage() to forward that to the browser.
    Connection uses a QSocketNotifier to listen to browser commands. This requires a working event dispatcher.
    
    When someone uses qDebug before QApplication initialized, e.g. qt5ct does this, our QSocketNotifier
    is defunct and we never receive any commands from the browser, breaking the extension.
    
    While stdout is reserved for communcation with the browser, where any random debug output will have
    the browser shut us down, qDebug prints on stderr which can be used for printing debug output,
    so no file descriptors are closed to prevent miscommunication.
    
    CHANGELOG: Now also works when using qt5ct
    
    BUG: 400906
    
    Differential Revision: https://phabricator.kde.org/D17335
    cf6d43ac