summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add lancelot test for Emoji text rendering / color glyphsTor Arne Vestbø2015-06-251-1/+8
| | | | | Change-Id: Id69c28ec49be660e40beaf37bad9ac0d4ce0662d Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Make QDir::relativeFilePath() return "." for a path to itself.Christian Kandeler2015-06-242-6/+9
| | | | | | | | | | | The rationale being that the empty string is not a valid path component. [ChangeLog][QtCore][QDir] QDir::relativeFilePath() now returns "." instead of an empty string if the given path is the same as the directory. Change-Id: Ibcf31904b2ae5edf5639d4c2e5ba234365d347fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Use qthread_win.cpp for WinRT as wellOliver Wolff2015-06-231-41/+5
| | | | | | | | | | Since of Windows (Phone) 8.1 most of the desktop's thread functionality is also available, so we might be able to share the code and get rid of the extra implementation for WinRT. Task-number: QTBUG-43837 Change-Id: I0ce907cd94899834527f88c70e1e395bafdb14b3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Further tune curveThreshold setting based on strokeWidthEirik Aavitsland2015-06-221-0/+7
| | | | | | | | | | ad9698713f91a2e706fcd391f9806057649632ff reduced the curvethreshold for wide lines, to fix QTBUG-46151. But as a side effect, the threshold was increased for lines of widths >=0 and <4. This commit fixes that, and also adds a lance test for the issue in QTBUG-46151. Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix global coordinate mapping for child widgets in QGraphicsView.Friedemann Kleint2015-06-211-4/+21
| | | | | | | | | | | Move the code path handling widgets embedded in QGraphicsProxyWidget into the loop moving up the parent hierarchy. Add child widget to test. Task-number: QTBUG-41135 Change-Id: Ibd86413faaa927145a85a2f5864f162979135053 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Autotest: make the test pass with the Intel compilerThiago Macieira2015-06-192-6/+2
| | | | | | | | | The Intel compiler defaults to "fast math" mode, which is why those tests had been failing. So for the test that is trying to check whether we conform to IEEE strict requirements, turn on strict requirements. Change-Id: I02f8426b1c8e4241ac10ffff13e8efa224f313b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make QMetaObject::Connection check its state deeplyThiago Macieira2015-06-191-1/+6
| | | | | | | | | | | | | | | | | | Since Connection can be copied, one copy could be used for disconnecting, but the other's d_ptr wouldn't get updated and would continue to report as still connected. This patch fixes that by making it check the internal state. That is only done after d_ptr is already known to be non-null. Unfortunately, that is the common path: if (connect(sender, &Sender::signal, [] {})) will call an out-of-line function. I don't see a way out. Task-number: QTBUG-46213 Change-Id: I66a35ce5f88941f29aa6ffff13dfb45dca68a350 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Autotest: Check where global event filters get runThiago Macieira2015-06-192-0/+58
| | | | | | | | Global (application-level) event filters are supposed to be run only in the main thread, so ensure that it is the case. Change-Id: I27eaacb532114dd188c4ffff13d5a17d991b8bd2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix boundingRect test in tst_QPictureKai Pastor2015-06-161-2/+2
| | | | | | | | Verify the bounding rect of the left hand side of copy/assignment, not the right hand side (which is passed by const ref). Change-Id: I5044d269fe0acb5f4484c82da7e030ca33958792 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix less-than comparison for QStandardItem and QSortFilterProxyModel with ↵Friedemann Kleint2015-06-112-6/+21
| | | | | | | | | | | | | | | | | | | | | invalid data. Previously, QStandardItem::operator<() returned true when both items had invalid data. With MSVC in debug mode (checked iterators/STL), this triggered an assert in tst_QStandardItem::sortChildren() since that verifies that !(b < a) when a < b: Debug Assertion Failed! Line: 3006 Expression: invalid operator< Introduce a stable sort order for invalid items such that other items are always less than invalid items and comparing invalid items returns false (indicating equivalence). Change-Id: Ica0f0d9f001c86973b1941dbcc1faf282e4c47df Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Diaglib: Output window/widget state(s).Friedemann Kleint2015-06-112-0/+4
| | | | | | Change-Id: I0f27027c95ed70a0b2992c58df7e12eddfad17e3 Task-number: QTBUG-46416 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix leaking of link in tst_QFileInfo::canonicalFilePath().Friedemann Kleint2015-06-101-6/+20
| | | | | | | | Give the link a name containing time stamp and ensure it is deleted. Change-Id: I846c58095acbcd92e7daccfd43a69dd97e95e7b0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix return value of QWindowsFileSystemWatcherEngine::removePaths().Friedemann Kleint2015-06-091-0/+26
| | | | | | | | | | | Previously, the path was removed from list returned (indicating failure to remove) only when the thread's list was empty (last file in directory). Move the statement up so that removal happens when it is found in thread's list. Task-number: QTBUG-46449 Change-Id: Ib79199c731f79357b0e5c17636254fbeb3a754a0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* QSwipeGestureRecognizer: Allow for small direction changes.Friedemann Kleint2015-06-071-3/+12
| | | | | | | | | | When trying to do a straight right/left/up/down swipe, a minimal change in the other direction caused to the gesture to be canceled. Introduce a threshold for checking such to prevent this. Task-number: QTBUG-46195 Change-Id: I3e199f2ec0c81d23a16073b1f5b8fff004958239 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* fix usage of wince scopeOswald Buddenhagen2015-06-0553-58/+57
| | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Font definitions with different style names are not equalAllan Sandfeld Jensen2015-06-031-0/+2
| | | | | | | | | | | | Since we added font matching by style name, the style name is not just a derived property and should not be ignored in comparisons. The QFontDef::exactMatch comparison is left unchanged, since it tests if a loaded font matches a requested one. Task-number: QTBUG-30851 Change-Id: I4187c5b993815001f35bcf24dc449059bfdcba6f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix premul conversion from ARGB32 to A2RGB30 formats.Allan Sandfeld Jensen2015-06-031-0/+27
| | | | | | | | | When a premultiplied alpha changes value because it is rounded to fewer bits the premultiplied colors may need to be recalculated with the new value. Otherwise the color will both be wrong and potentially invalid. Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Polish and stabilize tst_qtooltip.Friedemann Kleint2015-06-021-26/+36
| | | | | | | | | | | | | - Implement init() and cleanup() to verify that no top level widgets are leaked. - Position widget in tst_QToolTip::task183679() and set window title. - Remove hardcoded wait in tst_QToolTip::whatsThis() and use a find function within QTRY_VERIFY(). - Rearrange and clean code a bit. Change-Id: I0b1ad88444fc9441c1071a2527f75de1f68ea9e5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Stabilize tst_qtouchevent.Friedemann Kleint2015-06-012-4/+10
| | | | | | | | | | | - Use QTRY_COMPARE() in touchBeginWithGraphicsWidget. - Change raw event translation tests to wait for the window to become active to avoid WM positioning issues. - Blacklist the raw event translation tests on Linux. Task-number: QTBUG-46266 Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* moc: Fix crash parsing invalid macro invocationOlivier Goffart2015-05-301-0/+7
| | | | | | | | | | | | | | When invoking a macro with less argument than it expect, we would crash trying to access the vector of arguments from the invocation as we are trying to substitute an argument. (Note that we do not show an error in case of argument mismatch because ithat might happen parsing valid code as moc's c++ parser is not 100% accurate (that was QTBUG-29331)) Task-number: QTBUG-46210 Change-Id: I3f08d7f5049e593a5bdc02a594ea63cadf66e7a4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Reanimate test gui/kernel/qtouchevent/tst_qtouchevent.Friedemann Kleint2015-05-292-164/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CONFIG += testcase to the .pro file which was missing. The test thus was never executed by make check and left to rot. Fix up code: - Remove module includes. - Introduce explicit constructors taking parent object for helper classes, removing calls to setParent(). - Ensure test does not leak objects by converting pointers to stack variables or introducing QScopedPointer, verify by checking for an empty window list in cleanup(). - Simplify code by removing unneeded variables. - Split up conditions in QVERIFY(). Fix tests: - Show windows were required when events are sent to QWidget::windowHandle(). - Invert the conditions checking whether touch events are accepted by widgets since widgets no longer accept them by defaults in Qt 5 after e50416066cab4be7df8382bd224d9e4ddd7a903a. - XFAIL multiPointRawEventTranslationOnTouchPad() which started to fail at some point in Qt 5. - Mark as insignificant on OS X due to crash. Task-number: QTBUG-46266 Change-Id: I6676d021afb015411a24d97d9b8f7c327d4d3c3f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tst_QDockWidget::restoreDockWidget: Add QSKIP for XCB.Friedemann Kleint2015-05-291-0/+2
| | | | | | | The positioning test has been observed to fail on X11. Change-Id: I58727126a8742de93ec203e9992a9ae1b454f731 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tst_QApplication - quitOnLastWindowClosed (fix for OS X)Timur Pocheptsov2015-05-271-14/+20
| | | | | | | | | | | | | | | Two (?) tests can fail: what they actually try to test is that our application quits on the second single shot timer (2 s. timeout) and not on the first one (timeout 1 s.) - on the first timeout we either ignore event, or we still have another window and should not quit yet, on the second timeout we actually do quit the app. The test checks this in a quite fragile way, counting the number of timeouts for the third 100 ms timer. It looks like on OS X (VM-only) there is some delay (~500-600 ms) before we receive the first timeout so the count is always 14 or less, making the test to fail. Change-Id: I9e8728e6c956025d91528f4195982767a5d3d320 Task-number: QTBUG-46164 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Remove test other/baselineexample.Friedemann Kleint2015-05-273-160/+0
| | | | | | | | | | baselineexample.pro is missing CONFIG += testcase, so, make check succeeds without doing anything. The test seems to connect to some network server to retrieve baseline images, but that infrastructure apparently no longer exists. Change-Id: I98f4fe5ef8a508fda90e408df2781a944eb99a60 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix crash due to QTreeView accessing deleted model indexes.Joerg Bornemann2015-05-271-0/+78
| | | | | | | | | | | | QTreeViewPrivate::updateScrollBars depends on a correctly set up viewItems vector. If a delayed layout is pending, we must call QTreeViewPrivate::executePostedLayout before accessing any stored model indices. Task-number: QTBUG-45697 Change-Id: I55fcbaf81f225b26181c2cf739283740b85dd16a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMetaType: Fix compilation with non default constructible Q_GADGETOlivier Goffart2015-05-272-1/+30
| | | | | | | | | | | Do not try to automatically register the meta type for Q_GADGET that are not default constructible. This fixes a source incompatibility in the function pointer syntax of QObject::connect when such types are used as an argument of a signal. Task-number: QTBUG-45721 Change-Id: I3065f6d57bc1f37e16988d2dee99118de250ca56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: Use blacklist for failing tst_qwidget testsCaroline Chao2015-05-262-2/+121
| | | | | | | | | | | Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file. The tests blacklisted have been found using CI builds logs. Change-Id: Iffc9043654a9dcd97d55e262011c8daff6f4e60f Task-number: QTBUG-25300 Task-number: QTBUG-45502 Task-number: QTBUG-46325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* take process name into account for QLockFile's pid clash resolutionJoerg Bornemann2015-05-261-0/+48
| | | | | | | | | | | | | | | | To cover the situation that the process ID got reused, the current process name is compared to the name of the process that corresponds to the process ID from the lock file. If the process names differ, the lock file is considered stale. [ChangeLog][QtCore][QLockFile] Detection of stale lock files got more robust and takes the name of the process that belongs to the stored PID into account. Task-number: QTBUG-45497 Change-Id: Ic3c0d7e066435451203e77b9b9ce2d70bfb9c570 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Make sure we don't call dbus_connection_can_send_type on too old libdbusThiago Macieira2015-05-261-9/+24
| | | | | | | | | | | | | | | | | | This function was introduced alongside the support for Unix file descriptors, so it's a good indicator of whether Unix FDs are supported. Ever since dbus_minimal_p.h, however, DBUS_TYPE_UNIX_FD may be defined even if the system libs don't support it. In order to fix this issue, I had to fix what was apparently a merge conflict resolution mistake and remove the #ifdef around the test. Doing the latter is a good idea due to moc being unable to find <dbus/dbus.h>. This was tested with both linked and dynamically-loaded libdbus-1. Task-number: QTBUG-46199 Change-Id: I66a35ce5f88941f29aa6ffff13dfb4b5438613a3 Reviewed-by: Jani Vähäkangas <jani.vahakangas@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QMetaType: Do not automatically register types that derives from a Q_GADGETOlivier Goffart2015-05-231-0/+2
| | | | | | | Otherwise the type is registered with the wrong name Change-Id: I68ec3a05e2528816626e648b46ccc9d70b004866 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make warnings of QIODevice more verbose.Friedemann Kleint2015-05-234-9/+9
| | | | | | | | | | | | | | | | | | | | Include class name, object name and file name when available. For the bug in question: QIODevice::read: device not open becomes QIODevice::read (QTcpSocket, "QFtpDTP Passive state socket"): device not open Adding a static function also makes it easier to set a breakpoint and find the culprit. Task-number: QTBUG-46112 Change-Id: Ic181d8ab292912d1acbcc3cb84d9679fe4842ca0 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Blacklist tst_qwindow tests that are failing on Ubuntu 14.04Simon Hausmann2015-05-221-0/+6
| | | | | | | This should allow us to make the rest of 14.04 enforcing Change-Id: I37f6751e8b966b047d1bd2e49ba9482e5846acb1 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Add CONFIG += testcase to test qglobalstatic.Friedemann Kleint2015-05-221-0/+1
| | | | | | | Otherwise, make check does nothing, always succeeding. Change-Id: I0fe04697e02ab0f33cd9aebb550777e200c70804 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add debug operator for QTouchDevice.Friedemann Kleint2015-05-221-18/+0
| | | | | | | | | | Produces: QTouchDevice("", type=TouchScreen, capabilities=Position|Area|NormalizedPosition|MouseEmulation, maximumTouchPoints=10) Remove operator from manual test. Change-Id: I6b792665031902d5f822c80807a400a334c27526 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* remove now redundant testsOswald Buddenhagen2015-05-2026-821/+0
| | | | | | | the functionality is now covered by the qmakelib test. Change-Id: Id627f573fb247ff3b86558509e27b6a9862c1a59 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* add qmake evaluator testOswald Buddenhagen2015-05-2021-14/+2603
| | | | | Change-Id: I31b95daede5edef245dd1ba447f2937a0db34232 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* split parser test initializationOswald Buddenhagen2015-05-202-32/+62
| | | | | | | | the idea was to speed up optimized msvc compilation, but it didn't help. still, it's better structured that way. Change-Id: I4b2108d02a47ef8ef704b0b542b0f281bff20165 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* move parser test to a separate fileOswald Buddenhagen2015-05-204-1988/+2061
| | | | | | | for better structure. Change-Id: I16bd1ca245640e92ffe167241a5a565e7a550e1d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* add autotest for ProStringOswald Buddenhagen2015-05-201-0/+81
| | | | | | | also adds documentation, which is kind of a sanity test. ehm. Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* add parser tests for use of 'else' after bad conditionalsOswald Buddenhagen2015-05-201-0/+23
| | | | | | Change-Id: I9885f629a2f6511574eebd81896a1d9f258e55cb Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* silence MSVC warnings about using TS() without parametersOswald Buddenhagen2015-05-201-0/+5
| | | | | Change-Id: I23264dcabc02b89441fa47c890fc662e9a41f7ce Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix compilation of QContiguousCache::operator=Thiago Macieira2015-05-201-0/+12
| | | | | | | | | freeData() takes a Data*, not a QContiguousCacheData*. Task-number: QTBUG-45783 Change-Id: I96d7ac38dac24b418138ffff13d7fdf09b1d6b07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QStateMachine: empty the whole internal queue before external queueErik Verbruggen2015-05-191-0/+39
| | | | | | | | | | If the internal queue contained multiple events, but the first one did not select any transitions, the external event queue would be checked before the remaining events in the internal queue. Change-Id: I1a7f49afdefaaf2b4330bf13b079b61344385ea0 Task-number: QTBUG-46059 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix QtPrivate::IsQEnumHelper<void>Olivier Goffart2015-05-171-0/+8
| | | | | Change-Id: I1633ef128212a6b99b66129f13e0b4d5ea46644d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QDialog::snapToDefaultButton - tune the test for OS XTimur Pocheptsov2015-05-151-0/+5
| | | | | | | | | | QCursor::setPos with Cocoa integration is calling CGEventPost. Some time is required before the cursor position is really set, so we can not immediately call QCOMPARE. Change-Id: I83a4c13f06ec151a4b9ab18c83de1eb5247ea9cc Task-number: QTBUG-45553 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Tests: Remove EXPECT_FAIL in tst_QWidget::widgetAt()Caroline Chao2015-05-151-2/+0
| | | | | | | | The test is marked as XPASS in CI. This change follow 201bf9e6736a3. Change-Id: I0938b1417f792aa88fc1b40c08e7cd810e7d22f7 Task-number: QTBUG-22326 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* moc: Generate qt_static_metacall for creatable-only gadgetsGabriel de Dietrich2015-05-131-4/+6
| | | | | | | | | Prior to this, moc would not generate the function unless the gadget class had a property or a non-constructor invokable. Change-Id: Ic020ea5f8f59702f5e9e194a46e26850e53e5cfe Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* moc: Fix type for gadget's CreateInstance metacallGabriel de Dietrich2015-05-131-0/+10
| | | | | | | | | | | | An error similar to the one below would be emitted by the compiler on the moc generated file: error: assigning to 'QObject *' from incompatible type 'Gadget *' if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break; Change-Id: I75ae7bd6c46d20db2d47a80eaa08aae302d7d6c8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Tests: Remove tst_QHostInfo::abortHostLookupInDifferentThread() testCaroline Chao2015-05-132-24/+0
| | | | | | | | | | This test has been initially blacklisted. However it is racy by design and cannot be fixed. Removing it. Change-Id: I6c386a12e54d8a382f17c4fc033428f56eb03f02 Task-number: QTBUG-23837 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Optionally apply orientation on QImage readAllan Sandfeld Jensen2015-05-1211-0/+60
| | | | | | | | | | | | | | | | | | | | Make it possible to read images with EXIF orientation automatically applied. This was originally implemented without opt-out in Qt 5.4, but reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF to keep behavioral consistency. The EXIF support for JPEG was written by Rainer Keller. [ChangeLog][QtGui][Image plugins] An option has been added to QImageReader to enable automatic application of EXIF orientation. This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2. Task-number: QTBUG-37946 Task-number: QTBUG-43563 Task-number: QTBUG-45552 Task-number: QTBUG-45865 Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>