[Development] Qt Platform Extras

Knoll Lars Lars.Knoll at digia.com
Thu Feb 28 15:08:19 CET 2013


Actually, I would like Qt Addons to live in a namespace, esp. for new
ones. The namespace name ought the be the same as the module's name. This
is really there to avoid name clashes with other parts of Qt. With a
namespace, you have all the freedom you want on how to name methods
inside. developers using the module can simply use a using declaration,
and then won't have to worry about long names.

Cheers,
Lars

On 2/25/13 12:03 PM, "Joerg Bornemann" <joerg.bornemann at digia.com> wrote:

>On 25/02/2013 09:35, Sorvig Morten wrote:
>
>>      - Stand-alone function namespace:
>>          * Qt::toPlatformType (³Qt::toWindowsHBITMAP².
>>³Qt::toMacCGImageRef²)
>> 	-OR-
>>          * QPlatform::toType(³QWindows::toHBITMAP²,
>>"QMac::toCGImageRef")
>
>I vote for the latter naming scheme. We should not simulate namespaces
>by cluttering the function names.
>Looking at the Windows example, it might be wise to call the platform
>namespaces QtPlatform, not QPlatform to make the namespace QtWindows and
>the class QWindow easier distinguishable.
>
>
>BR,
>
>Joerg
>
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list