Last week in Qt development (week 28 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 changes to QStateMachine, progress towards beta release, improvements to font rendering and window state on Windows, and work on the linuxfb QPA plugin.
Many QStateMachine fixes
Efforts focussed on QStateMachine have fixed many bugs, resolved inconsistent behavior, optimized performance, refactored for maintainability, and enabled more granular control of state-assigned property values. API for such granular property assignments is still pending.
Criteria for a beta release
On the Qt Releasing mailing list, the remaining issues to fix for a beta release are being worked on. Coordination of feedback is facilitated by the release feedback form, and candidates to test can be downloaded from the snapshots location. Testing of both source and binary packages is welcome.
The focus on Beta releasing has shown in the increased bug fixing of code and documentation in the repo and marking of tests as significant where appropriate to increase test coverage.
Windows font-engine fixing
There have been many fixes to the DirectWrite based Windows font engine in Qt. The fixes relate to accurate and appropriate height and positioning of glyphs in renderings, crash fixes, and retrieval of decoration positions such as underlines from the font itself.
Color transparency in QTextDocument
QTextDocument got support for transparency in colors when importing and exporting html documents. Color specifications in CSS sections and style attributes can now specify alpha values.
Widgets on Windows bugs fixing
Several bugs relating to QWidgets on Windows were fixed. The fixes concern mostly changes of state such as to and from fullscreen mode and minimized.
Private signal emission in Qt 5
In Qt 4, all signal-slot connections were based on string-comparison of signatures and run-time type checking. With the new syntax based on function pointers we can do compile-time type checking, but at the cost of requiring signals to be public in Qt 5. In Qt 4, signals are protected because they should only be emitted from within the class that defines them. The same is true in Qt 5, but that is no longer imposed by the compiler because the signals are public.
In a limited number of places in Qt there was a workaround used to make signals private instead of public. This was to implement a design comparable to Non-virtual interface for signals. Rather than emitting the signal directly, developers would call a method to invoke the signal. One example of this is the QAbstractItemModel::rowsInserted signal which can be connected to, but not directly emitted. For Qt 5 a new workaround was needed to enforce that these signals could be private. This work was part of KDABs maintenance of the model-view system in Qt 5.
Continued work on the LinuxFB QPA plugin
The Qt 5 QPA plugin for linuxfb received a lot of work. The linuxfb plugin is most similar in features and functionality to the QWS system present in Qt 4. It also serves as a reference implementation for developers to create customized QPA plugins for particular linux embedded systems. However, it currently has some limitations, such as not supporting multiple processes.
The same is true whenever you do a system call in a slot; or indirectly call more than ten functions. On an i586-500, you can emit around 2,000,000 signals per second connected to one receiver, or around 1,200,000 per second connected to two receivers. The simplicity and flexibility of the signals and slots mechanism is well worth the overhead, which your users won’t even notice.