<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, davidedmundson, fvogt.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17335">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When using <tt style="background: #ebebeb; font-size: 13px;">qDebug</tt> et all we will use <tt style="background: #ebebeb; font-size: 13px;">Connection::self()->sendMessage</tt> to forward that to the browser. <tt style="background: #ebebeb; font-size: 13px;">Connection</tt> uses a <tt style="background: #ebebeb; font-size: 13px;">QSocketNotifier</tt> to listen to browser commands. This requires a working event dispatcher.</p>

<p>When someone uses <tt style="background: #ebebeb; font-size: 13px;">qDebug</tt> before <tt style="background: #ebebeb; font-size: 13px;">QApplication</tt> initialized, e.g. <tt style="background: #ebebeb; font-size: 13px;">qt5ct</tt> does this, our <tt style="background: #ebebeb; font-size: 13px;">QSocketNotifier</tt> is defunct and we never receive any commands from the browser, breaking the extension.</p>

<p>While <tt style="background: #ebebeb; font-size: 13px;">stdout</tt> is reserved for communcation with the browser, where any random debug output will have the browser shut us down, <tt style="background: #ebebeb; font-size: 13px;">qDebug</tt> prints on <tt style="background: #ebebeb; font-size: 13px;">stderr</tt> which can be used for printing debug output, so no file descriptors are closed.</p>

<p>BUG: 400906</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Installed qt5ct, <tt style="background: #ebebeb; font-size: 13px;">export QT_QPA_PLATFORMTHEME=qt5ct</tt>, both Chromium and Firefox now show working media controls</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R856 Plasma Browser Integration</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17335">https://phabricator.kde.org/D17335</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>host/main.cpp</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, davidedmundson, fvogt<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>