summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-292-7/+11
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-282-7/+11
| |\ | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| | * Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * QPdfEnginePrivate: Fix invalid format for rectangles on some localesDmitry Shachnev2013-01-241-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by using locale-independent QByteArray::setNum() instead of qvsnprintf() for printing doubles. Task-number: QTBUG-24949 Change-Id: I68cb192417d9a94f72e039c40f647b4a6826a3b7 Reviewed-by: John Layt <jlayt@kde.org>
* | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2921-84/+0
|/ / | | | | | | | | | | | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-2397-97/+97
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2297-97/+97
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-1897-97/+97
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix comments to use pre C99 standard style insteadPasi Petäjäjärvi2013-01-231-5/+5
|/ / | | | | | | | | | | | | VxWorks compiler fails to compile *.c file with C99 style comments on it Change-Id: Ib5c5ff14006c17f9392b77363232b8b7cc112d34 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-161-0/+2
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Fix warning about missing enumeration value.Friedemann Kleint2013-01-151-0/+2
| | | | | | | | | | Change-Id: If97a325d056282a033cdb4c6e5bdc79eb400c525 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Refactor paint/font-engine shouldDrawCachedGlyphs and supportsTransformationsTor Arne Vestbø2013-01-105-34/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some cruft had built up over time, and this is an attempt at cleaning up the naming and use of these functions, and should not have any behavioral effects. The function supportsTransformations() has been renamed in QPaintEngineEx to reflect its use, which is to decide if QPainter needs to pre-transform the coordinates of the static text before asking the paint-engine to draw it. The new name is requiresPretransformedGlyphPositions(). The OpenGL and CoreGraphics (Mac) paint engines keep their behavior of not needing pre-transformed text, while the raster engine needs this when using cached glyphs. The base-class implementation assumes that all transforms that include a projection will need pre-transform, which is also the case for the raster engine. All decisions in the paint engines about whether or not to use the glyph cache when drawing text are now deferred to the function shouldDrawCachedGlyphs(), which has been refactored for the GL paint engine(s) to share more logic. All implementations call the base class implementation, which ensures that large font sizes will not be cached. The raster engine will in addition ask the font engine whether or not it can produce glyphs for the glyph-cache with the given transform. This is the only remaining instance of the supportsTransformations() function, and will for all font engines except the CoreText engine support affine transformations. The CoreText engine on the other hand only supports translations (for now). Change-Id: I8fb5e43e3de3ef62a526a79a6dfeda7f9546771d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-01-096-4/+27
|\| | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * Rename qt_mips_asm_dsp.h to a "_p.h" headerThiago Macieira2013-01-095-3/+25
| | | | | | | | | | | | | | | | | | | | | | It mustn't be installed and it mustn't be available in the master include. It's an assembler header anyway. Also, take the opportunity to add the "We mean it". Change-Id: Id4233e5bda458714a0d329549afe499d861acc56 Reviewed-by: Adrian Perez de Castro <aperez@igalia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Fix warnings about unused functionsThiago Macieira2013-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator<= and operator>= overloads for QPoint are used only with Q_ASSERT. Clang was correct that they are not used. Even though they are inline, Clang reports the functions as unused because they were inside an anonymous namespace. So take the off the namespace. They are correct for external use, should they be exported by accident (which they aren't now). painting/qpathsimplifier.cpp:76:13: error: unused function 'operator<=' [-Werror,-Wunused-function] inline bool operator <= (const QPoint &a, const QPoint &b) Change-Id: I67415621e777fd0d59cbdede26c34d8bb13f7346 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-044-3/+4
|\| | | | | | | | | | | | | | | | | | | | | 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
| * Fixed invalid memory read in SSSE3 image blending code.Samuel Rødal2012-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | We need to do bounds comparison on the actual offset we're going to use with _mm_load_si128 to read 16 bytes from memory (even though we won't use the trailing bytes in the end). Task-number: QTBUG-28324 Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * QSpanData: use isAffine() instead of rolling your own testVitaliy Kharin2012-12-121-1/+1
| | | | | | | | | | | | | | | | | | QSpanData did not properly check that whether the matrix is an affine transformation or not. Therefore, qt paint engine chose the wrong algorithm for drawing in case of a perpective matrix. Change-Id: If0523bd45e86679a08874713da3fbe33a9852551 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Added url for SVG Color Keyword Names QTBUG-28500Nico Vertriest2012-12-111-1/+1
| | | | | | | | | | Change-Id: I7aaf2cbd9b4bf4e6ff35fa39c5340e3dbc4225ff Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * xcb: notify when the logical DPI changes; add Q_MM_PER_INCH constantShawn Rutledge2012-12-031-0/+1
| | | | | | | | | | Change-Id: I15696bf45ae99cc5b0fd95dab4884fc85cbfc6da Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Mark several template functions as static.Thiago Macieira2013-01-022-4/+4
| | | | | | | | | | | | | | | | There is no reason those function shouldn't be static. This produces no change in code, except that the functions may be better optimised. Change-Id: Ia60b81d4e29a36190a453e8c7c8102c8f547e1a9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-212-3/+3
|/ | | | | | | | | | | | | | ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-014-17/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Change license header from Nokia to DigiaSergio Ahumada2012-11-261-1/+1
| | | | | Change-Id: I2be215284d7670f60f8b5838fce1e6832dde2270 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix transformed text on Mac OS XEskil Abrahamsen Blomfeldt2012-11-231-2/+2
| | | | | | | | | | | | | | | | | In change 1582407fc782c0befd0760633324dd5c206524a1, the Q_WS_MAC code path which disabled drawing cached glyphs for any transform was removed, as was the comment that scaling and rotation wasn't supported by the Mac font engines. This obviously broke transformed text on Mac, so we need to put it back. I put it into the font engine itself where it belongs, and I kept the somewhat confusing naming convention which is used in the paint engine to minimize this patch. I'll clean up these function names in a future commit. Task-number: QTBUG-27362 Change-Id: I4fc6a503eedd4b1ebaf3ee659d948f997f433338 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* qpa: Fix rendering issue in blitter engine (negative scaling factors)Julien Brianceau2012-11-071-1/+5
| | | | | | | | | | | | A 180° rotation results in a TxScale QTransform with negative scaling factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint engine yet, so use software rendering fallback in this case. This rendering issue can be seen when using "-webkit-transform" CSS property in WebKit with DirectFB QPA platform. Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Pixel-align vertical metrics in QTextLayout againEskil Abrahamsen Blomfeldt2012-10-301-1/+4
| | | | | | | | | | | | | | | | | | | To avoid regressing due to de58eb64bc564fcb8af61a45576783e432d2380c, we need to return a pixel aligned height in QTextLine::height() and also use pixel aligned heights when calculating the position of lines as well as the bounding rect of the layout. Later, we can add a QTextLine::naturalHeight() or something like that which gives the fractional value, but until then, we need to access private API in QPainter to get the correct alignment, since we still don't want to align the height of the last line in the layout, we only want to align the origin of each line. Task-number: QTBUG-27740 Change-Id: I12325f07d33aaf1a1b967e0a11492759d0f565d9 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove some dead code in switch statementsSergio Ahumada2012-10-291-1/+0
| | | | | | | | | | Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert hacks in text rendering code pathEskil Abrahamsen Blomfeldt2012-10-252-30/+18
| | | | | | | | | | | | | | There are a lot of hacks here and there in Qt trying to align the text in a correct way which caused regressions to appear once the default coordinate system changed. We need to remove these hacks to get a more consistent and maintainable base. This also fixes the regression introduced by changing the aliased coordinate system. Task-number: QTBUG-27667 Change-Id: I620db2ca23b7ff6c912f3a51e86e7e36bbef81f0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-2211-71/+66
| | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fixed GCC 3.4 build with sse2 enabled.Samuel Rødal2012-10-191-1/+2
| | | | | | | | With minimal effort we can keep the GCC 3.4 build working. Task-number: QTBUG-19803 Change-Id: I31611a27b97d5ac426ea857d8f1b656dc6f5377a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed inconsistent QPainter fill rules for aliased painting.Samuel Rødal2012-10-199-28/+86
| | | | | | | | | | | | | | | | | | | | | | Qt 5 is the time to get rid of all the old inconsistencies in the raster paint engine caused by trying to preserve the old X11 based coordinate system where (0, 0) is in the center of the top-left pixel instead of the upper left corner of said pixel. However, this was only adhered for line drawing and path / rect filling, and not for image or pixmap drawing and not at all when doing antialiased painting. By defining the antialiased coordinate system as being the right one and letting the aliased fill rules follow from that we finally end up with some consistent behavior that doesn't lead to surprises and workarounds in application code. It is still possible for applications to get the old behavior by setting the QPainter::Qt4CompatiblePainting render hint. This should make porting easier for the few cases where an application relies on the aliased fill rules we used to have in Qt 4. Task-number: QTBUG-27500 Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warnings from syncqt.Friedemann Kleint2012-10-131-0/+4
| | | | | | | | Stop processing in internal headers, use correct include syntax. Change-Id: I9dcf1f6f89907986b7b58658be514083f213a3e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed cosmetic line drawing where begin and end points are equal.Samuel Rødal2012-10-111-0/+5
| | | | | | | | | This case has typically required specific work-arounds in other rendering paths as well. Task-number: QTBUG-25153 Change-Id: I217e710a30222792ebca3bf297e438d944c32992 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid warnings about an unreachable codeKonstantin Ritt2012-10-101-4/+1
| | | | | Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* doc: Brush up QPaintEngine documentation for Qt 5Eskil Abrahamsen Blomfeldt2012-10-081-13/+10
| | | | | | | | The paint engine story has changed drastically in Qt 5, and we no longer need the reference to Qt 3. Change-Id: I66090582e5c66d2a3cd9de355c34b33a94b67dfe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* doc: Update Q*PaintDevice docsEskil Abrahamsen Blomfeldt2012-10-082-7/+7
| | | | | | | | | | | | | | | | | | | | | Minor syntax typo in QPagedPaintDevice. Some Qt 5 updates in QPaintDevice (QGuiApplication) and a couple of other changes: 1. Usually, we say an object is "painted" or "drawn" when it is drawn on top of another object (like drawEllipse()) not when it is the destination of the draw commands. To be more consistent I updated the language here. 2. What's commonly called a 32-bit display has 24 bits of color information and eight bits of opacity information. This gives a color count which can be accurately represented by int. To avoid confusion, the exception in the docs for colorCount() has been generalized a little. Change-Id: Iabaaed1f3e4a80e7e14dfd8855da8c3cd8b3012f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* qpa: Fix rendering issue in blitter paint engineJulien Brianceau2012-10-081-4/+5
| | | | | | | | | Take into account brush transformation for TexturePattern fill. Example : arrows are not rendered propery in http://www.youtube.com/leanback website. Change-Id: I5d4bc7410d1d589a27cf17e84062096cfbdb4d6f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement the missing raster operations that were in Qt 3Andy Shaw2012-09-277-9/+173
| | | | | | | | | Although not widely used, the raster operations from Qt 3 were useful and some of them were already implemented, this brings the rest of them back for those who need them. Change-Id: Id538611eaaba9be3d39bf2dd33b6c532f5d4aba8 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-262-3/+2
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Move the fetch and store pixel functions to qdrawhelper.cppThiago Macieira2012-09-242-113/+111
| | | | | | | | | | | | | These functions have begun showing in the tst_symbols unit test as "symbol does not start with q". Since they're never called directly, they're never inlined. Since they were inline, the compiler was probably deciding to not export them. Something changed and it could be anything (new compiler version, new options, etc.). So mark them static. Change-Id: I838dfc94edd7f09c202743bff0daf9d20c10c3a6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22103-2456/+2456
| | | | | | | | 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>
* Fixed outline / fill inconsistencies in raster paint engine.Samuel Rødal2012-09-203-20/+2
| | | | | | | | | | We did coordinate rounding of the fill in the raster paint engine to match how drawLine_midpoint_i rendered lines. With the new cosmetic stroker in 4.8 this rounding is not needed anymore. Task-number: QTBUG-26013 Change-Id: Ibe86fa809276c8e7988d393a67e772d57b9a4799 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed inconsistent rounding of square cap pens.Samuel Rødal2012-09-201-10/+10
| | | | | | | | | | | A horizontal line should round up at the same time as a vertical line with square cap, when rendering at subpixel coordinates. Thus, the special casing in the cosmetic stroker of offsetting by half a pixel should be for flat caps instead of for square caps. Task-number: QTBUG-26013 Change-Id: Ic09249337f814c7de95a17976ec9e651561a744b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* gui/opengl: Fix missing or improper include guard in headersSergio Ahumada2012-09-152-6/+6
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: I29b41e9d33e4ea17165f44c49de0a963574dd809 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-141-1/+1
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qpa: extend drawPixmap capabilitiesJulien Brianceau2012-09-122-9/+56
| | | | | | | | | Extend drawPixmap capabilities for qpa through new ExtendedPixmapCapability QBlittable flag and add related implementation in DirectFB platform. Change-Id: If5436e16bfb37bf081bf864cad73a5e97394df8c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Doc: Fix misc. doc errors and document undocumented functionsaavit2012-09-121-1/+1
| | | | | | Change-Id: I0c1e0a36ee37d5a8f3741f0405f63f9b26967f32 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* qpa: add non-opaque fill supportJulien Brianceau2012-09-112-11/+62
| | | | | | | | | | Add non-opaque fill support for qpa through new QBlittable flag "AlphaFillRectCapability" and add related implementation in DirectFB qpa platform. Change-Id: I863a270e24c96c432489099a34dc1f3a2be52280 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Improved the QBackingStore documentation.Samuel Rødal2012-09-111-1/+14
| | | | | | | | Added links to the example and added some explanation of when QBackingStore might be useful. Change-Id: Iee19c4fdfc5c27ac9b559c9df428d83d302f3928 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>