kio: const-ify the port argument of KHTTP::start()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-26 16:35:34 +02:00
parent a9c96f297b
commit 8fcd182e2f
2 changed files with 4 additions and 4 deletions

View file

@ -363,7 +363,7 @@ private Q_SLOTS:
void slotNewConnection();
public:
bool start(const QHostAddress &address, quint16 port);
bool start(const QHostAddress &address, const quint16 port);
void stop();
QString serverid;
@ -505,7 +505,7 @@ void KHTTPPrivate::slotNewConnection()
client->deleteLater();
}
bool KHTTPPrivate::start(const QHostAddress &address, quint16 port)
bool KHTTPPrivate::start(const QHostAddress &address, const quint16 port)
{
m_ref.store(0);
return tcpserver->listen(address, port);
@ -564,7 +564,7 @@ bool KHTTP::setAuthenticate(const QByteArray &username, const QByteArray &passwo
return true;
}
bool KHTTP::start(const QHostAddress &address, quint16 port)
bool KHTTP::start(const QHostAddress &address, const quint16 port)
{
return d->start(address, port);
}

View file

@ -69,7 +69,7 @@ public:
@brief Starts serving data for requests at @p address on @p port.
@note If port is 0 (the default) then a random port is chosen.
*/
bool start(const QHostAddress &address = QHostAddress::Any, quint16 port = 0);
bool start(const QHostAddress &address = QHostAddress::Any, const quint16 port = 0);
bool stop();
/*!