Discussion:
D17335: Install message handler after QApplication
Kai Uwe Broulik
2018-12-03 16:06:29 UTC
Permalink
broulik created this revision.
broulik added reviewers: Plasma, davidedmundson, fvogt.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
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.

BUG: 400906

TEST PLAN
Installed qt5ct, `export QT_QPA_PLATFORMTHEME=qt5ct`, both Chromium and Firefox now show working media controls

REPOSITORY
R856 Plasma Browser Integration

REVISION DETAIL
https://phabricator.kde.org/D17335

AFFECTED FILES
host/main.cpp

To: broulik, #plasma, davidedmundson, fvogt
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
David Edmundson
2018-12-03 16:10:22 UTC
Permalink
davidedmundson accepted this revision.
davidedmundson added a comment.
This revision is now accepted and ready to land.


Well found!

REPOSITORY
R856 Plasma Browser Integration

REVISION DETAIL
https://phabricator.kde.org/D17335

To: broulik, #plasma, davidedmundson, fvogt
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Kai Uwe Broulik
2018-12-03 16:40:46 UTC
Permalink
This revision was automatically updated to reflect the committed changes.
Closed by commit R856:cf6d43ac6054: Install message handler after QApplication (authored by broulik).

REPOSITORY
R856 Plasma Browser Integration

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D17335?vs=46797&id=46801

REVISION DETAIL
https://phabricator.kde.org/D17335

AFFECTED FILES
host/main.cpp

To: broulik, #plasma, davidedmundson, fvogt
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Loading...