Last week in Qt development (week 21 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 post is one week later than usual, so please excuse the lateness.
This week we cover improvements to APIs related to strings, parallelization of unit tests, debugging helper for QHash, increased Qt 4.8 OS support, and discussions and explanations from around the web.
QString improvements
Lots of commits going into QString, unicode encodings, cleanups, and refactorings. One such commit changes many Qt APIs from accepting a const QLatin1String & to accepting a QLatin1String. The ‘const &’ is superfluous because of the simplicity of the definition of QLatin1String. Similar commits have been made for QChar and QCharRef.
QHash randomization can be disabled
The randomization of the seed used in QHash discussed previously, can now be disabled. Qt 5 will use a seed value from an environment variable, if set, instead of randomizing the seed. While this can be useful for debugging purposes, it turns off a security measure, so it should not be used when not needed. Perl has a comparable feature in its seed randomization feature.
Qt 4.8 patches for new operating systems
Some new enum values will appear in future releases of Qt 4.8 to make it possible to use Qt 4 with newer operating systems (Windows 8 and Mac OSX Mountain Lion). Usually, Qt patch releases are backwards source compatible, that is, if you can build your software with Qt 4.8.3, you can build it with 4.8.2 etc. With the addition of this enum value for Qt 4.8.3, this will no longer be the case for software that uses those enum values.
Expanding tests and parallelization
Apart from the usual continual expansion of the unit test suite, many tests are being made ‘parallel safe’, meaning they can be executed in parallel with other unit tests. This speeds up the process of integrating new patches, as it will take less time to run the continuous integration on new patches. Not all tests are candidates for being run in parallel.
In particular, tests which depend on access to system-wide state such as system directories shared temporary directories, or widget focus can not be run in parallel.
QUrl cleanups
QUrl has seen significant changes already in Qt 5.0. Work on porting parts of KDE to Qt 5 has shown some differences in behaviour between QUrl in Qt 4 and Qt 5, which resulted in a proposal to update it again, and some patches to improve it.
Interesting thread about smart pointers, QObjects and qtdeclarative
There was an interesting thread about Qt, QML, the needs of hybrid applications, and smart pointers on the mailing list. The situation is currently not as good as it can be and requires both documentation and new code features. As Qt 5 progresses, these and similar issues will get increasing attention and solutions.
Seen on the blogosphere
Olivier wrote a blog post about QStringLiteral, how it works, and the motivation for it existing. QStringLiteral is one of many string related APIs in Qt. A handy (though somewhat dated, as the default encoding is now UTF-8) reference of when to use many of them was previously posted to the mailing list.
Also, interesting reading was a blog post from a GLib and GObject user learning to use Qt for new projects, and for wrappers or libraries functionally equivalent to something that already exists implemented in GTK+.
nice article 🙂
still… one thing bothers me… you definately need a +1 button 😉