Commit 9dbcc119 authored by Adriaan de Groot's avatar Adriaan de Groot 💬
Browse files

Report a useful mixer id, rather than ""

This was D8614, which got a "ship it" 30 months ago (but not an
approval in Phab). The typo it incidentally fixed was fixed
by Yuri in 2018.

- Move warning about unregistered card down, so that the warning
  contains the newly-generated ID; otherwise the warning message is
  nonsensical, because it *hasn't* created a new ID yet.
parent 4b0c2e60
......@@ -175,18 +175,19 @@ const QString Mixer::dbusPath()
// So once the first MixDevice is created, this must return the correct value
if (_id.isEmpty())
{
if (! _mixerBackend->_cardRegistered)
bool wasRegistered = _mixerBackend->_cardRegistered;
// Bug 308014: Actually this a shortcut (you could also call it a hack). It would likely better if registerCard()
// would create the Id, but it requires cooperation from ALL backends. Also Mixer->getId() would need to
// proxy that to the backend.
// So for now we lazily create the MixerId here, while creating the first MixDevice for that card.
recreateId();
if (! wasRegistered)
{
// Bug 308014: By checking _cardRegistered, we can be sure that everything is fine, including the fact that
// the cardId (aka "card instance") is set. If _cardRegistered would be false, we will create potentially
// wrong/duplicated DBUS Paths here.
qCWarning(KMIX_LOG) << "Mixer id was empty when creating DBUS path. Emergency code created the id=" <<_id;
}
// Bug 308014: Actually this a shortcut (you could also call it a hack). It would likely better if registerCard()
// would create the Id, but it requires cooperation from ALL backends. Also Mixer->getId() would need to
// proxy that to the backend.
// So for now we lazily create the MixerId here, while creating the first MixDevice for that card.
recreateId();
}
// mixerName may contain arbitrary characters, so replace all that are not allowed to be be part of a DBUS path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment