summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Direct2D QPA: Bump copyright year to match realityLouai Al-Khanji2014-05-0914-14/+14
| | | | | Change-Id: I443b74e3d464285febc28345f35d1445e8102015 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* kms plugin: use first returned mode if no preferred one is presentRolf Eike Beer2014-05-081-2/+6
| | | | | | | | | | The list of returned modes is scanned for the first one marked as preferred, and that is used. If no preferred mode was found then the builtin default mode of 1024x768 is used. Use that builtin mode only if no modes were returned at all, pick the first one if any were returned. Change-Id: Ib355cc92219ced093c605f49dae4e34ff244b639 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* kms plugin: do not needlessly query drm information twiceRolf Eike Beer2014-05-083-16/+8
| | | | | | | | | QKmsDevice already requested the drmModeRes and drmModeConnector information. Simply pass them to the QKmsScreen constructor instead of requesting and freeing them there again. Change-Id: I4897d76d7b13d83297c928b6e10e17ccdfdbd242 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Accessibility Android: Make debug tags consistentFrederik Gladhorn2014-05-081-1/+1
| | | | | Change-Id: I712e64002234d546365b44ca15ae93e8decac882 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Android: text cursor position fixesPaul Olav Tvete2014-05-081-11/+44
| | | | | | | | | | | | | | | | The Android input method protocol specifies that finishComposingText() should not move the cursor. Since Qt likes to move the cursor to the end of the newly committed text, we have to explicitly move the cursor to where the preedit cursor used to be. Fortunately we already keep track of that. Also implement support for the newCursorPosition argument to commitText() since the function needed to be rewritten anyway. (It was calling finishComposingText().) Task-number: QTBUG-38794 Change-Id: Iff2c43bdbd3dda812ccdc71da63f3fa730474eef Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* iOS: Gracefully handle cancelling of subset of active touchesTor Arne Vestbø2014-05-081-11/+25
| | | | | | | | | | | | | | | | | | | | | | | When applying the five-finger pinch gesture, we get a touchesCancelled callback with all five touch points, but the pinch gesture ends when the second to last finger is released from the screen. The last finger will not emit any more touch events, _but_, will contribute to starting another pinch gesture. That second pinch gesture will _not_ trigger a touchesCancelled event when starting, but as each finger is released, and we may get touchesMoved events for the remaining fingers. The event property 'allTouches' contains one less touch point than it should, so this behavior is likely a bug in the iOS system gesture recognizer, but have to take it into account when maintaining the Qt touch state. We do this by assuming that there are no cases where a sub-set of the active touch events are intentionally cancelled, and always clear the list of active touches. Task-number: QTBUG-37304 Change-Id: Icee79978508ecbc6854c0fb55d2da48b99d92f96 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Android: remove the duplicate registration for qt accessibilityLiang Qi2014-05-081-1/+0
| | | | | | Change-Id: I3241138e39b93657aee0564442f22ad0c40328d4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Direct2D QPA: Check Direct2D versionLouai Al-Khanji2014-05-072-2/+135
| | | | | | | | | | | Since we require a relatively recent system, check the version of the direct2d dll on disk and report an error to the user if it is too old. Previously only a cryptic runtime error resulted from a direct2d version that was too old. Change-Id: I6c3955e1a98326fca6bcdc871b0a25291391ba88 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Direct2D QPA: Speed up text renderingLouai Al-Khanji2014-05-072-53/+60
| | | | | | | | | | | | | | | | | | | | After analysing text drawing performance two things seem to take up most of the time. The first is font lookup, the second is QVector initialization. To address the first point a per paint engine instance font cache is introduced. At the moment no mechanism exists to clear this cache and it is unbounded. To address the second point, we simply switch to using QVarLengthArray instead of QVector. In an artificial benchmark that draws text in a tight loop, the first change raised fps from ~70 to ~100. The second change further raised this number to ~115 fps. Change-Id: Iafa25c3e35bc42bd7c1582b0636e721c5193b494 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Accessibility Android: Do not always append roleFrederik Gladhorn2014-05-071-8/+0
| | | | | | Task-number: QTBUG-36584 Change-Id: Id14962a9eb7a6c3ea78cefcfcc053fac886ba8f7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Windows: Use Format_ARGB32_Premultiplied for backing store with alpha.Friedemann Kleint2014-05-061-3/+2
| | | | | | | | | Following the logic in Qt 4's QRasterWindowSurface::setGeometry(). Task-number: QTBUG-30302 Change-Id: Ica571cfd5098e3d9faedefaff0880acfb2209958 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add virtual function to QFontEngine report if outlines are reliableJørgen Lind2014-05-062-0/+26
| | | | | | | | | GetGlyphOutline fails for ttf fonts with embedded bitmaps. This results in distancefield rendering not rendering glyphs (for the failed paths). We need to fall back to texture rendering if this is the case. Change-Id: Ibdf7dc5c1d34f513c436f88fabbdcc4089bb6fef Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Accessibility: Do not report popup for QLineEditFrederik Gladhorn2014-05-061-4/+0
| | | | | | | | | Nothing else seems to report this state and on windows for example it results in NVDA reading subMenu which makes little sense. Task-number: QTBUG-38500 Change-Id: I64820d9f2ea9174034f01da42cb2266a19c19465 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Direct2D QPA: Fix DXGI Factory discovery magicLouai Al-Khanji2014-05-051-1/+1
| | | | | | | | | | | | | | On some Intel configurations the current DXGI discovery breaks. Fix this by adhering to Microsoft's guidelines for discovery of the DXGI factory: http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx Not querying the adapter directly as in the code snippet on the site above seems to have been a typo originally. Change-Id: Ibd7546462cdab7e5ad03db9abc16fe1615b631f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: set orientation update mask to native orientation by defaultAndrew Knight2014-05-051-0/+1
| | | | | | | | This aligns with the other mobile platforms. Task-number: QTBUG-38691 Change-Id: I7b9b70a1182c0e53f997cae111ec46b5161b0b48 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Direct2D QPA: Draw directly to swap chainLouai Al-Khanji2014-05-056-44/+149
| | | | | | | | | | | | | | | | | | | Remove the intermediate pixmap in the backing store and draw directly to the window swap chain. This is faster and reduces memory pressure on the graphics card. In case of native child widgets we need to read back the back buffer, which incurs an extra copy in this case. In an artificial benchmark drawing animated full screen gradients as fast as possible this patch increases performance by 42% on my current machine from 480fps to around 680fps, i.e. the time for actually getting the pixels to the screen is now lower. Change-Id: Ifbeda0e199afec03cecfe76337679a9e9d082bdd Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-039-15/+52
|\ | | | | | | | | | | | | Manually fixed up: isES -> isOpenGLES src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
| * Cocoa QPA Menu: Clear menu items' Cocoa ancestor on destructionGabriel de Dietrich2014-05-022-0/+6
| | | | | | | | | | | | | | | | Valid for both the item and the menu destructions. Task-number: QTBUG-38685 Change-Id: I024b93c8bb8facefeaad5e8b6c7be6bf049898ea Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * printsupport: only build cocoa backend for OS XRichard Moe Gustavsen2014-04-301-1/+1
| | | | | | | | | | | | | | | | Cocoa is not available on iOS, so the plugin should not be built. But recent build system changes exposed that we did. Change-Id: I000d54b330a075abb8f4a8b28a970bb5b5edfeb5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * QCocoaPrintDevice: Compile on Mac OS 10.6Morten Johan Sørvig2014-04-291-0/+4
| | | | | | | | | | | | | | MAXPATHLEN is not defined, use PATH_MAX. Change-Id: I5a8febce66584c15bdfe81df64fe3f1954972a47 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * iOS: Send updated expose events on application background/foregroundingTor Arne Vestbø2014-04-282-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application has background processing enabled, for example for communicating with an external accessory or getting location updates, it might trigger code that does UI updates, which will kill the app as doing UI in the background is not allowed on iOS. We guard against this by propagating the backgrounding as updated expose events with a non-exposed region and isExposed() returning false. This means clients who correctly use QWindow::isExposed() to guard their drawing code (including the scene-graph), will live to see another day. Task-number: QTBUG-36956 Change-Id: Ib708394d33093affe68c9f2c7abde7e54be5ec74 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Revert "Mac: fix bugs for font selection in QFontDialog"Liang Qi2014-04-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3c09f6bc9aee0c97427fe8da6efdc73b4ac473aa. After fbaa6d3ca6fc2693c5c8a1cd8e565803adc97730, OS X/iOS no longer uses localized font names. Task-number: QTBUG-38548 Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: Id7f7e1976e4ffc30c5c18cf57e2acb3aebafc301 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * centralize auxiliary lib creationOswald Buddenhagen2014-04-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | this covers convenience libraries which are linked into dlls (if we are not building statically) and "proper" (installed) builds of 3rdparty code. Change-Id: I2f00248c0baa0e73346e477724bf49bbc62ba925 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * iOS: Send application state changes synchronouslyTor Arne Vestbø2014-04-281-0/+1
| | | | | | | | | | | | | | | | The user might have a limited time to react when the application is suspended, so we need to send the event as soon as possible. Change-Id: Ib6c342f5426cf15e36ba4ef57edf30878f86d1c9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2014-05-0226-62/+243
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-0126-62/+243
| |\| | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * Cocoa: Fix crash on Combobox popup close.Morten Johan Sørvig2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression caused by 0be1c4899c. The calls to handleCloseEvent/flushWindowSystemEvents may result in popup window deletion and a stale/null pointer access. Get the window type before closing it. Task-number: QTBUG-38418 Change-Id: I212a56979e0248076e1eb5bf9ede1ff0d424e041 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Use runtime detection of XInput 2.1 to disable legacy wheel eventsAllan Sandfeld Jensen2014-04-254-13/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure we fall back to using wheel button events if xinput 2.1 scroll events are not available. Handles lack of xinput 2.1 support in the server or in the input devices drivers. Task-number: QTBUG-38169 Change-Id: Ie4ad9069f648d0ab02d8f9540ed01ad58fd9e9d8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Rename new QOpenGLContext APIsLaszlo Agocs2014-04-253-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isES() becomes isOpenGLES(). The library type enums are changed DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now unnecessary version number, the confusing "desktop" term and provides better readability. The old function/values are kept until the related qtdeclarative changes are integrated. Task-number: QTBUG-38564 Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Cocoa: Make Qt::Tool windows hide on deactivateMorten Johan Sørvig2014-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from 5.1. Task-number: QTBUG-37706 Change-Id: Ib28eead869dde37ded37397a89a94b67fb150cca Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| | * Android input method fixes for SwiftKeyPaul Olav Tvete2014-04-252-41/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try to conform to the input method protocol in the way that SwiftKey expects (and the way that the stock android components actually do). * Refactor cursor position logic * fix getExtractedText() so it includes preedit text * ignore the hintMaxChars parameter to getExtractedText(), since it looks like everybody else does * fix setComposingRegion when preedit is active * track the start of the preedit and the preedit cursor position, since the Qt input method query does not give us this information Change-Id: I2ed8797abacd97ca749ca152fab2a2d5446ef603 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * deprecate import_qpa_plugin and qpa_minimal_pluginOswald Buddenhagen2014-04-2415-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | they have been fully superseded by 4255ba40ab073afcf2a095b135883612859af4c2. Change-Id: If7ac14c8b7d3cf00fb0cb916036b62eb86c9cee0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Direct2D QPA: Add handlers for individual primitivesLouai Al-Khanji2014-05-012-21/+269
|/ / | | | | | | | | | | | | | | | | | | | | Directly handling primitives is faster than using the catch-all fill function which converts arbitrary paths into a direct2d geometry. So do so. Change-Id: I71ce73dbe75aa9b61e741c358d8787d0ea48ee46 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Direct2D QPA: Pixel-align aliased drawingLouai Al-Khanji2014-04-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Aliased drawing has so far not been perfectly pixel aligned, resulting in less than stellar output in some instances. Although a little hacky, adding 0.5 to all coordinates when in aliased mode fixes things up nicely. There doesn't appear to be a better way to get d2d to cooperate as we would like it to. Change-Id: I10ee494d2f576bfd0eca6d4429095a3726c0bf14 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | iOS: scroll screen after hiding keyboard programaticallyRichard Moe Gustavsen2014-04-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | When the keyboard is told to hide, we resign first responder. If this is done programatically on touch press, this will make the "hide keyboard gesture" receive a touchesCancelled instead of a touchesEnded. Since we didn't catch this from before, the gesture was left in a mixed state causing the screen not to scroll when later showing the keyboard. Change-Id: I70ed59710128a912097cd5bfbdd8f49b20b7934c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Direct2D QPA: Correctly set active state in paint engineLouai Al-Khanji2014-04-291-0/+1
| | | | | | | | | | | | Change-Id: I4eea073ad11ba8684212258b344c1f237598a9c5 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Direct2D QPA: Speed up widget paintingLouai Al-Khanji2014-04-292-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | By only starting/ending drawing once in the backing store, we can avoid multiple start/ends and thus flushes of the direct2d device context. This can potentially be much faster with some drivers when many widgets that draw to the same backing store need to redraw. Because starts/ends of QWindowsDirect2DDeviceContext are already refcounted this works out of the box. Change-Id: Ib48edceef6a1041ae0509587c77ac0caa8b29fc6 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add press action to QAccessibleComboboxFrederik Gladhorn2014-04-281-3/+3
| | | | | | | | | | | | | | | | VoiceOver expects press to open the combobox. Task-number: QTBUG-37922 Change-Id: Iee7b7974db097e4e2444202c703bd587e1576fe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Fix build error when targeting Blackberry PlaybookThomas Perl2014-04-251-0/+2
| | | | | | | | | | | | | | | | | | The emitSignals() slot is only implemented/used in the file qqnxfiledialoghelper_bb10.cpp, not in <...>_playbook.cpp. Change-Id: I068e843be74ec9639d889b87caa016c8506ec905 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | QNX: Do not crash if physical screen size is not setFabian Bumberger2014-04-251-5/+5
| | | | | | | | | | | | | | | | | | | | If the QQNX_PHYSICAL_SCREEN_SIZE is not set or set incorrectly the application exits with a qFatal. This patch replaces the qFatal with a qWarning and sets the physical screen size to 15cm x 9cm. Change-Id: I9e1a36414289c9e9676ef550eac5c1d7be974553 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Windows: Reject focus-in caused by reparenting Windows.Friedemann Kleint2014-04-251-0/+9
| | | | | | | | | | | | | | | | | | Calling WinAPI SetParent() causes the window to be activated, which is not desired for native child widgets. Task-number: QTBUG-32867 Change-Id: Idf61931bc425a043a4b7a98eec9ae122e234dc37 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | QNX: Don't create a platform window for a desktop widgetFabian Bumberger2014-04-253-6/+16
| | | | | | | | | | | | | | | | | | | | As I understand it the QDesktopWidget does only serve the purpose of returning the screen size and number. It does not need a real platform window. This removes some overhead, because a desktop widget is always created. Change-Id: I8c0d86bbb46b1f32094fda1592df795af6bb423f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Accessibility Mac: implement min/max valueFrederik Gladhorn2014-04-251-0/+25
| | | | | | | | | | | | | | | | | | This commit fixes QProgressBar reading by VoiceOver. Task-number: QTBUG-38272 Change-Id: I549fbebe1aff599e53b14685c1bde6c9fb98aa21 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Accessibility Mac: Make value interface settableFrederik Gladhorn2014-04-251-0/+14
| | | | | | | | | | | | | | | | | | | | This will let VoiceOver announce QLineEdit as editable text. It also implements setting of values for value interfaces (eg sliders). Task-number: QTBUG-38258 Change-Id: Ic30c10abc4dc0c4f3c5fe922ac5b0a4bbf4b1e5f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Accessibility Mac: Fix reading of empty lines in text editFrederik Gladhorn2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | startOffset is already one char past the newline. By adding +1 we would skip one newline if the text was \n\n. Task-number: QTBUG-38257 Change-Id: Ida49a4b690bfa71f134e9be46126f418783a3c97 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Windows: Add missing colors to tooltip palette.Friedemann Kleint2014-04-251-1/+5
| | | | | | | | | | | | Task-number: QTBUG-38183 Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Jani Heikkinen2014-04-2514-31/+111
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-2314-31/+111
| |\| | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | * Windows printer support: Fix linking problem when built with -no-opengl .Friedemann Kleint2014-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add missing libraries that were otherwise pulled in by opengl.prf. Task-number: QTBUG-38431 Change-Id: I1705d432088a47b5a202595e818e9efcd5f6a4cf Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * WinRT: Handle back button as press or releaseAndrew Knight2014-04-221-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, only the back press was checked for acceptance. By also checking the release event, this makes the backstepping behavior consistent with Qt for Android, and fixes the expected behavior found in our demo applications. Task-number: QTBUG-35951 Change-Id: I9c2f18816b838d57713ba4dd3624e2f3f1ac40ac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>