Import existing sources

This commit is contained in:
feedc0de committed 2022-09-25 01:31:36 +02:00
1 parent 38704e2f03
commit 68a17e2442
26 files changed
+1660

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#include "webserverutils.h"
QHostAddress parseHostAddress(const QString &str)
{
if (str.isEmpty() || str == "Any")
return QHostAddress::Any;
else if (str == "AnyIPv6")
return QHostAddress::AnyIPv6;
else if (str == "AnyIPv4")
return QHostAddress::AnyIPv4;
else if (str == "LocalHost")
return QHostAddress::LocalHost;
else if (str == "LocalHostIPv6")
return QHostAddress::LocalHostIPv6;
else
return QHostAddress{str};
}