[Development] fixing name of QNetworkAccessManager::createRequest

Mathias Hasselmann mathias at openismus.com
Fri Jan 13 14:10:36 CET 2012


Am Freitag, den 13.01.2012, 13:00 +0000 schrieb Giuseppe D'Angelo:
> On 13 January 2012 12:32, Mathias Hasselmann <mathias at openismus.com> wrote:
> >> what about the slightly more garden-variety approach of deprecating
> >> the old one and introducing a new method?
> >
> > Maybe we should check the premise of this discussion first.
> > Does that method really have the wrong name? It is called
> > "createRequest" and after all it causes creation of a network request.
> > Now this network request is just an internal object, and not exposed to
> > the API user. Instead the watchable reply object is returned in advance.
> 
> The problem is that it doesn't match the Qt namings for the relevant
> classes... createRequest takes a QNetworkRequest (which is a
> "description" of the request that should be made), starts making the
> underlying network request as you described, but then also creates and
> returns a reply (QNetworkReply). Bikeshedding?

Surely startRequest() would have been a better name.
But really not sure it is worth the hassle of changing it.
Still Robins suggestions shows a practical approach.

Ciao,
Mathias

-- 
Mathias Hasselmann <mathias at openismus.com>
http://openismus.com/




More information about the Development mailing list