refactor: MainWindow, simplify ip update if core is not running
This commit is contained in:
parent
00235ba189
commit
1973005e98
1 changed files with 3 additions and 4 deletions
|
|
@ -1313,10 +1313,9 @@ void MainWindow::updateIpLabel(const QList<QHostAddress> &addresses)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Server is not running - update normally
|
// Server is not running - update normally
|
||||||
const auto suggestedIp = m_networkMonitor->getSuggestedIPv4Address();
|
m_currentIpAddress = m_networkMonitor->getSuggestedIPv4Address();
|
||||||
QString displayIP = !suggestedIp.isNull() ? suggestedIp.toString() : ipList.first();
|
m_currentIPValid = m_currentIpAddress.isNull();
|
||||||
m_currentIpAddress = !suggestedIp.isNull() ? suggestedIp : QHostAddress();
|
QString displayIP = m_currentIPValid ? m_currentIpAddress.toString() : ipList.first();
|
||||||
m_currentIPValid = !suggestedIp.isNull();
|
|
||||||
labelText.append(displayIP);
|
labelText.append(displayIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue