summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Mark Variable Length Arrays as a TS feature for C++14Thiago Macieira2014-04-081-1/+2
| | | | | | | | | | | | | The feature was removed from the C++14 draft standard and moved instead to a Technical Specification. Since we don't know how to enable TS features in GCC 4.9 yet, remove it from the definition. The Clang definition is probably safe, since it is behind an #if __has_extension. Change-Id: Ibc32b35657b046680078b39a7678bd8e1e5395d2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Don't redefine dynamic_cast if it's already a macroThiago Macieira2014-04-081-1/+1
| | | | | | | | | | Redefining macros is always a bad idea. On top of that, MSVC doesn't like when we #define dynamic_cast, even though the C++ standard explicitly allows it. Task-number: QTBUG-29093 Change-Id: I6e33d609ce213cf6a9085faa3f991a873d825dc6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* fix build for MSVC 2010Joerg Bornemann2014-04-071-2/+2
| | | | | | | The Windows version for QS_TOUCH and QS_POINTER was slightly off. Change-Id: Idb8a8219e09c6aa1a1b24e45b9da640c8d4b7161 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Use the new 3-operand testAndSet functions in QMutexThiago Macieira2014-04-052-6/+12
| | | | | | | | | This allows us to get the current value of the QMutex / QBasicMutex after the testAndSet operation failed. It saves an extra load from memory. Change-Id: I4922a8b3df15e342b177b13f56cf4f1184314520 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use category names when logging to the journalAlejandro Exojo2014-04-051-7/+9
| | | | | | | | | | | | Use the custom field QT_CATEGORY to store the name of the QLoggingCategory used when writing to systemd's journal. To pass custom fields sd_journal_send() is needed, and is used in combination with #define SD_JOURNAL_SUPPRESS_LOCATION to store the metadata that is already in the QMessageLogContext. Change-Id: I6a120701f7012aaa46451dd3d91586a419c5f803 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* OS X: Improve QLibraryInfo app bundle testing.Morten Johan Sørvig2014-04-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | QLibraryInfo::location() paths are relative to "myapp.app/Contents/" when the application has a bundle and relative to the executable when not. However CFBundleGetMainBundle() can and will return a valid CFBundleRef even if the application is built as a standalone executable. Add a test that verifies that the path constructed with "/Contents" exists on disk. Fall back to the non-bundle code path if it doesn't. This bug was hit in cases where a qt.conf file was present side-by-side with the app binary, for example in qtbase/bin. Task-number: QTBUG-38039 Change-Id: Id993599208fe94fff283c725778f8ad47b610ba7 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix capacity reservation for shared QByteArrayThiago Macieira2014-04-051-1/+1
| | | | | | | | | | | | We can squeeze, but not by discarding elements. Make sure the size of the object stays intact after changing the reserved capacity. I've also added unit tests for other containers, just to be sure. Task-number: QTBUG-37750 Change-Id: I5135b095943b7589423c51cebcb52af792468e61 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Don't read before the beginning of the stringThiago Macieira2014-04-041-5/+11
| | | | | | | | | | The code did discard the the data, so it wasn't affecting the comparison result (tests added anyway), but it could cause crashes if the pointer to the beginning of the data in the first 8 bytes of a page. Change-Id: I618e68de329b65de34ef8c934934c3e631cc6c9f Reported-By: Erik Verbruggen Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Windows XP target support for MSVC >= 2012Joerg Bornemann2014-04-032-4/+4
| | | | | | | | | | | | | | | | | | To enable windows xp support, we must do two things: 1. linker flag must be /SUBSYSTEM:CONSOLE,5.01 or /SUBSYSTEM:WINDOWS,5.01. For x64, the version is 5.02. 2. Do not use Windows Kit 8. Win SDK v7.1A is recommended. Prepend the right include paths and lib paths to INCLUDE and LIB before building. The Windows XP target support is enabled by passing "-target xp" to configure. Task-number: QTBUG-29939 Change-Id: I84c8439606cc2a9d27d64947702846faa4f1e4a2 Reviewed-by: Lucas Wang <wbsecg1@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Use Finder bundle identifier over path for OS X bundle detectionSamuel Gaist2014-04-031-3/+4
| | | | | | | | | | | | | | | | Currently, checking if Finder is the application returned for opening a bundle is done using its absolute path. Finder might be relocated in future OS X versions which makes this approach less clean. Using Finder's bundle identifier allows us to ignore where it is stored in the filesystem as the identifier will not change. Task-number: QTBUG-31884 Change-Id: Ib4c3412fb206fadda04eb547bc6a4eef02ee949a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mac: Use QString::toNSString in QtBase.Morten Johan Sørvig2014-04-031-1/+1
| | | | | | | | | | | The string is now autoreleased. This fixes a memory leak in qt_mac_QStringListToNSMutableArrayVoid Task-number: QTBUG-20347 Change-Id: I11ebeb264af4c8ce98968f2221eea772f24c12d4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Logging: Be also more strict with value of logging ruleKai Koehne2014-04-031-5/+8
| | | | | | | | | | | | Only accept lower-case "true" and "false", as documented. The old check didn't match either the documentation, nor the QSettings/ QVariant behavior (where, for a boolean value, any lower-cased content that not empty, "0" or "false" is considered true). Change-Id: I317d29c16a27f862001b9dff02e8298df8acf5a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Enable s390[x] detection.Lisandro Damián Nicanor Pérez Meyer2014-04-031-6/+6
| | | | | | | It has been working in Debian for some time. Change-Id: Ib5741a4ba68bf95c7020336c84bc66257ff27809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Stop ART from complaining about missing thread names.Christian Strømme2014-04-031-1/+10
| | | | | | | | | | The new Android jvm (ART) complains loudly if we attach without supplying a thread name. Task-number: QTBUG-35441 Change-Id: I962d613be0db50f3ca9a4c786b36003f31c9db14 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix offset calculation on WinRTMaurice Kalinowski2014-04-011-0/+1
| | | | | | | | | | | | | According to MSDN "the offset must be a multiple of the allocation granularity". We use this already for the win32 version by splitting into offsetLo and offsetHi. However, we did not convert it back to the correct argument passed for MapViewOfFileFromApp. Now all auto-tests for mapping succeed. Task-number: QTBUG-37773 Change-Id: I7e43f906cb93164b58f4e5e3f88388cdace865d7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Fix unused variable warningKonstantin Ritt2014-04-011-1/+1
| | | | | | | | > qstring.cpp:5325:1: warning: 'defaultCollator' defined > but not used [-Wunused-variable] Change-Id: I29fe2006a678f4f0b3b504b90120c0e99d7090fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compile for embedded Androidaavit2014-03-311-1/+1
| | | | | | | It also has a broken declaration of posix_memalign Change-Id: Ie8f245564f80b04901425729b46953828204efaf Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* OS X QSettings auto test/writing check updateSamuel Gaist2014-03-312-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to provide an updated test that follows changes started in 10.7: new rule is that only root can access SystemScope settings. It also disables the sync() workaround code path which is at least not executed during the tst_QSettings execution and returns wrong value to the test. From Apple's documentation: "Note that modification of some preferences domains (those not belonging to the “Current User”) requires root privileges (or Admin privileges prior to OS X v10.6)—see Authorization Services Programming Guide for information on how to gain suitable privileges" https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFPreferencesUtils/Reference/reference.html [ChangeLog][QtCore][QSettings] QSettings now returns the correct value for isWritable() when using SystemScope settings. Task-number: QTBUG-9824 Task-number: QTBUG-21062 Task-number: QTBUG-22745 Change-Id: Ib6a1490ec596b99d189ec4de9a0f28ecfd684172 Reviewed-by: Liang Qi <liang.qi@digia.com>
* QEvent: document and check when registerEventTypes() returns -1Marc Mutz2014-03-291-0/+3
| | | | | | | | | | | | | | | In tst_QEvent, add a check that exhausts the available event type ids and verifies that registerEventTypes() returns -1 in that case, as documented. I haven't found a way to test the other case in which -1 is returned. Since this test operates on a global write-only registry the new test case needs to keep track of whether the earlier test cases have run successfully. If they didn't, skip this test case. Change-Id: I68ea9d17d10dcec22175994aba269dd09c9adf43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build on [older] MinGWKonstantin Ritt2014-03-291-1/+1
| | | | | | | | | | | | | | | > error: 'REFKNOWNFOLDERID' does not name a type > error: 'GetKnownFolderPath' does not name a type > error: 'SHGetKnownFolderPath' was not declared in this scope REFKNOWNFOLDERID is a typedef for `const KNOWNFOLDERID &` and KNOWNFOLDERID is a typedef for `GUID`. Change-Id: I2371f49aba6e20b0bd44aad423dd822e5ee152d4 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix typosFrederik Gladhorn2014-03-291-1/+9
| | | | | Change-Id: I5388666f68f44b052b8950741a5d43f951ba4931 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Reduce clang compilation time of tst_qmetatype by ~2%Jędrzej Nowacki2014-03-281-35/+7
| | | | | Change-Id: I64fe12dd0bf9c35ae06fc5a68addc36848cdda3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Mark QPoint, QPointF, QRect, QRectF as reentrant.Mitch Curtis2014-03-272-0/+4
| | | | | | | Task-number: QTBUG-37667 Change-Id: I978a53e075efcfba8898c8e96bce8f19350dd6c4 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mac: make FSEvents-based QFileSystemWatcherEngine more robust.Erik Verbruggen2014-03-272-42/+105
| | | | | | | | | | | | | | | | | | | - Record the last event ID with every callback. This event ID is passed to FSEventStreamCreate when restarting the stream, so the watcher will receive all events that occurred since invalidating the previous stream. - Never start with kFSEventStreamEventIdSinceNow, because this will generate a (bogus) soft-assert in FSEventStreamFlushSync in CarbonCore when no event occurred since stream creation. The last globally generated event ID is used instead to simulate the "now". - Do not dispose and recreate the stream in the callback, but use a queued signal-slot connection to schedule this on thread that owns the watcher. Change-Id: I02f5a845d9e27f9853ed97925ab9c7a5bc0dede1 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Doc: Move IPC example documentationTopi Reinio2014-03-271-0/+1
| | | | | | | | | | | | Examples under examples/ipc were not part of any module documentation. This change adds the above folder to Qt Core documentation, and moves the corresponding files so that the example documentation is built correctly. Change-Id: If1f34ce7ef04a02df8a87f820bb2e68ffa723dd4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Reuse one QCollator instance for QString::localeAwareCompareLars Knoll2014-03-271-2/+8
| | | | | | | | | | | | | Constructing a QCollator is somewhat expensive, and made localeAwareCompare really slow. As QCollator (at least with the ICU implementation) is not thread safe, use one collator per thread. This speeds up collation of a long list of strings by a factor of 250 for the test case in the bug below. Task-number: QTBUG-36149 Change-Id: I645cdc3546347d1dcc7a03b7563b628c7f756944 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* WinRT: Prevent GUI dispatcher lookup from non-GUI threadAndrew Knight2014-03-251-0/+6
| | | | | | | | | | | When we create an event dispatcher outside of the main thread, we shouldn't be looking up the core event dispatcher as it will fail. This ends up printing a scary warning for all e.g. Qt Quick apps when in reality nothing bad actually happened. Task-number: QTBUG-35327 Change-Id: I2060f0a9d4baffc42ca727e8d4e1ef7c13f6a2df Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Remove useless Q_NO_DECLARED_NOT_DEFINED flagJędrzej Nowacki2014-03-251-1/+1
| | | | | | | | | | The flag is used only in qstring.h and gives no real value. Task-number: QTBUG-37437 Change-Id: I7513b56af208a5edee8452b8bbcb9b128e25133d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Implement DownloadLocation retrieving using SHGetKnownFolderPathSamuel Gaist2014-03-251-1/+24
| | | | | | | | | | | | This patch implements the TODO concerning the retrieval of DownloadLocation using SHGetKnownFolderPath [ChangeLog][QtCore][Windows] Now QStandardPaths::DownloadLocation returns the proper path for Windows Vista and up Task-number: QTBUG-35194 Change-Id: Ifc7686e23de76dbfd7826a75e4bf99aa5b9268b0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix some documentation errors.Friedemann Kleint2014-03-245-9/+27
| | | | | | | | Correct links and fix typos, remove obsolete documentation, fix some snippets, mark some classes as internal. Change-Id: I9a3266605f060783413d32740057a57a820c8929 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix qdoc warnings in QMargins, QRect.Friedemann Kleint2014-03-212-8/+8
| | | | | Change-Id: Iae2486e1f335679c288e05f45e2d283a7cf971c0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QNX: Fix crash in bb_selectFabian Bumberger2014-03-211-2/+2
| | | | | | | Change-Id: Ic1a414c9d89b790ed9fb9f5c989b6018de78b465 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Setting QT_NO_DEBUG should not remove symbolsLars Knoll2014-03-212-4/+0
| | | | | | | | | | | | | | Removing symbols when defining QT_NO_DEBUG is a bad idea. In this case it means that you can't compile corelib as a release build and widgets as debug without getting an undefined symbol. Instead leave the method in the release build, but simply don't call it. Change-Id: I50426aefd62e82bccd933323aa0f67c6e5294961 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Logging: Remove PatternFlag::Invalid from QLoggingRuleKai Koehne2014-03-202-6/+2
| | | | | | | | | | | The flag is not orthogonal to the rest, and e.g. checking with flags & Invalid will fail. Rather make it explicit by comparing with 0. Change-Id: I428d5e71f5ecd05f61d543aaa78532548ef93d5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Stop omitted enum value from showing up in Qt namespace doc.Mitch Curtis2014-03-202-2/+3
| | | | | | | | | | | | | | | | | The following omitted enum description can be seen at [1]: "Ensures that the longest variant is always used when computing the size of a multi-variant string. (Internal)" This is because \omitvalue does not allow a description (whereas \value does). The description was moved to the qnamespace.h as a code comment. [1] http://qt-project.org/doc/qt-5/qt.html#TextFlag-enum Change-Id: I7983613bffa90f3071a4e2d678696391048c8757 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Print when logging rule is invalid.Kai Koehne2014-03-201-1/+5
| | | | | | | Print a warning when an invalid logging rule is parsed. Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix creating directory hierarchy for WinRTMaurice Kalinowski2014-03-201-0/+14
| | | | | | | | | | | | | | mkpath was not working consistently on WinRT. The reason is that createDirectory() starts from C:/ which is outside the sandbox and an illegal access error has been returned. In case the chunk is still inside the "known" writable area, we continue to the next chunk. Known writable is derived from QStandardPaths. All but Temp are children of the DataLocation on WinRT. Task-number: QTBUG-35472 Change-Id: I3b4ab390bd321285da51d02f5eeaf06da4d56298 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* QProcessEnvironment: Fix handling of magic environment variablesDaniel Teske2014-03-201-1/+1
| | | | | | | | | | The cmd shell on Windows sets special environment variables starting with a '='. Task-number: QTCREATORBUG-8716 Change-Id: Id2852188897522558907d9846fb2af069600235f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Android: Check for exception before calling NewGlobalRef().Christian Strømme2014-03-201-2/+14
| | | | | | | | | | Calling NewGlobalRef() throws an exception if it gets an invalid ref. If one of the jni object-calls throws an exception and the returned reference is invalid, the subsequent call to NewGlobalRef() will trigger the second exception and the process will be terminated. Change-Id: I50c622e695542373d5b2eebd911c882e8e0f6bf7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix compile for embedded Androidaavit2014-03-201-1/+1
| | | | | | | Cannot use JNI to query for standard paths Change-Id: I1596106fd4d5e532d3ac1cd6dbfce3fb9fe1db5a Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Remove 'register' storage class specifier in armv6 atomicsTor Arne Vestbø2014-03-191-8/+8
| | | | | | | It is deprecated, and produces warnings on recent Clang versions. Change-Id: I83181dd12c06a600a2f0eafbd83fe6111cf7752c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typos in QRegExp documentationKai Koehne2014-03-191-2/+2
| | | | | | Change-Id: I80bce716ac1c161fd87291ecdbf21eb8f3f25e5a Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix double release in QTimeZone on MacFrederik Gladhorn2014-03-191-1/+0
| | | | | | | | | availableTimeZoneIds would release the enumerator. This leads to a double free, so simply don't release the enumerator. Task-number: QTBUG-37582 Change-Id: I521a9555d32545afd47095235ccee75a4f3e1974 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: document QSharedPointer::swap() methodMarc Mutz2014-03-172-0/+10
| | | | | | | | | | The function is already present for quite some time, but was never documented, so declare it as \since 5.3. Add swap() function to qsharedpointer.h so it's visible to QDoc, too. Change-Id: I8eba420878a096392fd181a180d5751101d37a50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Q_DECLARE_METATYPE macroJędrzej Nowacki2014-03-171-1/+2
| | | | | | | | | The macro should stringify value of the given token not the token itself. Task-number: QTBUG-37547 Change-Id: I90f4fa613bd13d5a581828ab13f620b40dfd3593 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove level 4 compiler warnings from MSVC.David Schulz2014-03-159-8/+71
| | | | | | | | | | Task-number: QTBUG-7233 Change-Id: I52067e3a22e98a62fd87415906e54a54ff2d6b49 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Dave McClelland
* Use QCommandLineParser in example dnslookup.Friedemann Kleint2014-03-152-1/+74
| | | | | | | | | | | Show how use QCommandLineParser with additional parameter checking for custom options and positional arguments. Also explain how to display help in GUI applications. Change-Id: I03513e09b7dd5b150259593da0af2ef2a281cab2 Reviewed-by: David Faure <david.faure@kdab.com>
* Doc: Fix syntax/compiler error in QThread snippetLorenz Haas2014-03-151-2/+3
| | | | | Change-Id: If64e01099b50f15b5cf7cdb0890dfa4f7625126d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Document %{if-category} in default message patternKai Koehne2014-03-151-1/+4
| | | | | | | | Commit 15ddb91b introduced %{if-category}, and changed the default message pattern. Adapt the documentation accordingly. Change-Id: I1d500122300c4d62171de3607553b3a5a822d4a7 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* iOS: fix build failure __IPHONE_NA not definedRichard Moe Gustavsen2014-03-141-2/+2
| | | | | | | | | | | | | | __IPHONE_NA was previously defined to 9999, but with iPhoneOS7.1.sdk it is now undefined. From Availability.h: "__IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable" This causes Qt to evaluate QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE to true when given __IPHONE_NA as argument. And then the build will fail. Change-Id: I11f1d0285329d90c633c00c0c4d446ef5cd8089b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>