summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QResourceFileEngine: fix map() for compressed filesThiago Macieira2018-11-191-0/+6
| | | | | | | | | We were returning a pointer to the compressed data and comparing to the compressed data size. Change-Id: I343f2beed55440a7ac0bfffd1563232d557c9427 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* tst_QResourceEngine: use QTest::addRow instead of QString concatenationThiago Macieira2018-11-191-23/+23
| | | | | | | Change-Id: I343f2beed55440a7ac0bfffd156322c95aebb847 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* tst_QResourceEngine: store the actual byte contents that we expectThiago Macieira2018-11-1912-39/+41
| | | | | | | | | | | Instead of using a QString with only the prefix, let's do a full comparison to make sure there's no junk at the end of the file. Take the opportunity to remove the nonsense of a space at the end of most of these files (I didn't remove from all). Change-Id: I343f2beed55440a7ac0bfffd15632228c1bfe78f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests: Distinguish tst_qeventdispatcher and tst_qguieventdispatcherLiang Qi2018-11-161-0/+1
| | | | | | | | | Both use same source, but link without and with Qt Gui library. Task-number: QTBUG-71751 Change-Id: I5643a07a8067f5fc10fc66f717f19bc3e16a33ab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-164-55/+189
|\ | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| * Re-blacklist tst_QEventDispatcher::registerTimer() on macOSUlf Hermann2018-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The test has been failing over and over since it was removed from the blacklist. Obviously it is not stable. This is a partial revert of commit b10ee45546e152e08b2494bd45eb22426e9d2dc9. Task-number: QTBUG-71773 Change-Id: Ie2588538ee704652c2f09ce6ad947da3011e7dad Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Make sure QEventDispatcher::registerTimer() cleans up after itselfUlf Hermann2018-11-151-52/+126
| | | | | | | | | | | | | | | | | | | | The test needs to also unregister its timers when it fails. Therefore, wrap the registering and unregistering in an RAII class. Task-number: QTBUG-71773 Change-Id: I6ef44e580880deecb32763b5b0cd71e1c26929be Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * macOS: Skip tst_QGLThreads::renderInThreadTor Arne Vestbø2018-11-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It crashes in the render thread: thread #7, name = 'SceneRenderingThread' frame #0: libsystem_kernel.dylib`__wait4_nocancel + 10 frame #1: libsystem_c.dylib`system + 452 frame #2: QtTest`stackTrace() + 325 frame #3: QtTest`QTest::FatalSignalHandler::signal(int) + 207 frame #4: libsystem_platform.dylib`_sigtramp + 26 frame #5: libsystem_platform.dylib`_platform_bzero$VARIANT$Base + 23 frame #6: GLRendererFloat`gldSetZero + 63 frame #7: GLRendererFloat`gldClearDrawBuffer + 3792 frame #8: GLRendererFloat`gldClearFramebufferData + 49 frame #9: GLEngine`glClear_Exec + 541 frame #10: tst_qglthreads`SceneRenderingThread::run() + 227 Task-number: QTBUG-68524 Change-Id: I6bc67cb342f77dc1a590a25af535f9bb7f0d325a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * Add missing protocol enumerators, report TLS 1.3 if negotiatedTimur Pocheptsov2018-11-071-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove the conditional inclusion of DTLS versions, they made difficult and unnecessary ugly adding new protocols (something like TlsV1_2OrLater + 4). 2. OpenSSL 1.1.1 first introduced TLS 1.3 support. OpenSSL 1.1 back-end is compatible with OpenSSL 1.1.1, but would fail to extract/report protocol versions and set versions like 'TLS 1.3 only' or 'TLS 1.3 or better' on a new context. Given 1.1.1 is deployed/adapted fast by different distros, and 5.12 is LTS, we fix this issue by introducing QSsl::Tls1_3 and QSsl::Tls1_3OrLater. SecureTransport, WinRT and OpenSSL below 1.1.1 will report an error in case the application requests this protocol (SecureTransport in future will probably enable TLS 1.3). Saying all that, TLS 1.3 support is experimental in QSslSocket. Done-by: Albert Astals Cid <albert.astals.cid@kdab.com> Done-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: I4a97cc789b62763763cf41c44157ef0a9fd6cbec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_qguieventdispatcher: Sync blacklist with tst_qeventdispatcherOliver Wolff2018-11-141-0/+5
| | | | | | | | | | | | | | | | Windows and WinRT only have on event dispatcher class so that failing test cases in one test will most likely also happen in the other. Change-Id: Ib047c6870e6e02f3cf8deaaa6e438ed0ac7e2d5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Manual dialogs test: Fix shortcutFriedemann Kleint2018-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix: QAction::event: Ambiguous shortcut overload: Ctrl+Q when pressing CTRL+Q Amends b5eb850e0deb61ff71e26a5a2d0e070b91306aa2 . Change-Id: Ie31d5830ea357cd34cdd422e667ceca507c7b53f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix precision in parsing hex format QColorsAllan Sandfeld Jensen2018-11-121-0/+3
| | | | | | | | | | | | | | | | | | We document being able to parse more than 8-bit per color, but were ignoring everything after the first 8 bits. Change-Id: Ic85ab04b0836e6979a623e294eebd5084c1a9478 Fixes: QTBUG-71373 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Manual dialogs test: Add option to turn off the printer panelFriedemann Kleint2018-11-121-3/+8
| | | | | | | | | | | | | | | | On Linux, the printer panel impacts the application startup time,which can be annoying when testing other dialogs. Change-Id: Id13446047cf50765951a6bb5182ee50cae983457 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | macOS: Remove blacklist entries for no longer supported OS versionsTor Arne Vestbø2018-11-127-13/+0
| | | | | | | | | | Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Fix test for multiscreenAllan Sandfeld Jensen2018-11-091-1/+1
| | | | | | | | | | | | | | | | QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() would fail when it moved to another screen if there is one to the left. Change-Id: I3f8edc04c31dffc5a3bd005d9e5170dd68151df7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-091-0/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * | QSyntaxHighlighter: Delay all highlights until first rehighlightMårten Nordheim2018-11-081-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling setDocument (directly or through the constructor) a delayed rehighlight is initiated. Previously, if any text was changed before this rehighlight could run it would cancel the rehighlight, even if the changed text only caused a new block of text to be highlighted. Fixes: QTBUG-71307 Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | QCborStreamReader: make sure setDevice() clears the last errorThiago Macieira2018-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit tests weren't running into this problem because the every setDevice() was preceded by the object being initialized with the exact same data, so there was never a previous error state. I've only changed a couple of tests, left the other setDevice() unchanged so we test both behaviors. Fixes: QTBUG-71426 Change-Id: I1bd327aeaf73421a8ec5fffd1561a590e3933376 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Make tst_qsslsocket::protocolServerSide() less flakyTimur Pocheptsov2018-11-071-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By accident, when we erroneously tried testing TlsV1_3 on macOS with SecureTransport (which does not support TLS 1.3) we hit this quite subtle problem: it can happen that a server-side socket is never created but a client (after TCP connection was established) fails in TLS initialization and ... stops the loop preventing SslServer::incomingConnection() from creating its socket. Then we dereference nullptr. Task-number: QTBUG-71638 Change-Id: I8dc5a4c53022a25aafe2c80a6931087517a48441 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-051-8/+8
|\ \ \ | | |/ | |/| | | | Change-Id: I12f26470e01a8582d0f02f51e20d5b742bd95d6f
| * | Update to CLDR v34Edward Welbourne2018-11-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only updates data on languages already present in 5.12; once it has merged up to dev, the scripts need to be run again to pick up a few more languages and possibly add any more new languages present in v34. Change some tests to match changes in en_AU's abbreviated day and month names. [ChangeLog][ThirdParty][CLDR] Update locale data to CLDR v34. Task-number: QTBUG-71144 Change-Id: I68402b5e7e9d3dba669b8ba31b9a8abd86675c6e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Stabilize tst_QAccessibilityLinux::testFocusFrederik Gladhorn2018-11-021-0/+2
| | | | | | | | | | | | | | | | | | | | | The tests would rely on the window manager giving it focus a bit too much. Change-Id: I1b28def2c95a4f0a9665a7cf6e0c14db03df98d5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | QSqlQuery: add another testcase for bindBool()Christian Ehrlicher2018-11-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QSqlQuery::bindBool() did not check if the bool is correctly bound as part of the WHERE statement. Add a new test to query for the bool column and check if there is exactly one row returned. Fixes: QTBUG-38891 Change-Id: I0bd1ceb1b30e50f67f44f5b06d68683195b78b29 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | QMimeType: Use default key as fallback for comment() propertyGary Wang2018-11-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QMimeProvider parses the shared mime database xml files, it will read the <comment> element for mime comment and treat the `xml:lang` attribute as locale language string. When no `xml:lang` attr is provided, QMimeProvider will read the value and treat it as a en_US locale string as the default key. When we call QMimeType::comment(), it will try to get the locale comment string with the default language (QLocale().name()), once it can't find a matched result, it should return the default key (which QMimeProvider set it as en_US locale before) as fallback. Task-number: QTBUG-71314 Change-Id: I444f8159d6f19dfef6338cd79312f608d8f13394 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Treat shorts as int in QVariant::canConvert()Allan Sandfeld Jensen2018-11-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern of char and float, and treat shorts as a more generic type in QVariant::canConvert() Task-number: QTBUG-60914 Change-Id: Ib1cc7941ee47cb0fc0098f22f98a03cd6f6b63fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Blacklist tst_QWindow::exposeEventOnShrink_QTBUG54040Heikki Halmet2018-11-011-0/+1
| | | | | | | | | | | | | | | Change-Id: Ib87d2820c4dbdf93778997b6df11cc7d8e63cf04 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | | QObject: Fix isSignalConnected() when signals have been disconnectedKari Oikarinen2018-10-311-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitmap cache for the first 64 signals being connected was only set when the connection is added. It was never unset when the connection was removed. Internal use of the connectedSignals bitmap is not hurt by it occasionally saying a signal is connected even though it is not, since the purpose of those checks is avoiding expensive operations that are not necessary if nothing is connected to the signal. However, the public API using this cache meant that it also never spotted signals being disconnected. This was not documented. Fix the behavior by only using the cache if it is up to date. If it is not, use a slower path that gives the correct answer. To avoid making disconnections and QObject destructions slower, the cache is only updated to unset disconnected signals when new signal connections are added. No extra work is done in the common case where signals are only removed in the end of the QObject's lifetime. Fixes: QTBUG-32340 Change-Id: Ieb6e498060157153cec60d9c8f1c33056993fda1 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | tst_QCborValue: Disable support for spaceship operatorJüri Valdmann2018-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | Spaceship operator was disabled for QCborValue, but not the test. Change-Id: Icb91da689f62ef6de9f4fa926346505c5e50e9eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | winrt: Skip a test row of tst_QRegularExpression::threadSafetyOliver Wolff2018-10-311-0/+4
|/ / | | | | | | | | | | | | | | | | PCRE2 does not support JIT on winrt. This test row takes a long time (30 seconds here) without JIT and thus might cause test timeouts in COIN when run on winrt. Change-Id: I79d9f6be16dbe16594ae2bf51f353acd06b3d2fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qendian: Fix float conversionsIvan Komissarov2018-10-281-3/+37
| | | | | | | | | | | | | | | | | | Since Qt 5.10, qTo/FromBig/LittleEndian<float/double> stopped working. It may be confusing, but big endian floats do exist, so not to break old code, we should support them. Change-Id: I21cdbc7f48ec030ce3d82f1cd1aad212f0fe5dd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_qeventdispatcher: remove macOS from the BLACKLISTTimur Pocheptsov2018-10-251-2/+0
| | | | | | | | | | | | | | | | | | the test is stable in Qt 5.12. Task-number: QTBUG-60993 Change-Id: I0c366567121688d9518e90b5e8f9ec1b4006b7b9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_QLocalSocket::processConnections: remove QSKIPTimur Pocheptsov2018-10-251-3/+0
| | | | | | | | | | | | | | | | | | on macOS, the test seems to be stable nowadays. Task-number: QTBUG-39986 Change-Id: I18430c3feb27a5bee5474e1eb95f7d89b25f00a9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Remove QSKIP and bring the test back to businessTimur Pocheptsov2018-10-251-3/+0
| | | | | | | | | | | | | | | | | | on macOS, where it was skipped but where it now seems to be stable/work. Task-number: QTBUG-39983 Change-Id: I100a57f23b43074ebacc012be247d92acc6ae336 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | tst_qfilesystemmodel: Do not use nested calls of auto test functionsOliver Wolff2018-10-251-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling rowCount inside another auto test function yields unexpected results, if rowCount fails. Without a check for QTest::currentTestFailed the failure will not stop the calling function and other functions like rowsInserted and rowsRemoved might happily continue even though their requirements are not met. That caused a crash on winrt under certain circumstances. In addition to that TRY_WAIT now does not only wait for the given amount of time, but also gives feedback about its result. Before this change TRY_WAIT was basically useless, as it gave no indication about its success/failure. Fixes: QTBUG-71121 Change-Id: Ibd3f233a0b913db799814be97c4274d510643c74 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Linux Accessibility: Fix expandable stateFrederik Gladhorn2018-10-221-0/+8
| | | | | | | | | | | | | | | | The state was forgotten from the translation layer, this is important for tree views. Fixes: QTBUG-71223 Change-Id: Ief4004fe455889f9d5a7eb018bf34d37c36a6bd9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | tst_QAccessibilityLinux make state checking more convenientFrederik Gladhorn2018-10-221-20/+25
| | | | | | | | | | Change-Id: I96274ab0a0f5d942746de0166df47936e2390c65 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Fix building tests with -no-guiJüri Valdmann2018-10-203-6/+8
| | | | | | | | | | Change-Id: I37307080e5adc334fcfcdd2fee650d675228a746 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QTableWidget: fix cellChanged signal emitted by takeItem()Christian Ehrlicher2018-10-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | QTableWidget::takeItem() emitted cellChanged with row and column set to -1. The internal functions searched for item after it was reset to nullptr and therefore it was not found. Since the modified cell is known because it's passed to the takeItem function, the correct row/column can be retrieved from there. Task-number: QTBUG-70478 Change-Id: I5ff5991c49f3200efe95fde4c7d0d28e19be7ebf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Fix odd test in tst_qflagsAllan Sandfeld Jensen2018-10-171-1/+1
| | | | | | | | | | | | | | | | This test triggered a compiler warning for good reason, it made no sense, trying to change it to what it was probably meant to be. Change-Id: I01a848272b42dae2aaa58a4f5bed998644d864da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QMetaEnum: fix UBAnton Kudryavtsev2018-10-171-0/+10
| | | | | | | | | | | | | | | | | | Check ptr before usage. Change-Id: Iac757a2e260b237d837318932cc0b5896c6e04c2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-171-3/+3
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Modernize the "animation" featureLiang Qi2018-10-121-3/+3
| | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Don't drop update requests when closing and reopening windowsUlf Hermann2018-10-161-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 4d15f393a76cfcc4d54f311884fedac5bf0f72ee update requests were handled by a timer on QWindow. Therefore they survived the closing and re-opening of platform windows. Now, as the timer was moved to QPlatformWindow, it gets reset when you close the QWindow, and any pending update requests are lost. However, we do set the updateRequestPending variable on QWindow when requesting an update. Therefore, we can also restore the update timer on the platform window when creating it. Change-Id: I23b00f24a46706beac7d1455edd8a5623db46b22 Fixes: QTBUG-70957 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QToolTip: Don't crash if a tool tip is shown outside screen geometryJohan Klokkhammer Helsing2018-10-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, a tool tip may be shown outside screen geometry, i.e. if: - QToolTip::showText is invoked manually with a position outside. - In tst_QToolTip::setPalette if there is no screen at (0, 0). This might happen in a multi-monitor setups where one screen is taller than the other. - On Wayland windows are (by design) not allowed to know their position on the screen. This means that global positions can't be trusted. This started crashing when QDesktopWidget::screenGeometry(pos) was replaced with QGuiApplication::screenAt(pos)->geometry() because screenAt will return null if no screen is found, while screenGeometry defaulted to the primary screen. This reverts to the old behavior of falling back to the primary screen. This won't solve the issue completely for the Wayland case, but at least we will stop crashing. Change-Id: I42dd07cc21c2f9f0ea0d69f0c25bd46d8a2615a0 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Improve support for QImages in QDataStream read transactionsEirik Aavitsland2018-10-151-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage's operator>>(QDataStream&) did not set an error mode on the stream on read failures. That would break QDataStream transactions. Since the current QImage serialization cannot differentiate between truncated and corrupted data, we set the ReadPastEnd error as expected by the transaction system. Also specify the expected file format on decoding QImage from stream, to avoid all the format handlers' canRead() being invoked. This is necessary since some of them may call ungetChar(), which fails when the stream is in a transaction. Also add testing of this feature to the QDataStram transaction autotest. That required a slight rewrite of the fake sequential QIODevice subclass. The previous implementation had incorrect behavior of peek(), which is required by QImage decoders. Task-number: QTBUG-70875 Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QImageWriter/QPNGHandler: Quality option should be CompressionRatioAlexandra Cherdantseva2018-10-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | Wrong option was used to set zlib compression level for png setCompression with negative value uses default compression setCompression with value between 0-100 converts to zlib compression level 0-9 setCompression with positive value overrides Quality option Change-Id: Ic4b048a1e30d6940019c2a00a6c24d0c11e3f821 Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Update ANGLE to chromium/3280Miguel Costa2018-10-131-0/+1
| | | | | | | | | | Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QCss: properly parse functions which contains additional spacesChristian Ehrlicher2018-10-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | When there were additional spaces between the function definition and the first parameter, the parser failed to parse it when it contained another function (e.g. 'qlineargradient(... rgb() ...)'). The reason for this was that ::until() needs the function at index-1 so it can correctly count the opening parenthesis. Fixes: QTBUG-61795 Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Fix builds without DTLSAllan Sandfeld Jensen2018-10-091-1/+1
| | | | | | | | | | | | | | Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Support QCborMap::operator[] taking a string literalEdward Welbourne2018-10-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a template on the size of the char[], as suggested by Ville Voutilainen. This resolves ambiguity about whether such look-ups should be done via QString or QCborValue (not that it would have made any difference). When we come to add mutating indexing of QCborValue, chained dereferences like map[i][j][k] need to stay in operator[] const throughout, to avoid detaching intermediates to create references into them due to using the mutating operator[] on the earlier dereference's return. So const-qualify the QCborValue operator[] const variants at the same time, to match those of QCborValue itself. Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>