Hi, On Tue, Nov 1, 2011 at 4:15 PM, Jeremy Lainé <jeremy.la...@m4x.org> wrote:
> > > While we are on the topic of the API, one thing which needs to be adressed > is the kind of > "handle" (if any) we return for asynchronous lookups: > > - QHostInfo::lookupHost() returns an integer > - QDnsServiceInfo::lookupService() currently doesn't return anything > > If I recall correctly, Thiago was not happy with returning an integer, > stating a "more > modern API" should be used. Are we talking about replacing QDnsServiceInfo > with a > QDnsServiceReply* ? Pro: it's consistent with QNAM. Con: we place the > burden of freeing > memory on the user. > How about returning a QSharedPointer<QDnsServiceReply> then? Pro: Using the right shared pointer immediately makes clear who is the owner of the object in question. In this case: whoever holds on to the pointer the longest. Con: this is not currently used in Qt APIs. Andre
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development