[Development] qpa api - current status

lars.knoll at nokia.com lars.knoll at nokia.com
Tue May 29 10:52:30 CEST 2012


On 5/29/12 8:22 AM, "ext Jørgen Lind" <jorgen.lind at nokia.com> wrote:

>Hi
>> 6. Rename the handle() to platformXXX() since it's easy to educate
>> that anything that has platform in it is out of reach of app
>> developers.
>> Status: In progress, I am atm, marking handle() as obsolete and as an
>> alias to platformXXX().
>
>But since when did the word handle() mean anything else in API design?
>Im all for clear and verbose function names, but think this is just
>making the api ugly. To me if you ask for a handle of a class you will
>get the underlying structure. It then should be crystal clear to the
>developer that this class can not be used as a public class.

The problem is that handle() is very unspecific, and that code ported from
Qt 4.x to Qt 5 will silently break when people call handle(), as you get
something else back then you thought you would.

Renaming the methods at least turns the silent breakage into an explicit
one.

Cheers,
Lars

>
>Jørgen
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list