refactor: Mainwindow::updateIpLabel return early if we are using fixedIp from settings
This commit is contained in:
parent
c2314ad893
commit
a84e91a3f2
1 changed files with 42 additions and 39 deletions
|
|
@ -1274,7 +1274,11 @@ void MainWindow::updateIpLabel(const QList<QHostAddress> &addresses)
|
|||
labelText.append(colorText.arg(palette().linkVisited().color().name(), ip));
|
||||
toolTipText.append(tr("\nInterface is not active. Unable to start server."));
|
||||
}
|
||||
} else {
|
||||
ui->lblIpAddresses->setText(labelText);
|
||||
ui->lblIpAddresses->setToolTip(toolTipText);
|
||||
return;
|
||||
}
|
||||
|
||||
labelText = tr("Suggested IP: ");
|
||||
toolTipText = tr("<p>If connecting via the hostname fails, try %1</p>");
|
||||
static auto s_toolTipSuggestIP = tr("the suggested IP.");
|
||||
|
|
@ -1321,7 +1325,6 @@ void MainWindow::updateIpLabel(const QList<QHostAddress> &addresses)
|
|||
} else {
|
||||
toolTipText = toolTipText.arg(s_toolTipIpList.arg(ipList.join("<br/>")));
|
||||
}
|
||||
}
|
||||
|
||||
ui->lblIpAddresses->setText(labelText);
|
||||
ui->lblIpAddresses->setToolTip(toolTipText);
|
||||
|
|
|
|||
Loading…
Reference in a new issue