Skip to content

Last week in Qt development (week 24 2012)

This post is part of an ongoing series about developments and discussions in Qt.

Some parts of this report are still under discussion and don’t necessarily reflect the final state of Qt 5. The target audience is people involved in Qt development itself, but without the time to follow everything that happens, and others with a strong interest in Qt, Qt 5, and the community.

This week we cover automatic declaration of custom meta-types, improvements to QSharedPointer and QDateTime, marketing around Qt 5, and low-level, compiler specific code generation improvements.

Automatic metatype declaration of smart pointers

Previous patches to the Qt metatype system made it no longer necessary to write Q_DECLARE_METATYPE(Foo*) in cases where Foo derives from QObject.

QSharedPointer was also automatically declared as a metatype, but required a fix last week. Simultaneously, I added automatic declaration of QWeakPointer and QPointer types, so those rarely need to be explicitly declared as metatypes either.

Registering types as metatypes at runtime (eg using qRegisterMetaType) is unaffected by these changes.

QSharedPointer re-written

QSharedPointer got a significant clean-up last week. The most relevant patches are here and here, which affect the behavior of QSharedPointer in contexts where its pointed type is forward declared, not fully defined.

The work simplifies the implementation of QSharedPointer, realigning with the goals of Qt 5, where the goals are not the same as they were when QSharedPointer was initially developed, such as using the class as an intrusive pointer.

Datetime improvements

QDateTime received some improvements in the form of ISO 8601 compatibility, handling of fractions of minutes/seconds, and consolidation of its unit tests.

Future of qdoc

qdoc is the tool used to generate documentation for the official Qt modules. The tool processes the C++ and QML source code and comments along with additional pages of input to generate the documentation distributed with Qt. For third parties, doxygen is commonly used to generate documentation using similar markup. It is also possible to generate documentation for Qt assistant using doxygen.

A drawback of doxygen, however, is that it can not process QML code, which is becoming increasingly relevant to Qt. One solution to that is to make qdoc more suitable for third parties to use, which was discussed last week. The subject of doing the opposite – using doxygen in Qt – was discussed previously, but an acceptable way to make that work was not found, for various reasons.

Qt 5 feature list

The release engineering around Qt 5 also continues with effort on updating the list of features in Qt 5. Such a list will always be incomplete, but the current page gives some idea of what Qt 5 has in-store.

Code generation improvements

Many commits lately have focussed on optimizing the hints and techniques used to generate assembler for particular architectures. Thiago Macieira blogged about his efforts in that area. This will not have an impact on user-code, but contributes towards a more optimal and responsive Qt overall.

Leave a Reply

Your email address will not be published. Required fields are marked *