[Development] API review for a new QDnsResolver class
Jeremy Lainé
jeremy.laine at m4x.org
Wed Nov 9 09:17:59 CET 2011
On 11/08/2011 10:57 PM, Thiago Macieira wrote:
> On Tuesday, 8 de November de 2011 19:40:13 Jeremy Lainé wrote:
>> - the QNAM-style API seems to be OK
> Correct, but all functions in QDnsResolver are static.
>
> That means they could go into QDnsReply and we could rename the class simply
> QDns. It worked for Qt 3...
>
The methods are not static, the QDnsResolver instance initially owns all QDnsReply objects
it returns. It also owns the QThreadPool used to perform the lookups.
>> - I have implemented QDnsReply::abort() to cancel a lookup request
> Good.
>
I forgot to mention: you can delete the QDnsReply at any time, as both QDnsReply and
QDnsResolverRunnable access QDnsReplyPrivate via a QSharedPointer.
>> - Robin mentioned adding a static QDnsResolver::instance() method, does
>> anyone else have an opinion on this?
> No need if all functions are static.
And since they are not?
Jeremy
More information about the Development
mailing list