diff --git a/src/network/kernel/qdnslookup.cpp b/src/network/kernel/qdnslookup.cpp index 150beb4d39..4a275f0700 100644 --- a/src/network/kernel/qdnslookup.cpp +++ b/src/network/kernel/qdnslookup.cpp @@ -148,6 +148,9 @@ static void qt_qdnsservicerecord_sort(QList &records) } } +const char *QDnsLookupPrivate::msgNoIpV6NameServerAdresses = + QT_TRANSLATE_NOOP("QDnsLookupRunnable", "IPv6 addresses for nameservers are currently not supported"); + /*! \class QDnsLookup \brief The QDnsLookup class represents a DNS lookup. diff --git a/src/network/kernel/qdnslookup_p.h b/src/network/kernel/qdnslookup_p.h index 0ac37f6636..3c8c4d5824 100644 --- a/src/network/kernel/qdnslookup_p.h +++ b/src/network/kernel/qdnslookup_p.h @@ -89,6 +89,8 @@ public: void _q_lookupFinished(const QDnsLookupReply &reply); + static const char *msgNoIpV6NameServerAdresses; + bool isFinished; QString name; QDnsLookup::Type type; diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp index a5e97c4a93..dc8ec5a300 100644 --- a/src/network/kernel/qdnslookup_unix.cpp +++ b/src/network/kernel/qdnslookup_unix.cpp @@ -166,9 +166,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN ns->sin6_addr.s6_addr[i] = ipv6Address[i]; } #else - qWarning("IPv6 addresses for nameservers is currently not supported"); + qWarning("%s", QDnsLookupPrivate::msgNoIpV6NameServerAdresses); reply->error = QDnsLookup::ResolverError; - reply->errorString = tr("IPv6 addresses for nameservers is currently not supported"); + reply->errorString = tr(QDnsLookupPrivate::msgNoIpV6NameServerAdresses); return; #endif } diff --git a/src/network/kernel/qdnslookup_win.cpp b/src/network/kernel/qdnslookup_win.cpp index 4a6c631983..df0203bebb 100644 --- a/src/network/kernel/qdnslookup_win.cpp +++ b/src/network/kernel/qdnslookup_win.cpp @@ -60,9 +60,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN // For supoprting IPv6 nameserver addresses, we'll need to switch // from DnsQuey() to DnsQueryEx() as it supports passing an IPv6 // address in the nameserver list - qWarning("IPv6 addresses for nameservers are currently not supported"); + qWarning("%s", QDnsLookupPrivate::msgNoIpV6NameServerAdresses); reply->error = QDnsLookup::ResolverError; - reply->errorString = tr("IPv6 addresses for nameservers are currently not supported"); + reply->errorString = tr(QDnsLookupPrivate::msgNoIpV6NameServerAdresses); return; } }