[Qgis-developer] QgsMapLayerRegistry (and QgsMapCanvas) problem

Martin Dobias wonder.sk at gmail.com
Mon Oct 20 05:45:56 EDT 2008


Hi Tim

On Sun, Oct 19, 2008 at 9:33 PM, Tim Sutton <tim at linfiniti.com> wrote:
>> I was not happy with all the renaming taking place, but generally
>> they're fine.
>
> Bear in mind whatever we dont clean up now, we will be stuck with for
> a long time (3 years+?). The API is full of inconsistancies and
> english wobblies that make using it harder than it needs to be.

In fact I hope we won't get stuck with this API for next 3 years :-)
(but that's for discussion in another thread)

>>One thing I don't really like is that
>> QgsVectorDataProvider::reset() was renamed to begin(). The real
>> purpose of this function is to restart reading of the data, one
>> doesn't have to call it when starting retrieval of features - but
>> that's what the current name suggest. I would suggest using e.g.
>> resetReading() as it better corresponds with the action it takes (and
>> stays consistent with OGR).
>
> 1) The change to reset was done in consultation with Marco H. Calling
> reset sounds like its doing something damaging rather than moving to
> the start of the selection. Another option would be something like
> toSelectionStart() if you feel it would make its purpose clearer.

and what about seekToBegin() or resetReading() ?
begin() itself really doesn't make things clear.


> 2) Providers are an abstraction and the Provider interface should not
> emulate the OGR api per se.

I was giving OGR just as an example of API that many people know and
are familiar with...

Martin


More information about the Qgis-developer mailing list