summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* OpenGL: Add QOpenGLVertexArrayObject classSean Harmer2013-02-283-2/+586
| | | | | | | | | | This class makes it much simpler to manage OpenGL state relating to vertex data (i.e. vertex buffer objects, vertex attribute divisors, index buffer objects, vertex buffer formats). Change-Id: I9fb932cc3f0691ec9ba065bf871e43cd2e369bad Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* OpenGL: Reinstate support for OpenGL geometry shadersSean Harmer2013-02-283-4/+58
| | | | | | | | | Unlike QGLShader, this requires the OpenGL 3.2 core implementation of geometry shaders to keep the API simple. Change-Id: Icb07f430c4c5b5d950bcf6f7119becec4cfaad8a Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Allow flushing window system events from other threadEskil Abrahamsen Blomfeldt2013-02-284-2/+36
| | | | | | | | | | | For platform plugins such as the Android plugin, we need to make sure an event is delivered and handled before continuing execution (e.g. when doing an expose event to report that the EGL surface has been destroyed when the app goes into the background.) Change-Id: Ibd381baafa93f111dbc887d4cf9d9ca37429b186 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* EGLFS: Enablers for Android pluginEskil Abrahamsen Blomfeldt2013-02-287-51/+78
| | | | | | | | These are some changes that are needed to make the Android plugin as a subclass of the EGLFS plugin. Change-Id: I7c77931f311d8a07f9292715d2abc256c5d552d8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* PSQL: lastInsertId without OID on tableIsrael Lins2013-02-281-1/+6
| | | | | | | | | | | | Make lastInsertID work for tables without OIDs. The use of OID in tables is now deprecated in PostgeSQL and lastval() is now provided. http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.html#GUC-DEFAULT-WITH-OIDS Change-Id: I01dfdd7a2aab8826487657f691fea3c9268c16b2 Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QT_MESSAGE_OUTPUT: add support for condition depending on the typeOlivier Goffart2013-02-271-16/+71
| | | | | | | | | | | | | | | | | The motivation is to enable coloration the way KDE currently does. It can now be achieved with a QT_MESSAGE_OUTPUT set to "%{appname}(%{category}) \033[31m%{if-debug}\033[34m%{endif}%{function}\033[0m: %{message}" I was thinking about supporting directly color using something like %{begin-category-color} that would be smart and detect if we are running on a terminal, but it would be less flexible in the way the colors van be configured. Changelog: QT_MESSAGE_OUTPUT can contain conditionals based on the type of the message Change-Id: Icd8de04734a94a3afcbf542a5b78b290a1914960 Reviewed-by: David Faure (KDE) <faure@kde.org>
* ODBC: implementation of lastInsertId()Israel Lins2013-02-272-1/+38
| | | | | | | Implemented lastInsertId() for some ODBC compatible databases. Change-Id: I0b75a8e68369af39e258e4761b384767ab8a371e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Export QAbstractFileEngine[XXXX] classes.BogDan Vatra2013-02-271-3/+3
| | | | | | | | We still need them for Android assets implementation. Change-Id: I12bb809c05ac88f3c4a7d6796692b4dc3987027c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Style fixes for android enablersPaul Olav Tvete2013-02-272-3/+3
| | | | | Change-Id: I0b942865c29f4bdf29f0e7f56af0d620acbc39c6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix compile on AndroidBogDan Vatra2013-02-271-2/+2
| | | | | | | This is a workaround for a broken compiler Change-Id: I10c8c750caf56036419807ec4a2439bf14cf64d6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update the display to reflect changes by input methodPaul Olav Tvete2013-02-271-1/+2
| | | | | | | Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Change-Id: If3804f2a514ba4635f841de6377f2b328a4e928a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Cocoa: Remove qt_mac_toCGImage warningsGabriel de Dietrich2013-02-271-2/+4
| | | | | | | | We got these because we were flushing the backing store with a null QImage. Change-Id: I372cb3fc7c82d3bdcfe735fcadfa72806d0ef39b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add ISO 8859-11 as an alias for TIS-620David Faure2013-02-271-1/+2
| | | | | | | | | | | (qsimplecodec.cpp says so, but is unused when ICU is used) ISO 8859-16 is still missing though... Change-Id: Idbccedd7bad63f9788cec2f7fc1bbfcb7a891acc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Enablers for input methods on AndroidPaul Olav Tvete2013-02-274-0/+32
| | | | | | | | | | | | Adding QInputMethod::inputItemRectangle()/setInputItemRectangle(). Known bugs: inputItemRectangle() not implemented for graphics view items; inputItemTransform() implementation was already missing. Change-Id: I72b1d43350e93858a2b374de3f2199500a96dc79 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix thumb armv5 atomicsBogDan Vatra2013-02-271-0/+8
| | | | | | Change-Id: Ie9f98e5f5a08908d9d99e04bdc95fd506cc4a51e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add multi-line input method hintPaul Olav Tvete2013-02-273-1/+5
| | | | | | | | Enabler for input on Android. Change-Id: I44670b95b35f773814125c5d35c67e9713567813 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Introduced QWindow::setMask() to expose existing platform functionality.Samuel Rødal2013-02-273-0/+37
| | | | | | | Task-number: QTBUG-28555 Change-Id: I2c649b6d9e9dc69be246cb7658b3edbe9682b1bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix some warnings that have crept up since I last fixed warningsThiago Macieira2013-02-274-4/+4
| | | | | | | | | | | | 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>
* Make sure that the reference count for plugins is kept correctlyThiago Macieira2013-02-272-5/+6
| | | | | | | | | | | | | | | | | | | | For systems where the Unix signature checker isn't enabled (read: Mac and Windows), QPluginLoader must actually load the plugin to query for the metadata. On Mac it even tried to keep the library loaded to avoid unloading and reloading again when the user calls load(). However, that plus the fact that it was calling load_sys() (on Mac) meant that it would bypass the reference count checking. And on all Unix, if a library-that-wasnt-a-plugin was already loaded by way of a QLibrary, it would have an effect of unloading said library. So remove the "caching" of the library. We should instead invest time to write a proper Mach-O binary decoder. Task-number: QTBUG-29776 Change-Id: Iebbddabe60047aafedeced21f26a170f59656757 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Don't try to unload a library that isn't loadedThiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | | | Both QPluginLoader::unload() and QLibrary::unload() protect against that (they have a "did_load" member), but QFactoryLoaderPrivate's destructor doesn't. In the past (Qt4) all plugins had to be loaded anyway, so there was no mistake in the reference counting. With Qt 5, we don't load plugins unless they're actually used (in QFactoryLoader::instance). Task-number: QTBUG-29773 Change-Id: I3278fa14bac7e26a9faaf999b4e42e950654ac9a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Stop using function deprecated in D-Bus 1.2 (raise minimum version)Thiago Macieira2013-02-272-4/+4
| | | | | | | | | | | | | | | | The dbus_watch_get_fd function was deprecated in D-Bus 1.2 (technically, in 1.1.1, but that was a development release) because it had a bad name. Sockets on Windows have file descriptors, but they are not shared from the same pool as the CRT library's file descriptors. This commit raises the minimum required version of D-Bus to 1.2. This is the first requirement raise since this code was introduced in 2006. For some reason, the D-Bus 1.2.0 release seems to be missing, but 1.2.1 was released on 04-Apr-2008. That's ancient enough for all distributions Qt 5 is supposed to run on. Change-Id: Ia6bbc137fffbb27c77290ed3e32d3380f0ae3c54 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Fix QString::toUcs4() returns incorrectly resized QVectorKonstantin Ritt2013-02-271-7/+8
| | | | | | | | | ...when the string contains surrogate code points. Task-number: QTBUG-25536 Change-Id: I07251fee641c14f33175678768ddbe551dbe2bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWin32PrintEngine: Fix build on MinGW + avoid dummy allocationsKonstantin Ritt2013-02-261-6/+14
| | | | | | | | | Don't use wcscpy_s() which is not available on MinGW but determine the utf-16 string length and pass that value to QString::fromWCharArray() instead. Change-Id: I45d1b1969fe03255fdb6353fa9f52417af530e40 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* EGLFS: Replace the global static 'hooks' variable with a functionThiago Macieira2013-02-266-24/+25
| | | | | | | | | | | | | | Having a global static variable in a header is a poor choice to start with. All .cpp including that header must use that variable or the compiler will warn of an unused static. Second, for the case of platform hooks, it's possible that it is reading the value of a variable that isn't initialised yet. Change-Id: Id823c2be9cfededb9c31fb76a9080d4122577ca4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* ODBC: improve detection of DBMSIsrael Lins2013-02-261-11/+19
| | | | | Change-Id: Ia93c3adb54fd28e290ff6fc85cb98138514885f1 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* make static function a class memberMark Brand2013-02-261-7/+8
| | | | | Change-Id: I8c18c746185f6b7530ed985f4d482a1c9073fb10 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* rename private driver to privDriverMark Brand2013-02-261-12/+12
| | | | | | | | This avoids confusion now with the actual driver and avoids a name collision in later refactoring. Change-Id: I83055213f3a7b7998640662d49ba33749fdadd18 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* qpsql: simplify expressionMark Brand2013-02-261-1/+1
| | | | | Change-Id: I1cff816ca5e8f683015186a2b5815e564ad454e6 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Add a new static lib and module for OpenGL extensionsSean Harmer2013-02-264-1/+27198
| | | | | | | | | | | | | | | | The complete set of OpenGL extensions is large meaning that any attempt to incorporate them into a shared library such as QtGui would bloat the size of that library. The typical usage pattern for OpenGL extensions is to use only a very small number of extensions from the total available set. A static library suits this situation very well as an application will only compile in the executable code for the extensions actually used. Thus makign all of the functionality available to those that need it but with zero cost to those that do not. Change-Id: I49fdac7e9d2e0b190b7ea04b776018dd63c3065f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Add a set of version and context specific OpenGL classesSean Harmer2013-02-2655-2/+85644
| | | | | | | | | | | | | | | | | | This commit adds part of the output of utils/glgen and some simple modifications to QOpenGLContext to allow easy access to classes containing functions specific to a given OpenGL context and version. This allows compile-time detection of mis-use of OpenGL features. For example, trying to use glBegin(GL_TRIANGLES) with an OpenGL 3.2 Core Profile context will be detected by the compiler rather than at runtime. These capabilities make it much easier to add functionality to Qt and applications that relies upon core features of OpenGL from specific versions e.g. geometry shaders. Change-Id: Ieb584a489792595f831bc77dee84935c03bb5a64 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix typo.Frederik Gladhorn2013-02-261-1/+1
| | | | | Change-Id: Ia3fd460e77d8da5dca634872e3f786d5ad30289d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QGraphicsView - emit signal when rubber band changes.Thorbjørn Lund Martsum2013-02-263-3/+37
| | | | | | | | | | | | | The rubberBandRect function is nice to have, but this patch makes it easier to track the rubber band by emiting a signal on change. That makes it easier (and less clumsy/hacky) to show information related to the rubber band. Change-Id: If65eb85d743a1804be3fdb823a821423411e9745 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - add function to get RubberBand rectThorbjørn Lund Martsum2013-02-262-1/+23
| | | | | | | | | | | | | | In many situations it is handy to know the rubberband rect. There are many situations where we want to show something related to the rubberband. Regardless how that is done the rubberband area is needed. (Not having this is a flaw that can force people to do make a customized rubberband just to get this information) Change-Id: Ia854db4c0022b6a97b150af2b4bb78fd5e974991 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Adapt the newly-renamed SQL driver headers to proper private headersThiago Macieira2013-02-269-45/+99
| | | | | | | | | | Add the "We mean it" text and remove the now-unnecessary syncqt macros that used to prevent those headers from being added to the master includes. Change-Id: I03ac2a452bc6ac43ebba502bc0ecbf5ee1adf314 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Rename the SQL driver header files to _p.h (make private)Thiago Macieira2013-02-2638-54/+36
| | | | | | | | | | | | | The drivers were never public API. They were exposed by mistake in public headers. What's more, they have #include'd a private header (qsqlcachedresult_p.h) since at least Qt 4.5.1. That means no one used those headers in Qt 4 (private headers weren't installed then) and it's unlikely anyone did in 5.0. Change-Id: Ie0a47bcf0260ee6bdd3d8494b78fd1eec28a2d6b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Windows native dialogs: Handle libraries.Friedemann Kleint2013-02-251-5/+114
| | | | | | | Task-number: QTBUG-29447 Change-Id: I4e68e546a4eb6b5f9c3dbe6d98905109e72e600a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix HB incorrectly hides [narrow non-breaking space] characterKonstantin Ritt2013-02-251-1/+1
| | | | | | | | | U+202F is not of a Default_Ignorable property for a loooong time (perhaps was treated like a control code by mistake) Task-number: QTBUG-13280 Change-Id: I3c5ec5fa514039b7bca9ffa28ad6f5355e627855 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix primary screen selection.Alain Boyer2013-02-251-1/+1
| | | | | | | | | | | When selecting the primary screen, the m_primaryScreen value obtained from the xcb_connect() call should be respected. This ensures that the proper primary screen is selected when specifying the DISPLAY environment variable. Task-number: QTBUG-27220 Change-Id: I60aa207f13d919087d4d2913141c804928684731 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Harfbuzz: backporting fixes from upstreamKonstantin Ritt2013-02-257-14/+26
| | | | | | | | | | | | | | 81c8ef785b079980ad5b46be4fe7c7bf156dbf65 Fix crash! 81f2ecafa19b602f950df5a9e6e1b99c4b5ea55e Bug 30319 ff0612c2e7df1b86fc702c72e3015a6a5ae39b4c and 2dbd0fd11799c18bb6c66e337c3e31a1419823d4 Fix OOB access possibility 3bebe289aace6daa84b3d6983cebf5c58ddfad78 Fix problem with Indic shaper and control chars 90138e5a4d15c44f05456f90083ecacdc3196c8e Fix bad memory access in Myanmar shaper b847f24ce855d24f6822bcd9c0006905e81b94d8 Fix Arabic cursive positioning 3ab7b37bdebf0f8773493a1fee910b151c4de30f Fix misc leaks Change-Id: I6f3a6253782bff6abe4bf741d11c09fdd67542db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* ANGLE: Fix static build.Friedemann Kleint2013-02-255-40/+273
| | | | | | | | | | | | | Introduce QT_OPENGL_ES_2_ANGLE_STATIC define for static builds and modify export accordingly. Provided static instances of gl::Current and egl::Current for Qt's single threaded use. Task-number: QTBUG-28196 Change-Id: Ia75699d6da103fb8dd9d5fe97c1ee51e48a74406 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Update qopenglext.h with the latest version from KhronosGiuseppe D'Angelo2013-02-251-32/+434
| | | | | | Change-Id: I84b051b30623fda67c89d4d6b0b7756681cb9011 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPA: fix memory leak in qwindowsysteminterface.hRichard Moe Gustavsen2013-02-241-1/+1
| | | | | | | | Just removing the event from QList will not delete it... Change-Id: I3c4bb69a2afaada7ad4d5695eba0b3f29e9463ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Deprecate QSqlError setters.Marcel Krems2013-02-242-13/+42
| | | | | | | | | The constructor is sufficient, since it has a parameter for each member variable. Even the drivers, which were mentioned in the class description don't use them. Change-Id: Ie8ba0467c7dc1928c539b4b19db8cc2ea0f44ea0 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Disable the SHA-3 Hash function: QCryptographicHash doesn't need itThiago Macieira2013-02-241-1/+2
| | | | | | | | | QCryptographicHash will do the full Init/Update/Final calls, so we don't need the Hash function. Disable it from the compilation to avoid a warning about a function defined but not used. Change-Id: Ib48ae4a7be91089fdcffa00851b786816b798cd9 Reviewed-by: Richard J. Moore <rich@kde.org>
* Compile only the SHA-1 code into qdocThiago Macieira2013-02-232-18/+45
| | | | | | | | | There's no need to compile the other codecs if they never get used. It's possible that a whole-program optimisation would remove the dead code away, but it's not very likely. Change-Id: I75d7618c174566beec2fab44f60a9f7120133775 Reviewed-by: Richard J. Moore <rich@kde.org>
* Make toplevel transparent windows work on Mac OS XGunnar Sletta2013-02-235-4/+32
| | | | | | | | | | | | | | This patch includes a few different fixes to make transparent toplevels work on cocoa. - When setting alpha on the toplevel, it also needs setOpaque:NO - The OpenGL context needs a separate flag for this to work. - Make sure setOpaque fighting between setMask, setFormat and setOpacity ends up correctly Task-number: QTBUG-28214 Change-Id: Ic3a2d71193bb653e181c98787b4ebda002424092 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Pass the surface format to qglx_surfaceFormatFromGLXFBConfigGiuseppe D'Angelo2013-02-234-19/+14
| | | | | | | | | Instead of creating a default-constructed format and filling its field in, pass a pointer to an instance. This way we won't lose the renderable type set on the surface, but just fill in the other parameters. Change-Id: I1fd403671f9c677cc74aaf3c116a05f213d5d556 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Enforce OpenGL context creation under WindowsGiuseppe D'Angelo2013-02-231-3/+11
| | | | | | | | | | We don't support other context types, so fail in those cases. Also, return OpenGL as the rendereable type of our surface. Change-Id: I22792a913b78b837da3d27cef69145076579b949 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Enforce OpenGL context creation under XCBGiuseppe D'Angelo2013-02-232-3/+10
| | | | | | | | | We don't support other context types, so fail in those cases. Also, return OpenGL as the rendereable type of our surface. Change-Id: Ic7b5ed0ec5eaf5c0f88f50f5bceb697ea414c696 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Enforce OpenGL context creation under CocoaGiuseppe D'Angelo2013-02-232-2/+11
| | | | | | | | We don't support other context types, so fail in those cases. Also, return OpenGL as the rendereable type of our surface. Change-Id: I3d5632eb8555d73ed14837b662c7450589a8681f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>