summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
Commit message (Collapse)AuthorAgeFilesLines
* don't rely on transitive dependenciesOswald Buddenhagen2016-01-081-0/+2
| | | | | | Change-Id: Ide872b452e02ebefb3eeb51464c8d59e8bf58bc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Windows: Restore window geometry after normal->maximized->fullscreen->normal.Friedemann Kleint2015-12-171-0/+67
| | | | | | | | | | | - Do not save geometry when going from maximized->fullscreen - Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the maximized geometry is restored. - Add a test for Windows. Task-number: QTBUG-49709 Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix compilation for WinRTMaurice Kalinowski2015-12-142-2/+2
| | | | | | | | TEST_HELPER_INSTALLS cannot be used on platforms with no QProcess support. Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* QImage pixelColor and setPixelColor must use unpremultiplied QColorAllan Sandfeld Jensen2015-12-041-0/+18
| | | | | | | | | QColor always uses unpremultiplied alpha, but the new QImage methods were based on the QRgb versions which might be either. This patches fixes the two new methods so they treat QColor alpha correctly. Change-Id: I78a5b875ad4e78ad7fde3b811c6187482b4f6d15 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix possible null pointer dereferences.Jake Petroules2015-12-021-0/+15
| | | | | | | | This follows up 130c2baa9376dcf525916620294bd9996bdf41f3. Change-Id: I2f6c9b4f995af427cec9a2162b782039debf8564 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Fix conversion QVariant(QColor) to QString.Jędrzej Nowacki2015-11-301-0/+10
| | | | | | | | | | | | | QVariant was using QColor::name() to convert a color to string, which by default loses alpha value. The patch is fixing the problem by always including the alpha value in the string when required. [ChangeLog][Core][Variant] QVariant(QColor)::toString() uses QColor::HexArgb format when the alpha component is different from 1. Task-number: QTBUG-37851 Change-Id: I887460c1ea151180ba99d64dd873ba9d6e2268f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tst_QImageReader: Fix file handling.Friedemann Kleint2015-11-241-8/+23
| | | | | | | | | | Use a QTemporaryFile in readFromFileAfterJunk() instead writing to the current directory which might not have write permission. Enclose each call to QFile::open() in QVERIFY2() with error message. Change-Id: I3c5da31c6681a2396cee473cafe7d92c5c220de3 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* tst_QImageWriter: Use QTemporaryDir.Friedemann Kleint2015-11-241-5/+3
| | | | | | | | | | Create a temporary directory instead of writing to the test data directory or home path (Android). Change-Id: I6af583e5da91eefb603eaae179e7d789487dc626 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make the ppm image handler corrctly handle long comment linesEirik Aavitsland2015-11-192-0/+13
| | | | | | | | | The ppm decoder used a fixed size buffer to discard comment lines, which would fail for comments longer than 100 characters. Task-number: QTBUG-49414 Change-Id: I92e910e025cf7584a6ff1c0e5b0e8a4ab281d479 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-171-10/+15
|\ | | | | | | Change-Id: I6b1fe0c6c360a0d5285911869f0f4f93d86d822e
| * Fix QImage::setDotsPerMeterX/Y for images with some orientationsJoni Poikelin2015-11-051-10/+15
| | | | | | | | | | | | | | | | | | | | | | Rotation of images with orientation of 90 and 270 degrees dropped DPM values from rotated image. Task-number: QTBUG-49220 Change-Id: I9c23153c49dd63b5f6958fdde72f466873b0a407 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Insert leading after each line, not beforeUlf Hermann2015-10-091-0/+12
| | | | | | | | | | | | | | Task-number: QTBUG-45791 Change-Id: I763d9d1ba00989d0c6b1e0b955173dadbef26b10 Reviewed-by: Stephen Chu <stephen@ju-ju.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Liang Qi2015-10-025-1/+299
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-025-1/+299
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| | * Fix tst_QGuiApplication for embedded platforms using eglfs QPAPasi Petäjäjärvi2015-09-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Disable input and cursor for QGuiApplication instances used in autotest to initialize it properly. Change-Id: I78dc9b776269c082c20f244a51f858289129275d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Another fix of cosmetic QPainter::drawPolyline()Eirik Aavitsland2015-09-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the edge of the view, a line segment could end up as not producing any pixels even if not clipped by the floating-point clip routine. Make sure the starting point for the next line is still updated correctly for any significant segment lengths. Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Ensure sendPostedEvents() can be called independentlyJan Arve Saether2015-09-013-0/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Qt is not running its own event loop (e.g. if Qt is a plugin running in a non-Qt host application with its own event loop, a call to sendPostedEvents() should process all events by default, and not depend on the flags passed to the last call to processEvents() We also modify sendPostedEvents() to call its base implementation instead of directly calling QCoreApplication::sendPostedEvents(). (The behavior of the base implementation is the same, so no behavior change there). This also adds a test for QWindow event handling without Qts event loop is running. This is a black box test, just to ensure that basic functionality is working. It can be extended later. Task-number: QTBUG-45956 Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | tst_qdesktopservices: Use regular expression to suppress error message.Friedemann Kleint2015-10-021-1/+4
|/ / | | | | | | | | | | | | | | | | | | The error return has been observed to vary. Task-number: QTBUG-48566 Change-Id: Iecfe7819898a6a8a482c1b2251543193ecfa4841 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Tests: Always verify whether QTemporaryDir/File creation succeeded.Friedemann Kleint2015-09-283-10/+8
| | | | | | | | | | | | | | | | | | | | | | Use QVERIFY2() with QTemporaryDir/File::errorString() consistently. Attempt to catch issues like the below warning and follow-up issues. QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.) Task-number: QTBUG-47370 Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Tests: Harmonize code checking on platform name.Friedemann Kleint2015-09-245-17/+17
| | | | | | | | | | | | | | | | Use case insensitive comparison and static invocation of QGuiApplication::platformName(). Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Stabilize qguieventloop test.Jędrzej Nowacki2015-09-241-2/+0
| | | | | | | | | | | | | | | | | | The test assumed that an event loop can be tested for emptiness multiple times, which is wrong because an event can be delivered any time. Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix QImageReader::size() to return correct size for .ico files.Serge Lysenko2015-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth fields mean a maximum icon size 256 pixels. So QtIcoHandler::option() should return 256 instead of 0 pixels for such icons. Also there is fixed wrong seek offset at the second call on this method. http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx Task-number: QTBUG-48103 Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Serialize the capitalization value of QFontAndy Shaw2015-09-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By serializing the capitalization value of QFont, it ensures that it is correctly preserved when QPicture streams it and later plays it back. Subsequently the QDataStream version has been bumped up to account for the change of the data format for serializing QFont. [ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 17 to account for changes in the serialization of QFont. Task-number: QTBUG-15214 Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Replace direct QPA access in tst_qguiappliction with testlib wrapperTor Arne Vestbø2015-09-151-3/+3
| | | | | | | | | | Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Move min left/right bearing calculations to QFontEngine baseclassTor Arne Vestbø2015-09-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic used in the FreeType font engine can be generalized and move to the QFontEngine baseclass. This allows the CoreText font engine to correctly report the minimum left/right bearings, which decreases the chance that an optimization in QTextLayout's line breaking algorithm will produce wrong results. The calculation of left and right bearing has been moved to the glyph_metrics_t type to reduce code duplication. This allows us to use the with and height of the bounding box to determine if the glyph has any contours. Change-Id: I864697d3f31ed56f22f04666199b6c5023c5e585 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Harmonize input context selectionBernd Weimer2015-08-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* | Remove type punning from QRgba64.Erik Verbruggen2015-08-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | In C++, type punning with a union is not allowed. It will result in compiler defined behavior at best, and undefined behavior at worst. Specifically, if QRgba64 is passed to a function by value, the different members of a struct might be passed in separate registers. This means that any write to the quint64 might not blank out the values of the struct whenever the compiler looses track with TBAA. Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Fix repremultiply from RGB64 to RGB30Allan Sandfeld Jensen2015-08-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like from RGB32 to RGB30 we must also repremultiply when converting from RGB64 because the alpha channel loses more precision than the other color channels. Since this is not approximated accurately in the simple blending functions and the functions are no longer needed now the main render engine supports higher accuracy, the simple blending routines for RGB30 have been removed. Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | windows: Verify the built-in GPU blacklist in autotestsLaszlo Agocs2015-08-111-0/+16
| | | | | | | | | | | | | | | | | | Have an autotest to prevent introducing JSON syntax errors that become apparent only at runtime. Change-Id: If2bcbf4d227fddcbeb9c095b7986bada078131d7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-064-32/+66
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Don't expose qt_setQtEnableTestFont(bool) by defaultKonstantin Ritt2015-07-312-32/+58
| | | | | | | | | | | | | | | | | | Build it only in -developer-build mode for tests that might depend on exact-matching font behavior. Return earlier to avoid doing any useless job. Change-Id: I966ee5689f03403e45f4c957b63e3113f0467803 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Add test for invalid exif dataRainer Keller2015-07-172-0/+8
| | | | | | | | | | | | Task-number: QTBUG-46870 Change-Id: Idfde92ca12336c6432798b4517e244c2f5a5ba4d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-3136-773/+778
| | | | | | | | | | | | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | high-DPI tweaks for autotestsMorten Johan Sørvig2015-07-304-105/+104
| | | | | | | | | | | | | | Task-number: QTBUG-46615 Change-Id: I724f56fb3bc1a4b671b5d010765ef4e354412e2e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Support MRT in QOpenGLFramebufferObjectLaszlo Agocs2015-07-291-16/+173
| | | | | | | | | | | | | | | | | | | | | | | | Introduce overloads in the API to allow specifying multiple color attachment sizes and formats. When these are in use and MRT is supported, a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ... [ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject Task-number: QTBUG-39235 Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-274-8/+8
| | | | | | | | | | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | tests/auto/opengl: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | QZip*: don't hold QZipReader::FileInfo in QListMarc Mutz2015-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | FileInfo is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Change-Id: I772177c5ac544a5fecce2368f628148308ef260f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-3/+10
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Stabilize tst_QTouchEvent::touchBeginWithGraphicsWidget().Friedemann Kleint2015-07-161-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test sends touch events to the root item at the top left corner which fails if the views starts to scroll. Make the view sufficiently large to prevent scrolling and align at top left. FAIL! : tst_QTouchEvent::touchBeginWithGraphicsWidget() Compared values are not the same Actual (((root->touchBeginCounter))): 0 Expected (1) : 1 Loc: [/work/build/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1471)] Change-Id: I357322ccc809ddb5cb587febf3c75cbe497e59d8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Do not support static QIcon instancesFrederik Gladhorn2015-07-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | There was an attempt to allow static instances of QIcon in 7727a4355876607a1a022ff54e2570dae883f79c (Qt 4). This patch does only solve some of the corner cases and broke with aa5f70c00a88edcddd26e8fea767a40e8c5c31b8. Since the "breakage" has been there for two years, let's officially declare it unsupported instead of trying to work around the issue. Change-Id: I61e12fd03953763ee2e70eae58bcaecabdcb85b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Run tst_qwindow::positioningDuringMinimized on OSXMorten Johan Sørvig2015-07-071-1/+2
| | | | | | | | | | | | | | The test passes. Change-Id: Ic1a0aa4b861eb6fe18fed3d5b5cd4481b9f5fbad Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devLiang Qi2015-07-017-6/+48
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-017-6/+48
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| | * Replace MAC OS X with OS XNico Vertriest2015-06-301-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith <martin.smith@digia.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-111-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * fix usage of wince scopeOswald Buddenhagen2015-06-053-3/+3
| | | | | | | | | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* | | Fix A2RGB30 compositing testsAllan Sandfeld Jensen2015-07-011-6/+6
|/ / | | | | | | | | | | | | | | With two alpha-bits half opacity can not be represented, so we must use one third (85) instead of half (127). Change-Id: I2b3f1c983a3034196bf2604840945ad3a81f5b38 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>