If we use a port<1024 for HTTP server, then just assign a 'dynamic'/random port

This commit is contained in:
craig.p.drummond
2013-03-11 19:53:25 +00:00
committed by craig.p.drummond
parent d25382057c
commit 13afdc5600
4 changed files with 8 additions and 5 deletions

View File

@@ -23,18 +23,21 @@
#include "httpserversettings.h"
#include "settings.h"
#include "localize.h"
HttpServerSettings::HttpServerSettings(QWidget *p)
: QWidget(p)
{
setupUi(this);
httpPort->setSpecialValueText(i18n("Dynamic"));
}
void HttpServerSettings::load()
{
int port=Settings::self()->httpPort();
enableHttp->setChecked(Settings::self()->enableHttp());
alwaysUseHttp->setChecked(Settings::self()->alwaysUseHttp());
httpPort->setValue(Settings::self()->httpPort());
httpPort->setValue(port<1024 ? 1023 : port);
httpAddress->setText(Settings::self()->httpAddress());
}