[Development] Dropping the Q prefix from class names

joao.abecasis at nokia.com joao.abecasis at nokia.com
Sun Apr 1 17:04:34 CEST 2012


Hi all,

Earlier today I pushed some changes to Gerrit, Thiago suggested I bring
it up on the mailing list before he can approve them. Given the impact
these changes have on user code it's important that we get this merged
to master and out in the alpha as quickly as possible.

For reference the changes can be viewed here:

    http://codereview.qt-project.org/22063
    http://codereview.qt-project.org/22064

The first one introduces a Q namespace, which replaces the Q prefix in
Qt5. The second patch drops the prefix in class names. This brings the
C++ API more in line with the QML/JavaScript one and will hopefully help
move all remaining C++ developers to JavaScript.

Still pending are patches to:

- propagate the change to the various modules;
- drop the q prefix from file names
- update fixqt4headers script to automatically fix user code
- rename the Q::Qt namespace to Q::t

While we're at this, it would be good to improve our interoperability
with C++11. I have another patch in the works that drops camelCase, in
favor of the standardized names_with_underscores. The extra separation
between words will be welcomed by those of us that use small fonts and
ALL-CAPS editors.

We'll need a script to fix user code. Ideally, user classes and APIs
also get ported to the new style. (I hear there's ongoing work for a
refactoring tool in Creator, which should land Real Soon Now (tm))

Again, given the impact these changes will have, I urge everyone to
pitch in, review and help bring this effort to good harbor.

Qt 5 is going to be revolutionary.

Cheers,


João

PS - Help with testing alpha packages is also welcome ;-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120401/d4415f69/attachment.html>


More information about the Development mailing list