summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidjniaccessibility.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Android A11Y: Fix deadlock in QtAndroidAccessibility::runInObjectContext()Mike Achtelik2022-07-051-1/+7
| | | | | | | | | | | | | | | | | | | On android the event loop is normally blocked, when the application is suspended, e.g. when it enters the background or when the screen is locked (see android.app.background_running). This leads to a problem when we try to process events after this happens, e.g. when android sends us an ACTION_CLEAR_ACCESSIBILITY_FOCUS event after the event loop is suspended. While handling it we eventually call QtAndroidAccessibility::runInObjectContext() which tries to do a blocking call on the object context, however, with the event loop being suspended we run into a deadlock which leads to an ANR. So we need to make sure to never make a blocking call while the event loop is suspended. Task-number: QTBUG-102594 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I33f0440a3da84fb4bdae5ab0fc10d514c73f23ad Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Android A11Y: handle LocationChanged event only for focused elementIvan Solovev2022-05-161-2/+2
| | | | | | | | | | | | | | | | | | LocationChanged event unconditionally triggered invalidateVirtualViewId call. That call results in TYPE_WINDOW_CONTENT_CHANGED Android event, which causes a lot of background processing. That is not correct, because LocationChanged event is generated by every accessible element, not only the one that has A11Y focus. This patch checks event->uniqueId(), and processes only events that come from the focused accessible element. Done-with: Mike Achtelik <mike.achtelik@gmail.com> Task-number: QTBUG-102594 Pick-to: 6.3 6.2 5.15 Change-Id: I6b941733c9d215fed5ee5a7aeeb5be234add9ebe Reviewed-by: Mike Achtelik <mike.achtelik@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Android: fix A11Y object descriptionIvan Solovev2022-04-211-4/+7
| | | | | | | | | | | | | | | | | This patch amends a374d59abc415eee1866322176b7762158f48abd. That commit introduced refactoring of A11Y object description announcements that also took a value into account. However for the elements without values (like QPushButton), an unused space is added at the end of the description. This patch fixes the issue by explicitly checking that the value interface exists and that the value string is not empty. Fixes: QTBUG-102744 Pick-to: 6.3 6.2 5.15 Change-Id: Ic1ba50859fb91c871c242189967dcce35723a0b2 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Replace uses of _qs with _s in sources and examplesSona Kurazyan2022-04-191-2/+4
| | | | | | Task-number: QTBUG-101408 Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix crash in tst_qmltc_examples on AndroidAndreas Buhr2022-04-081-1/+1
| | | | | | | | | | | | | | | tst_qmltc_examples failed because m_accessibilityContext could become a dangling pointer if the object in points to gets deleted. This resulted in a crash. Amends e0c61193ea8f6462192d2ef7f1d48d8fa3e38c99. Task-number: QTBUG-101865 Task-number: QTBUG-95764 Pick-to: 6.3 6.2 5.15 Change-Id: Ie85118429b1afa6e4a41f899ca065f493e166570 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android A11Y: Add supported role infos to A11yNodeInfoMike Achtelik2022-03-281-1/+9
| | | | | | | | | | This allows the screen reader to pick up on them and give additional info e.g. that text links which are now added automatically since QTBUG-67878 are clickable. Pick-to: 6.3 6.2 5.15 Change-Id: I96d8dd628d10b26b4c9ffee15dfa01a9abef61b1 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android A11Y: Fix value roundingIvan Solovev2022-02-151-2/+44
| | | | | | | | | | | | | | | | | | | | | | | QAccessibleInterface stores values as QVariants. When dealing with double values, as a result of some calculation (for example, Slider value update), rounding errors can be introduced. When converting double values to QString using QVariant::toString(), these rounding errors result in strings like 0.30000000000000004 instead of 0.3 or 2.7755575615628914e-17 instead of 0.3 - 3 * 0.1 and similar zeroes. To fix this issue, this patch introduces a custom conversion for floating-point values. The idea is to convert QVariant to double, and then convert double to QString using 'f' format and a suitable precision, determined from the UI element's minimumStepSize(), if it has one, otherwise falling back to QString::number()'s default (which is 6). Task-number: QTBUG-93396 Pick-to: 6.3 6.2 5.15 Change-Id: Ia5ca7345812e39629e9c191b6d8b896a8f51de80 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android A11Y: Announce value together with element name when focusedIvan Solovev2022-02-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch when we focus a new element, only its description was announced. For elements like Slider that means that if it had no accessible name or description, its value would be announced (all is fine here). But if the slider is defined like that: Slider { Accessible.name: "int slider" value: 5 from: 0 to: 20 stepSize: 1 } only the name ("int slider") will be announced, but not the actual value. This patch fixes the logic of content description generation. If the element has value, then it is added to the description and announced as well. Task-number: QTBUG-93396 Pick-to: 6.3 6.2 5.15 Change-Id: Ia8667149ebd867945c5f57d951fd6ade0f382598 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android A11Y: handle valueChanged eventsIvan Solovev2022-02-151-3/+30
| | | | | | | | | | | | | | | | | | | | | Before this patch Android A11Y implementation was missing ValueChanged event handling. As a result, no update was given when the element's value was changed. Handling these events allows us to announce value changes on such objects like Slider, SpinBox, etc... This is a universal method of value-change announcement, so it supports all sorts of A11Y gestures. On the Java side a new function was introduced to announce the values, because we need to use the actual element's *value*, not its accessible name or description. Task-number: QTBUG-93396 Pick-to: 6.3 6.2 5.15 Change-Id: Ic44abd5f01b9b6f5468962131466edaf6a49d498 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Android A11Y: execute C++ code on main Qt threadIvan Solovev2022-02-091-47/+181
| | | | | | | | | | | | | | | | | | | | | | The C++ code, which is called from Java, was executed on Java thread. However Qt has its own main GUI thread, where all GUI elements and their accessibility instances are created. As a result we have threading issues when accessing A11Y objects from Java thread. This patch uses QMetaObject::invokeMethod calls to dispatch all the critical parts of the C++ code to the main thread. It uses BlockingQueuedConnection, so that Java thread can still use these methods synchronously. The proper context is based on the m_accessibilityContext object, which is created as a child of the base accessibility QObject of the application (which is the QGuiApplication instance in most cases). Task-number: QTBUG-95764 Pick-to: 6.3 6.2 5.15 Change-Id: Iff4f3f2645657f6aca426fa19ccc86a2cbe4d4d0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
* Android: extract parentId for hidden object in advanceIvan Solovev2022-02-091-1/+5
| | | | | | | | | | | | | | | | | | This commit amends 850a7f1238e84b6960a84e12687e40cf939a44d9. We can't extract the parentId for the hidden object on Java side, because the Java call is executed in a separate thread, so the original hidden object can be destroyed somewhere in the middle of parentId() call. As a workaround, we get the parentId in advance, on C++ side, and pass it as a parameter to JNI function. Task-number: QTBUG-95764 Pick-to: 6.3 6.2 5.15 Change-Id: Ied2ab4ab39b947f3f582575cf77cc76fbac9e274 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Make QJniObject and QJniEnvironment public APIAssam Boudjelthia2021-01-271-6/+4
| | | | | | | | | | | | | | | | | | | | As part of Qt 6 restructring for the extras modules, this change exposes the Jni APIs which are very important for Android platform. This patch adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based from private QtCore and QtAndroidExtras. The Jni interface is cross-platform which justifies the name, but currently, this API is used mainly for Android, and the naming comes generic without Android keyword to avoid any future limitation on supporting other platforms. [ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and QJniExceptionCleaner APIs. Task-number: QTBUG-89482 Fixes: QTBUG-89633 Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: Qml accessibility fixesPiotr Mikolajczyk2020-12-081-10/+49
| | | | | | | | | | | | | | | | | | - Accessibility focus can follow the position of the widget (for example when swiping on a scrollview) - controls are clickable directly after appearing on the screen after scroll (previously you had to click somewhere else on the screen, and after that you could focus the newly appeared control) - checkbox and switch react correctly on click action - fixed combobox behavior with accessibility enabled Task-number: QTBUG-79611 Pick-to: 6.0 5.15 Change-Id: If36914ab0165f33593e68fd7ecf168693f8538a7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-2/+2
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android: rename Android's package name for Qt 6Assam Boudjelthia2020-10-031-1/+1
| | | | | | | | | | Rename Android package name org.qtproject.qt5.android to org.qtproject.qt.android to avoid inconsistency with Qt 6 name. Also, we include the major version number in the jar target. Task-number: QTBUG-86969 Change-Id: Ibb68947289be1079911b34ea157bf089cc52c47f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Fix android accessibility not being set activeVikke Matikainen2020-06-211-1/+9
| | | | | | | | | | | | | | Android platform event of activating accessibility might be received, before the platform plugin is initialized, thus disregarding the activation step. This change saves the activation event state and defers setting it in platform integration. Fixes: QTBUG-77320 Pick-to: 5.15 5.12 Change-Id: I06aab76159d1de0e72c0c535dbe80c2858f8e79b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move QtAccessibilitySupport into QtGuiTor Arne Vestbø2020-06-021-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Set minimum supported version to android-21Eskil Abrahamsen Blomfeldt2019-01-231-4/+1
| | | | | | | | | | | | | | | | | | With the current distribution, this is 90% of active devices, and it was released in 2014. Qt 5.12 is LTS and will continue to support older Android versions for a long time to come. This is to reduce the testing needed on outdated platforms and allow ourselves to use some newer APIs unconditionally in Qt. Android 21 was chosen because it is the minimum version that supports 64 bit builds. [ChangeLog][Android] Increased the minimum supported Android version to Android 5.0 (API level 21). Fixes: QTBUG-70508 Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Reserve space for the QVarLengthArray, so we can use appendAndy Shaw2017-12-051-1/+2
| | | | | | | | | | When the QVarLengthArray was initialized with a size then append would add to the end of that. Therefore we need to use reserve to get the desired effect. Task-number: QTBUG-64905 Change-Id: Ia1ebeb26cd31bc5e92bd7f81079506a266b845bf Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Refactor childIdListForAccessibleObjectJan Arve Sæther2017-10-251-7/+7
| | | | | | | | | | | | | | | | | | | It has several problems: 1. It could potentially create an intArray with uninitialized elements. This could happen because the index for getting interfaces were the same as the storage index. This was not correct, because they could diverge if iface->child() returned an invalid interface. 2. The count of accessible child elements could change while iterating. This could cause out-of-bounds condition when calling SetIntArrayRegion as described in QTBUG-45855. Instead now, we call SetIntArrayRegion only once, after we have gathered all the child interface ids. Task-number: QTBUG-45855 Change-Id: I77e813158df5f563d04931ac4e296e3fc2a16e67 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Android Accessibility: protect from accessing invalid interfacesFrederik Gladhorn2017-10-171-8/+12
| | | | | | | | | | | I am not sure if this is going to help, but it is required that the bridge checks that the interfaces it accesses are valid, since that protects from accessing them when they are in the destructor. This should be done, whether it fixes the issue or not. Task-number: QTBUG-45855 Change-Id: I2b96999ca4043f8b33607c864d1d178695d03192 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Android: Add lock to protect access to the platform interfaceChristian Stromme2017-07-031-0/+1
| | | | | | | | | | Fixes dubious lock protecting the platform interface handle, and makes sure that we lock and hold a valid reference to the platform interface before accessing it. Since the platform interface is exposed we also need to expose the mutex protecting it. Change-Id: I1ec1219a75c589bc793676369b11fb403de20102 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Fix Accessibility items positioning with QHighDpi enabledKonstantin Ritt2017-03-161-3/+6
| | | | | | | the View's position and metrics are in pixels, not points Change-Id: I285d5378db98187f54019bff9b8a1cde05dc3b35 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: remove unused variableBogDan Vatra2016-12-091-1/+0
| | | | | | | Fix compilation with -Werror Change-Id: Iae6068f9eeb92dd1a96b11f6bb7017b97a8486fb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-151-1/+1
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Android: Remove support for API < 16BogDan Vatra2015-12-101-7/+0
| | | | | | | | | Starting with Qt 5.7 we removed support for API < 16 (Android v4.1) [ChangeLog][Android] Support for Android API < 16 was removed. Change-Id: I8bf396a9d70ab0996965e0c9f629800aa1fa6a45 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Delay initialization of Accessibility.Christian Strømme2015-06-091-0/+10
| | | | | | | | | | | | | The accessibility class was created and activated in onCreate(), which meant we where trying to activate accessibility before the platform plugin was properly initialized. With this change we will also activate, or deactivate, accessibility in Qt whenever the state is changed by Android, compared to doing it at start-up only. Task-number: QTBUG-46355 Change-Id: I5cbae125df43f7694d4464d5054e6cfec4626e26 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Consolidate how contentDescription is calculated.Jan Arve Saether2014-10-151-10/+18
| | | | | | | | | | | | | | | | | | Previously, the behavior was different depending on if the contentDescription was calculated as a result of an event, or if it was calculated as a result of hierarchy traversal. Refactor the functionality into one single function that will be used in both scenarios. 'contentDescription' will now receive its value from one of the following sources, listed in prioritised order (QAI == QAccessibleInterface): 1. QAI::text(QAccessible::Name) 2. QAI::text(QAccessible::Description) 3. QAI::text(QAccessible::Value) 4. QAI::valueInterface()->currentValue() Change-Id: I2e4958a1e95b5f20d01da37c23ecbc09842360bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-3/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Android: Fix namespace usageChristian Strømme2014-06-301-0/+4
| | | | | | | | | | | | | | This change makes it possible to set a Qt namespace for Android builds. Change-Id: I79f4ae8200223f36f97e2849aae49e45b8850d23 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Make sure we run gracefully below API level 18Jan Arve Saether2014-06-101-3/+10
| | | | | | | | | | | | | | Task-number: QTBUG-39508 Change-Id: I023ba7c50de5c95a5514658797125e22016a6543 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Accessibility: Add actions for value interfacesJan Arve Saether2014-06-201-10/+38
|/ | | | | | | | | | | To support increment / decrement of sliders, dials and spin boxes. (anything with an {in,de}crementAction or a valueInterface. Other platforms will follow the same pattern in follow-up patches. Task-number: QTBUG-38832 Change-Id: Ie570acc39b3d9494a8bb9f624b61a398b1d8de89 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Do not resolve the java functions for each callJan Arve Saether2014-05-301-21/+41
| | | | | | | | Instead do it only once (in registerNatives). This is seems to be the preferred way of doing it in other parts of the platform plugin. Change-Id: I361a7862bb5a24b4024c7c6a30ecb14fc515d4ff Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility Android: Fix statesFrederik Gladhorn2014-05-161-6/+5
| | | | | | | | | | | | Using the bit flags as parameters to the JNI functions would fail since they'd always be cast to false instead of the c-style casts. This fixes checkboxes reporting themselves as checkable and their check state. Task-number: QTBUG-38831 Change-Id: I30ab63ceabbec4cc2fbda9475e05523d915087fe Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Android: Fix crash for invalid interfacesFrederik Gladhorn2014-05-131-4/+6
| | | | | | | | | | | When asked for an accessibility interface with invalid ID we still return an AccessibilityNodeInfo. But instead of setting that interfaces' ID to the invalid ID, rather return one with no ID set so it will simply fall back to the view. Task-number: QTBUG-38829 Change-Id: If66f5b1b42ba46949d94a547050c7a2cfc7ee9b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@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>
* 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>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+272
Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>