summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Accessibility: Menu item should keep track of owner being validFrederik Gladhorn2013-04-232-2/+3
| | | | | | | | | | | The QAction may stay around while the parent/owner gets deleted. This is for example the case for some dynamically created menus. This is required for fixing QTBUG-30792 Change-Id: I7b6122edec6def69aed77502403134e1568e21c9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make QTextCursor accessibility boundary finder availableFrederik Gladhorn2013-04-084-89/+26
| | | | | | | | | This allows re-using the function in QtQuick. In addition TextBoundaryType is moved to QAccessible and QAccessible2 as namespace ceases to exist. Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-027-111/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Accessibility: Fix crash when updating in dtorFrederik Gladhorn2013-03-232-1/+7
| | | | | | | | | | | | | | This happens for example when running several tests. Widgets in destructor should be treated as invalid since their window pointer and other properties are no longer valid. When deleting a window containing only a table view there would be a table model reset update comming from the window being destroyed. Change-Id: Ia387c814333ce373fe132b189fc180787e36cdd5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Only instantiate QAccessibleWidget after trying inherited classesFrederik Gladhorn2013-03-222-10/+9
| | | | | | | | | | | | The plugin should try each class name from the meta object in succession instead of giving up right away and just using QWidget. This improves the handling of the itemviews and makes many sub-classes of QWidget outside of Qt work. Change-Id: Id81017c648fe229c3eb85d6d9ae6696d5f16a1ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix crash when trying to access accessible parent in dtorFrederik Gladhorn2013-03-191-1/+1
| | | | | Change-Id: I36a065facc0ea80b3a155eaf646613cbd86fdfac Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make qaccessible2.h internal.Frederik Gladhorn2013-03-147-12/+12
| | | | | | | | | | | This should have been done right from the start, instead we only made the documentation internal. Also remove the classes from the BIC data. Change-Id: I238a7a7cc5d26980b23931c78e7e5a4477d46920 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix some warnings that have crept up since I last fixed warningsThiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | qgtkstyle.cpp:3177:103: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses] qcups.cpp:517:66: error: ‘QString::QString(const char*)’ is deprecated itemviews.cpp:795:13: error: unused parameter ‘actionName’ [-Werror=unused-parameter] qeglconvenience.cpp:268:9: error: ‘cfg’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I9b8a175ff1c2ddc443363e08b92e09cf7c2f91cf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Fix lupdate-warnings in simplewidgets.cpp.Friedemann Kleint2013-02-051-2/+2
| | | | | | | | | | | | | | | | simplewidgets.cpp:429: Discarding unconsumed meta data simplewidgets.cpp:535: Discarding unconsumed meta data Change-Id: Icd9686392781eb1faa7868dc4c92d26fa44c4f94 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Simplify a function to fix a warning reported by ICCThiago Macieira2013-02-111-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | ICC thinks that the return statement is missing: src/plugins/accessible/widgets/itemviews.cpp(867): error #1011: missing return statement at end of non-void function "QAccessibleTableHeaderCell::parent" Clearly it's wrong, but the function is overly complex for no good reason. So just simplify it instead. Change-Id: Ic63029df18b4712d9864a4dc66b6751b2d4574b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Improve QAccessibleApplicationFrederik Gladhorn2013-01-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add more testing. This uncovers that currently the QDesktopScreenWidget shows up as child of the app. Fixed by not creating QAccessibleInterfaces for QDesktopScreenWidget. Also don't crash in indexOfChild when called with 0. Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2213-16/+23
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Make hierarchy of actions in menubars more consistent.Jan Arve Saether2013-01-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an assumption that the interface returned from iface->parent() would have iface as one of its children (thus, parent->indexOfChild(iface) should always return an integer != -1, indicating that it is a child. This is a good assumption, otherwise an hierarchy would be presented differently depending on how it is traversed. However, a QMenu created like this: QMenu *menu = new QMenu("weird parent", mainWindow); mainWindow->menuBar()->addMenu(menu); will have a different ancestor sequence than a menu created like this: mainWindow->menuBar()->addMenu("ok parent"); This is because it will walk up the QObject hierarchy. This patch tries to deal with that by looking at which widgets the action of the menu is associated with before determining which should be the accessible parent. Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1813-13/+13
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-161-1/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Fix crash in tst_qtreewidget.Friedemann Kleint2013-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | A division by zero occurred since an empty model was used. Task-number: QTBUG-28611 Change-Id: I1f9e869bda9f76a1c97840dff6ba48ab813bce9a Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Implement QAccessibleActionInterface in QAccessibleTableCellJosé Millán Soto2013-01-112-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | Implemented QAccessibleActionInterface in QAccessibleTableCell to allow selecting and unselecting table cells, as there was no way of selecting or deselecting a simple cell using accessible tools. tst_qaccessibility.cpp was modified to test the new methods. Change-Id: I7bdfe0b363a9813d4a7c62e96b6c924b163f2121 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-049-10/+32
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * Prevent crash in childAt when there are 0 childrenMorten Johan Sorvig2012-12-141-1/+1
| | | | | | | | | | | | | | | | Fix off-by-one error. QAccessibleInterface::child() is 0-based, start the iteration at childCount() - 1. Change-Id: I0c841b692adab0aae4e8ac44c7d308cd7a176ac8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Accessible: Improve value interfacev5.0.0-rc2Frederik Gladhorn2012-12-124-0/+21
| | | | | | | | | | | | | | | | | | The stepSize property was missing in Qt 4 and is a sensible addition to the value interface. Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Add PLUGIN_CLASS_NAME to qtbase pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | | | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Icd993c0fc8335f29aeec30e853a408d888069399 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Compile with QT_NO_CURSOR.Volker Krause2012-12-073-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Mostly straightforward, the a11y changes might look a bit drastic, but the base class QAccessibleTextWidget was already disabled in this case, so we have to obviously take out its sub-classes as well. Change-Id: I682ace20d6938688ddb1da23c3463f3c025fab8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* | Change behaviour of selectRow, selectColumn, unselectRow, unselectColumnJosé Millán Soto2012-12-181-10/+115
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | According to the comments of selectRow and selectColumn, the expected behaviour of this method was to select a row or a column and unselect any cell that were previously selected. However the actual behavior was to select only one cell and not deselect any cell. Moreover, according to the specification there's no simple way of selecting multiple rows or columns as when one of the methods is called for selecting one row or column the others should be unselected. The specification was changed not to require the rest of the cells to be deselected, although they might be deselected if the selectionMode requires that in order for the new row/column to be selected. The implementation of these methods was changed in QAccessibleTable and QAccessibleTree to select the whole row/column and take into acount selectionMode and selectionBehavior. tst_qaccessibility.cpp was modified to test the new behaviour of the methods. Change-Id: I29635d014792169302435e81704e02c16f951238 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix compile with QT_NO_SHORTCUTMontel Laurent2012-12-011-1/+1
| | | | | Change-Id: Ib11f2e01fecb0c231211c92e4590cbaddc76246f Reviewed-by: David Faure <david.faure@kdab.com>
* Accessibility: set multiline state for text edits.Frederik Gladhorn2012-11-232-2/+11
| | | | | | Change-Id: I22d3baac8fc57db0c89d8543019a93263b2023ca Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: unhide text() function in TextWidget subclasses.Frederik Gladhorn2012-11-211-0/+7
| | | | | Change-Id: Ib5a64ff8de175d1ffc6e4357ec9ec45c4c2f2917 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Implement editable text interface for QLineEdit.Frederik Gladhorn2012-11-032-1/+22
| | | | | | | | This was uncovered by the linux accessibility test which tried to call non-existing functions. Change-Id: Iaa9640c23ee77d7c5b2321d7f8cfa6d12d61c0e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* beef up qt_plugin.prfOswald Buddenhagen2012-11-011-2/+2
| | | | | | | it now defines the DESTDIR and creates an INSTALLS rule. Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Implement QAccessibleLineEdit::characterRect()Jan-Arve Saether2012-10-281-3/+14
| | | | | | | | | | | | It was probably not implemented because it needed to access private APIs. However, accessing those from this a11y plugin is unproblematic. Forward-ported from Qt 4.8 with change d2fb64d52fc6ec229d775f829a9a0cb3d251aad3 (and then slightly improved) Change-Id: Ifa2d48c152fd75fc1fff49a05369787a7db3b902 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility: remove redundant role functionFrederik Gladhorn2012-10-272-6/+0
| | | | | | | | The role is already set through the ctor, no need to explicitly do it again. Change-Id: I0027068c66b5771b628a9fe10fbfe929e7bf1554 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Clean up index handling in itemviews accessibility.Frederik Gladhorn2012-10-271-13/+17
| | | | | Change-Id: Icc017c7df9cb0dc4bf17e5168c1e3acda6af7523 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Bring back accessibility for plain text edit.Frederik Gladhorn2012-10-224-10/+119
| | | | | | | | | | This ports 282951bc6c7ddb607fb7ebf61eb8de9acf3da77f aka Change-Id: If0269a49b9fcd1b3e9fcfd32fac912560df28f21 to Qt 5. Change-Id: I46f1d4947d90688b598993f76330e2e10aeca950 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: itemviews check for valid model.Frederik Gladhorn2012-10-191-4/+49
| | | | | | | | | | The problem is that isValid() should return true as soon as we have a view widget. That sadly means we need to verify that the model is still valid whenever accessing it. Change-Id: I9237528abf2f5c75a73382525103307e9ca15f05 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Check that row and column are not less than 0 in indexFromLogicalJosé Millán Soto2012-10-131-1/+1
| | | | | Change-Id: Icf6dbb234513de12c772618a046461b8674b01ce Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QTextBoundaryFinder usage cases in QAccessible2Konstantin Ritt2012-10-131-10/+3
| | | | | | | | | | | Make the implementation safer and closer to what http://www.linuxfoundation.org/collaborate/workgroups/accessibility/ia2/ia2_implementation_guide#boundaries requires us to do. Change-Id: I00af4697e52a9b6e7f5d7b3f403b29126fa1517b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update/fix QTextBoundaryFinder simple usage cases in qtbaseKonstantin Ritt2012-10-131-1/+1
| | | | | | Change-Id: I4d3000558bce86e2de3c32247915868ba18fc8b7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Return if header is 0.Frederik Gladhorn2012-10-041-0/+2
| | | | | | | QT-BUG: 184868 Change-Id: Iff041c66fdfb2267e0349bdd47fec0fe63b1799d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Check for valid model and view in isValid for TableCells.Frederik Gladhorn2012-10-031-2/+3
| | | | | Change-Id: Iadca5503ed2a1d6411d46ed6fe9d5b9a56461a3a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make accessibility debug output optional.Frederik Gladhorn2012-10-031-1/+1
| | | | | | | | | On linux with the new plugin debug output was a bit too generous. Instead use environment var: If QT_DEBUG_ACCESSIBILITY is set, give the full a11y output. Change-Id: I1c9e2078e38799f91468cfc2d9ddcaa36ba4fa03 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Return correct accessible name when a label has rich textJosé Millán Soto2012-09-271-1/+9
| | | | | | | | | | When a QLabel was displaying rich text, the raw html was being returned as accessible name. Now the plain text is returned. Task-number: QTBUG-27302 Change-Id: I169d5eff527a0aef810af11d7712a362148974a5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2213-312/+312
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make QStatusBar text available via accessibility.Tilman Sauerbeck2012-09-192-1/+6
| | | | | | | UNTESTED cause the build fails for me (unrelated to this patch). Change-Id: Ie6836596b6fbaf93baa21d7008509774f1379f5c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Group functions in QAccessibleTextInterfaceJan-Arve Saether2012-08-141-8/+15
| | | | | | | | | | Do the same in QAccessibleTextWidget I got a bit annoyed by this, should hopefully make life easier when forward porting QPlainTextEdit Change-Id: Ib4b90d1892974ea39ecfcbc5cad6ed0694207b58 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Implemented QAccessibleTextWidgetJan-Arve Saether2012-08-142-343/+456
| | | | | | | | | | | | | | | | | | A new class called QAccessibleTextWidget was added. This class should implement all methods of QAccessibleTextInterface and QAccessibleEditableTextInterface which only need a QTextCursor, and it defines two pure virtual methods, to obtain and set the text cursor, so accessible implementations of widgets which use a text cursor can implement these two methods. QAccessibleTextEdit is now a subclass of QAccessibleTextWidget and most of its methods were moved to QAccessibleTextWidget. This is a forward port of ba5d7d608cc31fc63354fd74d85a1bad7780fc45 from Qt 4.8, and is a prerequisite for forward-porting QPlainTextEdit Change-Id: I6093c4fa7e0a77b84de779479c6074db006efec1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Accessibility: fix updates for models with rootIndex set.Frederik Gladhorn2012-07-311-6/+12
| | | | | | | | | | | | | | | The accessible table/list implementation would ignore when a root index is set, resulting in trying to use row/column for the top level index, leading to accessing invalid indexes. (cherry picked from commit def2ee829435c705055733a0f99c0ca44a012c50) Conflicts: src/plugins/accessible/widgets/itemviews.cpp Change-Id: Ic2745ab3e262ccee2d43e0d532e165d2958f519e Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Remove clipboard operations from QAccessibleEditableTextInterfaceJan-Arve Saether2012-07-114-61/+16
| | | | | | | | | | | | | | | | | | Also, remove its subclass QAccessibleSimpleEditableTextInterface Instead of having the subclass that implements this conveniently, we move this behaviour over to the bridge. The bridge should check if role() == EditableText is set, and then it should try to support the IAccessibleEditableText interface (i.e. it should accept the calls to replaceText(), deleteText() and insertText()) and change the text with the following operations: 1. Query the text using QAccessibleTextInterface::text() or by using QAccessibleInterface::text(QAccessible::Value) as a fallback 2. Do the requested delete/insert/replace manipulation 3. Update the text with setText(QAccessible::Value, newText); Change-Id: Iee5e41faf14351951e2bfca8c9eac970a113e878 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Remove the QFactoryInterface dependency from accessible pluginsLars Knoll2012-06-081-83/+0
| | | | | | | QFactoryInterface is not needed anymore and will get removed soon. Change-Id: Ib2806200b1a7f4a45d62e2b556380946ef68f585 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Replace (un)checkAction with toggleAction (3/3)Jan-Arve Saether2012-05-221-15/+6
| | | | | | | | Remove all references to (un)checkAction. This commit finalizes the intended change. Change-Id: I79d3b30b5c3d9fbe276c2c94fed5971bb21d6c02 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-2/+2
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>