summaryrefslogtreecommitdiffstats
path: root/tests/auto/httpserver/httpserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/httpserver/httpserver.cpp')
-rw-r--r--tests/auto/httpserver/httpserver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/httpserver/httpserver.cpp b/tests/auto/httpserver/httpserver.cpp
index 6dd64ab88..e08af77e7 100644
--- a/tests/auto/httpserver/httpserver.cpp
+++ b/tests/auto/httpserver/httpserver.cpp
@@ -24,7 +24,8 @@ HttpServer::HttpServer(QTcpServer *tcpServer, const QString &protocol,
{
m_url.setHost(hostAddress.toString());
m_url.setScheme(protocol);
- connect(tcpServer, &QTcpServer::newConnection, this, &HttpServer::handleNewConnection);
+ connect(tcpServer, &QTcpServer::pendingConnectionAvailable, this,
+ &HttpServer::handleNewConnection);
}
HttpServer::~HttpServer()
@@ -79,7 +80,7 @@ void HttpServer::handleNewConnection()
// if request wasn't handled or purposely ignored for default behavior
// then try to serve htmls from resources dirs if set
if (rr->requestMethod() == "GET") {
- for (auto &&dir : qAsConst(m_dirs)) {
+ for (auto &&dir : std::as_const(m_dirs)) {
QFile f(dir + rr->requestPath());
if (f.exists()) {
if (f.open(QFile::ReadOnly)) {