[Development] Qt Platform Extras

Sze Howe Koh szehowe.koh at gmail.com
Sat Sep 14 02:56:54 CEST 2013


On 11 September 2013 01:07, Laszlo Papp <lpapp at kde.org> wrote:
> On Tue, Sep 10, 2013 at 4:46 PM, Thiago Macieira <thiago.macieira at intel.com>
> wrote:
>>
>> On terça-feira, 10 de setembro de 2013 22:31:53, Sze Howe Koh wrote:
>> > On 10 September 2013 14:27, Knoll Lars <Lars.Knoll at digia.com> wrote:
>> > > Ok, let's use QtWin for the namespace. For the module itself it makes
>> > > IMO
>> > > to keep the 'Extras' in the name.
>> > >
>> > > Cheers,
>> > > Lars
>> >
>> > QtWin or QWin?
>>
>> QtWin, it's a namespace.
>
>
> I believe he is aware of that...
>
> I think, Sze please correct me if I am wrong, he just wanted to make sure
> because there was several emails last year about QFoo or QtFoo for the
> namespace, and it seemed that the suboptimal naming was chosen for other
> reasons.

Laszlo is correct.

Before Qt 5 was released, most public namespaces had the "QFoo" format
-- QSsl, QDBus, QAudio, etc. A few had the "QtFoo format --
QtMultimedia::MetaData (unreleased), QtMultimedia (unreleased), and
QtConcurrent. I suggested making them uniform. [1]

Lars said that he preferred "QFoo" -> "QtFoo", but that change was the
much more intrusive one. Qt 5 was close to Beta 2 at the time, so he
chose the lower-risk "QtFoo" -> "QFoo". [2]

As of Qt 5.1, all public namespaces are "QFoo", except "Qt" and
"QtConcurrent". Thiago blocked the latter on the basis that (i)
development on that module has stopped, and (ii) QtConcurrent is quite
different from all the other namespaces anyway. [3]

With all that in mind, do we want "QtWin" or "QWin"? The benefit of
"QWin" is consistency with existing conventions; the downside is
having to wait till Qt 6 if we want to switch to the preferred
"QtFoo". "QtWin" has the benefit of introducing users to the preferred
naming convention now (and a smaller list of namespace changes if/when
the change occurs), at the cost of introducing more inconsistencies.

I vote for "QWin" for consistency, and I'm not sure that an extra
':%s/QWin::/QtWin::/g' will make a difference to users if they're
doing the same for all other namespaces in Qt 6.


Regards,
Sze-Howe

[1] http://lists.qt-project.org/pipermail/development/2012-October/007421.html
[2] http://lists.qt-project.org/pipermail/development/2012-October/007591.html
[3] https://codereview.qt-project.org/#change,39375



More information about the Development mailing list