prevent port values to go below 1024 in the GUI

This commit is contained in:
csoler 2017-02-27 22:35:24 +01:00
parent ee9fbefd76
commit 30c4dfe218
2 changed files with 7 additions and 7 deletions

View File

@ -676,14 +676,14 @@ void ServerPage::updateStatus()
if (!ui.localPort->isEnabled())
{
/* set local address */
ui.localPort -> setValue(detail.localPort);
ui.extPort -> setValue(detail.extPort);
whileBlocking(ui.localPort) -> setValue(detail.localPort);
whileBlocking(ui.extPort) -> setValue(detail.extPort);
}
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
whileBlocking(ui.localAddress)->setText(QString::fromStdString(detail.localAddr));
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
whileBlocking(ui.extAddress)->setText(QString::fromStdString(detail.extAddr));
// Now update network bits.

View File

@ -26,7 +26,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabNetConf">
<attribute name="title">
@ -157,7 +157,7 @@
<string>Acceptable ports range from 10 to 65535. Normally Ports below 1024 are reserved by your system.</string>
</property>
<property name="minimum">
<number>10</number>
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
@ -183,7 +183,7 @@
<string>Acceptable ports range from 10 to 65535. Normally ports below 1024 are reserved by your system.</string>
</property>
<property name="minimum">
<number>10</number>
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>