Simply use isConnected() in StatusInfo::updateConnectedDevices()
instead of explicitely listing all "connected" states.
This commit is contained in:
parent
c827907ea6
commit
4445659d2b
|
@ -103,11 +103,7 @@ void StatusInfo::updateConnectedDevices(const SyncthingConnection &connection)
|
||||||
{
|
{
|
||||||
m_additionalDeviceInfo.clear();
|
m_additionalDeviceInfo.clear();
|
||||||
|
|
||||||
switch (connection.status()) {
|
if (connection.isConnected()) {
|
||||||
case SyncthingStatus::Idle:
|
|
||||||
case SyncthingStatus::OutOfSync:
|
|
||||||
case SyncthingStatus::Scanning:
|
|
||||||
case SyncthingStatus::Synchronizing: {
|
|
||||||
// find devices we're currently connected to
|
// find devices we're currently connected to
|
||||||
const auto connectedDevices(connection.connectedDevices());
|
const auto connectedDevices(connection.connectedDevices());
|
||||||
|
|
||||||
|
@ -149,9 +145,6 @@ void StatusInfo::updateConnectedDevices(const SyncthingConnection &connection)
|
||||||
} else if (deviceNames.size() == 1) {
|
} else if (deviceNames.size() == 1) {
|
||||||
m_additionalDeviceInfo = QCoreApplication::translate("QtGui::StatusInfo", "Connected to %1", nullptr, deviceCount).arg(deviceNames[0]);
|
m_additionalDeviceInfo = QCoreApplication::translate("QtGui::StatusInfo", "Connected to %1", nullptr, deviceCount).arg(deviceNames[0]);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recomputeAdditionalStatusText();
|
recomputeAdditionalStatusText();
|
||||||
|
|
Loading…
Reference in New Issue