chore: rename NetworkMonitor::getAvalibleIpv4Addresses => NetworkMonitor::validAddresses
This commit is contained in:
parent
5b4dfefcf7
commit
3c140ed479
4 changed files with 6 additions and 6 deletions
|
|
@ -429,7 +429,7 @@ void MainWindow::startCore()
|
||||||
{
|
{
|
||||||
// Save current IP state when server starts
|
// Save current IP state when server starts
|
||||||
if (m_coreProcess.mode() == CoreMode::Server && Settings::value(Settings::Core::Interface).toString().isEmpty()) {
|
if (m_coreProcess.mode() == CoreMode::Server && Settings::value(Settings::Core::Interface).toString().isEmpty()) {
|
||||||
m_serverStartIPs = m_networkMonitor->getAvailableIPv4Addresses();
|
m_serverStartIPs = m_networkMonitor->validAddresses();
|
||||||
m_serverStartSuggestedIP = m_serverStartIPs.isEmpty() ? "" : m_serverStartIPs.first();
|
m_serverStartSuggestedIP = m_serverStartIPs.isEmpty() ? "" : m_serverStartIPs.first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -627,7 +627,7 @@ void MainWindow::updateSecurityIcon(bool visible)
|
||||||
|
|
||||||
void MainWindow::updateNetworkInfo()
|
void MainWindow::updateNetworkInfo()
|
||||||
{
|
{
|
||||||
updateIpLabel(m_networkMonitor->getAvailableIPv4Addresses());
|
updateIpLabel(m_networkMonitor->validAddresses());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::serverConnectionConfigureClient(const QString &clientName)
|
void MainWindow::serverConnectionConfigureClient(const QString &clientName)
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ void NetworkMonitor::stopMonitoring()
|
||||||
m_isMonitoring = false;
|
m_isMonitoring = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList NetworkMonitor::getAvailableIPv4Addresses() const
|
QStringList NetworkMonitor::validAddresses() const
|
||||||
{
|
{
|
||||||
QList<QHostAddress> physicalIPs;
|
QList<QHostAddress> physicalIPs;
|
||||||
QList<QHostAddress> virtualIPs;
|
QList<QHostAddress> virtualIPs;
|
||||||
|
|
@ -117,7 +117,7 @@ void NetworkMonitor::setIpAddresses(const QStringList &newAddresses)
|
||||||
|
|
||||||
void NetworkMonitor::updateNetworkState()
|
void NetworkMonitor::updateNetworkState()
|
||||||
{
|
{
|
||||||
setIpAddresses(getAvailableIPv4Addresses());
|
setIpAddresses(validAddresses());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace deskflow::gui
|
} // namespace deskflow::gui
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public:
|
||||||
* @brief Get list of all available IPv4 addresses (excluding local and link-local addresses)
|
* @brief Get list of all available IPv4 addresses (excluding local and link-local addresses)
|
||||||
* @return IPv4 address list
|
* @return IPv4 address list
|
||||||
*/
|
*/
|
||||||
QStringList getAvailableIPv4Addresses() const;
|
QStringList validAddresses() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if a network interface is virtual
|
* @brief Check if a network interface is virtual
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, const IServerConfig &serverConfi
|
||||||
|
|
||||||
// Populate the list of IP addresses
|
// Populate the list of IP addresses
|
||||||
NetworkMonitor networkMonitor(this);
|
NetworkMonitor networkMonitor(this);
|
||||||
for (const auto &address : networkMonitor.getAvailableIPv4Addresses()) {
|
for (const auto &address : networkMonitor.validAddresses()) {
|
||||||
QString ipString = address;
|
QString ipString = address;
|
||||||
if (ui->comboInterface->findText(ipString) == -1) {
|
if (ui->comboInterface->findText(ipString) == -1) {
|
||||||
ui->comboInterface->addItem(ipString, ipString);
|
ui->comboInterface->addItem(ipString, ipString);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue