65 static const std::vector<std::pair<QHostAddress, int>> ipv4Private(
84 static const std::vector<std::pair<QHostAddress, int>> ipv4Reserved(
127 {
QHostAddress(QStringLiteral(
"255.255.255.255")), 32}});
130 static const std::vector<std::pair<QHostAddress, int>> ipv6Private(
138 static const std::vector<std::pair<QHostAddress, int>> ipv6Reserved(
173 if (a.setAddress(
value)) {
179 if (constraints.testFlag(
IPv6Only)) {
186 for (
const std::pair<QHostAddress, int> &subnet : ipv4Private) {
187 if (a.isInSubnet(subnet.first, subnet.second)) {
197 for (
const std::pair<QHostAddress, int> &subnet : ipv4Reserved) {
198 if (a.isInSubnet(subnet.first, subnet.second)) {
207 if (a.isInSubnet(
QHostAddress(QStringLiteral(
"224.0.0.0")), 4)) {
214 if (constraints.testFlag(
IPv4Only)) {
221 for (
const std::pair<QHostAddress, int> &subnet : ipv6Private) {
222 if (a.isInSubnet(subnet.first, subnet.second)) {
232 for (
const std::pair<QHostAddress, int> &subnet : ipv6Reserved) {
233 if (a.isInSubnet(subnet.first, subnet.second)) {
242 if (a.isInSubnet(
QHostAddress(QStringLiteral(
"ff00::")), 8)) {
QString qtTrId(const char *id, int n=-1) const