On Wednesday, 9 de November de 2011 09:17:59 Jeremy Lainé wrote: > 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.
> > No need if all functions are static. > > And since they are not? They should be. There's no need for a QDnsResolver public object like QNetworkAccessManager. The idea of a manager in QNAM was to share settings, open connections and cookies. Usually, applications have only one QNAM and that's enough for them. However, in some circumstances, connections with different settings are necessary. Not so for DNS: the are no settings to be changed. So all queries use the same settings and resources, which are shared behind the scenes. All lookup functions should be static returning QDnsReply*, or it should be able to create the lookup using QDnsReply's constructor. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development