[Development] API review for a new QDnsResolver class

Thiago Macieira thiago at kde.org
Thu Nov 10 15:32:37 CET 2011


On Thursday, 10 de November de 2011 07.54.55, Jeremy Lainé wrote:
> What I mean is that the Q3Dns has setters as well as a constructor with
> arguments, so for instance:
> 
> Q3Dns *dns = new Q3Dns;
> dns->setLabel("foodomain.org");// will a request be triggered if I stop here
> and don't specify the record type?
> dns->setRecordType(Q3Dns::AAAA);

You can remove this ambiguity by adding a lookup() slot function that executes 
the lookup, like QFile::open after QFile::setFileName.

One problem with the API is the need to have separate processing of the 
components of a SRV label.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111110/1521b8c7/attachment.sig>


More information about the Development mailing list