QtNetwork: Standardize error message about IPv6 addresses for nameservers.
Add a const char * message with QDnsLookupRunnable's translation context and use that for untranslated warnings and errorString. Change-Id: I1b6c9fb259fb9ff824a0c3829b2c00c36aaecdfa Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
980fd570cd
commit
adb914f4b9
@ -148,6 +148,9 @@ static void qt_qdnsservicerecord_sort(QList<QDnsServiceRecord> &records)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *QDnsLookupPrivate::msgNoIpV6NameServerAdresses =
|
||||||
|
QT_TRANSLATE_NOOP("QDnsLookupRunnable", "IPv6 addresses for nameservers are currently not supported");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QDnsLookup
|
\class QDnsLookup
|
||||||
\brief The QDnsLookup class represents a DNS lookup.
|
\brief The QDnsLookup class represents a DNS lookup.
|
||||||
|
@ -89,6 +89,8 @@ public:
|
|||||||
|
|
||||||
void _q_lookupFinished(const QDnsLookupReply &reply);
|
void _q_lookupFinished(const QDnsLookupReply &reply);
|
||||||
|
|
||||||
|
static const char *msgNoIpV6NameServerAdresses;
|
||||||
|
|
||||||
bool isFinished;
|
bool isFinished;
|
||||||
QString name;
|
QString name;
|
||||||
QDnsLookup::Type type;
|
QDnsLookup::Type type;
|
||||||
|
@ -166,9 +166,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
ns->sin6_addr.s6_addr[i] = ipv6Address[i];
|
ns->sin6_addr.s6_addr[i] = ipv6Address[i];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
qWarning("IPv6 addresses for nameservers is currently not supported");
|
qWarning("%s", QDnsLookupPrivate::msgNoIpV6NameServerAdresses);
|
||||||
reply->error = QDnsLookup::ResolverError;
|
reply->error = QDnsLookup::ResolverError;
|
||||||
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
reply->errorString = tr(QDnsLookupPrivate::msgNoIpV6NameServerAdresses);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -60,9 +60,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
// For supoprting IPv6 nameserver addresses, we'll need to switch
|
// For supoprting IPv6 nameserver addresses, we'll need to switch
|
||||||
// from DnsQuey() to DnsQueryEx() as it supports passing an IPv6
|
// from DnsQuey() to DnsQueryEx() as it supports passing an IPv6
|
||||||
// address in the nameserver list
|
// address in the nameserver list
|
||||||
qWarning("IPv6 addresses for nameservers are currently not supported");
|
qWarning("%s", QDnsLookupPrivate::msgNoIpV6NameServerAdresses);
|
||||||
reply->error = QDnsLookup::ResolverError;
|
reply->error = QDnsLookup::ResolverError;
|
||||||
reply->errorString = tr("IPv6 addresses for nameservers are currently not supported");
|
reply->errorString = tr(QDnsLookupPrivate::msgNoIpV6NameServerAdresses);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user