davidedmundson added inline comments. INLINE COMMENTS
> davidedmundson wrote in playercontainer.cpp:119 > There is a way to do it which will work for all players much more reliably: > > auto message = QDBusMessage::createMethodCall("org.freedesktop.DBus", "/", > "org.freedesktop.DBus", "GetConnectionUnixProcessID"); > message.setArguments({m_dbusAddress}); > > QDBusReply<uint> reply = QDBusConnection::sessionBus().call(message); > > //safe to be blocking as we're calling a method on DBus server not a client, > so no different from QDBusConnection::connect() > > if (!reply.isError) { > secondaryInstancePid = reply.value(); > } Ninja edit. If you do go with that approach don't use the code above. Use secondaryInstancePid = QDBusConnectionInterface::servicePid(m_dbusAddress).value(); REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D3667 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: subdiff, #plasma Cc: davidedmundson, broulik, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas