Hmm. This code: + if (changed) { + if (connectionStatus == ConnectionStatusConnected) { + connectionError = QString(); + connectionErrorDetails.clear(); + } else if (connectionError.isEmpty()) { + connectionError = ConnectionHelper::statusReasonToErrorName( + connectionStatusReason, oldConnectionStatus); + } depends on the ConnectionError always changing at the same time as the ConnectionStatus. If it changes just before the ConnectionStatus, then the error received will be ignored, and then the status will change and we don't know why. I just read the MC source and I think it'll actually do the right thing here, so I'm not sure it's worth doing anything more elaborate. Maybe worth adding a debug() message if connectionError becomes non-empty but the status isn't Disconnected? Otherwise looks good!
(In reply to comment #1) > Hmm. > > This code: > > + if (changed) { > + if (connectionStatus == ConnectionStatusConnected) { > + connectionError = QString(); > + connectionErrorDetails.clear(); > + } else if (connectionError.isEmpty()) { > + connectionError = ConnectionHelper::statusReasonToErrorName( > + connectionStatusReason, oldConnectionStatus); > + } > > depends on the ConnectionError always changing at the same time as the > ConnectionStatus. If it changes just before the ConnectionStatus, then the > error received will be ignored, and then the status will change and we don't > know why. > > I just read the MC source and I think it'll actually do the right thing here, > so I'm not sure it's worth doing anything more elaborate. Maybe worth adding a > debug() message if connectionError becomes non-empty but the status isn't > Disconnected? Yep, I missed that, I think I managed to fix this. Updated the branch with the changes.
looks good!
Merged upstream. It will be in next release 0.3.5
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.