summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add a QPalette color role for placeholder textsFilipe Azevedo2018-05-042-12/+13
| | | | | | | This allow to customize easily placeholders in QLineEdit by example. Change-Id: I2bb379164376e1d88b42d6c86c2e5b8df99fbc56 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Fix stretch of condensed fonts with NoFontMergingEskil Abrahamsen Blomfeldt2018-05-041-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing a condensed font with AnyStretch, we should not apply any stretch to the font (and if a stretch is requested, we should calculate the actual stretch based on how much the font is already stretched or condensed). This usually works as expected, however, when using QFont::NoFontMerging as the style strategy, we would scale the glyph advances by the stretch of the font since the calculated stretch of the font engine would be overwritten by the actual stretch. In the case where we use font merging, this would be done for the multi engine, so we would not get the same issue, since the text engine gets the stretch from the actual font engine and this still has the original, calculated stretch set. Note on the test: We can't use testString() for this, since it contains a space, and the test font does not have a glyph for this, so we will end up merging a different font for the space, giving us a slightly different advance. [ChangeLog][QtGui][macOS] Fixed display of condensed fonts when NoFontMerging is in use. Task-number: QTBUG-63800 Change-Id: I5b05e0dbfc8ae4b5d10c621ecb0975f53fda9483 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-037-27/+159
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * tests: unblacklist tst_qwindow.cpp::modalWindowPosition()Gatis Paeglis2018-05-031-2/+0
| | | | | | | | | | | | | | For details see QTBUG-67757. Change-Id: I82559cb667a8622f29f7e6a6f24bc2b1e59917d6 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
| * tst_QUdpSocket: Fix Clang warning about unused expressionFriedemann Kleint2018-05-021-2/+4
| | | | | | | | | | | | | | | | | | tst_qudpsocket.cpp(965,9): warning: expression result unused [-Wunused-value] if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData()) Task-number: QTBUG-63512 Change-Id: I51959432c6ff166c188842e34c3033ab1319c079 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * If the page size is not valid on the new printer, set a custom sizeAndy Shaw2018-05-021-0/+45
| | | | | | | | | | | | | | | | | | | | | | When the page size was not valid on the new printer, it would end up having the wrong page size name on the new printer. What should happen in this case is that it should set the originally set page size as a custom page size on the printer instead. Task-number: QTBUG-62221 Change-Id: Iaca34ae262f5d0685ca60e4ca4b38229a2283289 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
| * Manual touch test: Add handling for multiple touch screensFriedemann Kleint2018-05-021-18/+80
| | | | | | | | | | | | | | | | | | - Add a display label showing the screen parameters. - Add a menu option to launch secondary windows and restructure the code accordingly Change-Id: I2bdb76da0b0a00e62db41e674aa93cef9598fe67 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Tests: Fix clang warnings about unused variables and capturesFriedemann Kleint2018-05-022-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | tst_qline.cpp(170,12): warning: unused variable 'baseB' [-Wunused-variable] ^ tst_qline.cpp(169,12): warning: unused variable 'baseA' [-Wunused-variable] tst_qheaderview.cpp(3329,14): warning: lambda capture 'this' is not used [-Wunused-lambda-capture] waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; }); qheaderview.cpp(3338,14): warning: lambda capture 'this' is not used [-Wunused-lambda-capture] waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; }); Change-Id: I0245a7b66d15b896e864b488f7a58e8513fbdc6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix crash in QMacPanGestureRecognizerJan Arve Saether2018-05-021-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason it crashed was this: 1. Button was pressed => _panTimer started with the graphics view as destination. 2. Button was released => the graphicsview is destroyed 3. 300 ms later: Qt tries to deliver TimerEvent from _panTimer to the graphics view. Unfortunately, the graphics view is deleted, but Qt doesn't know that... (*crash*) We therefore chose to start the timer with a destination we are controlling the lifetime of: the QMacPanGestureRecognizer. Inside the timerEvent of that we can check if the actual target is already destroyed. Task-number: QTBUG-60404 Change-Id: Iff8f5b7217de42c4c5cf551ca507f0cff1c99a78 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Add option to override comparison fuzziness level to lancelot testsEirik Aavitsland2018-05-031-0/+11
| | | | | | | | | | | | | | | | Sometimes useful to force e.g. an exact match. Change-Id: Ic417a518d91b579c23dea925f747955f11d4143b Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add commandline option to lancelot tests for forcing baseline updateEirik Aavitsland2018-05-031-2/+17
| | | | | | | | | | | | | | | | | | | | Normally done through the webform, but this option is useful for scripted running of such tests. Also option to disable such updating alltogether, to allow runs that will never modify the baseline suite. Change-Id: I71cc7564453e63bda7ded2b90be01280c9dbb95a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-0210-68/+214
|\| | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * tst_QTabWidget: Add unconditional qWait() backKari Oikarinen2018-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | paintEventCount() is currently flaky on macOS. It gets extra paint events after qWaitForWindowExposed() returns, which causes the following assertions to fail. Add the wait that was removed in 0cb940b1d3b9a1ba50f2d1973fca411706da266d back to fix those failures. Task-number: QTBUG-68032 Change-Id: I68e0b6008de40922ec740291dfdd1842e0f62f89 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * QItemSelectionModel: More fixes for is(Column/Row)SelectedDaniel Teske2018-04-301-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the code for isRowSelected and isColumnSelected with a much simpler algorithm for deciding if a row/column is selected. In a model with a cross-hatch of unselectable indexes, the return values of is(Column/Row)Selected would depend on the order in which the selections were done. Task-number: QTBUG-18001 Change-Id: I6aa4b1df7c07fae469a686041927fa8c42bc9b16 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * tst_QLineEdit: Use correct keys to move to Start/End of LineDaniel Teske2018-04-301-7/+17
| | | | | | | | | | | | | | | | | | Home/End don't actually work on macOS. The "select all and delete" key was not actually testing anything at all. Change-Id: I44d3e9dd27da418afd699bf8720d5369325d20df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Polish the manual touch testFriedemann Kleint2018-04-301-14/+16
| | | | | | | | | | | | | | Introduce C++11, nullptr, for, port to Qt 5 connection syntax. Change-Id: I2d233ccd68bad533af8d4674d91236b2c049e997 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Stop rejecting cookies which have a domain that matches a TLDMårten Nordheim2018-04-301-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... but only if the host it came from is an EXACT match. Also only apply the cookie if the url is an EXACT match. [ChangeLog][QtNetwork][QNetworkCookieJar] Cookies will no longer be rejected when the domain matches a TLD. However (to avoid problems with TLDs), such cookies are only accepted, or sent, when the host name matches exactly. Task-number: QTBUG-52040 Change-Id: Ic2ebd9211c48891beb669032591234b57713c31d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * tests: Include qglobal.h in EmulationDetectorKari Oikarinen2018-04-301-0/+2
| | | | | | | | | | | | | | | | | | Checking for Q_OS_LINUX, Q_PROCESSOR_ARM and use of QT_CONFIG() checks should only happen after qglobal.h is included. Otherwise the header will be broken if included before something that uses qglobal.h Change-Id: I052e46784f7b174e74e8894e1b7c5b7528420f5d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_QFocusEvent: Add qWaitForWindowActive() to checkReason_focusWidget()Kari Oikarinen2018-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | checkReason_ActiveWindow() started failing on Windows when run together with other tests, but still passed on its own. The offending tests was checkReason_focusWidget(), which showed a window but did not wait for it to be active. After adding this wait the whole test executable passes on Windows as well. Amends fd87c8da82b4bf52d395a5f9a2687e4eb7a22221. Change-Id: I384bc45176fcd7bf6f491a4f39b46464ba45693b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * tst_QString: remove old HP aCC workaroundThiago Macieira2018-04-271-8/+0
| | | | | | | | | | Change-Id: I3840d727dee443318644fffd15291b1d77dca2fc Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QWidgetWindow: Immediately forward close events to QWindowUlf Hermann2018-04-271-0/+28
| | | | | | | | | | | | | | | | | | This way the platform window is destroyed in a timely manner, preventing redundant close events from the window system. Task-number: QTBUG-43344 Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * tst_Gestures: Use QTest::qWaitForWindowExposed()Kari Oikarinen2018-04-271-37/+19
| | | | | | | | | | | | | | | | Instead of a local wrapper for it. Change-Id: I0708dfad44b3db0c7a13e75ba5b4193ab50ac315 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | tst_QMenuBar: Remove obsolete warning checkGabriel de Dietrich2018-05-011-1/+0
| | | | | | | | | | | | | | | | | | | | This warning was removed when we refactored QCocoaMenuItem::sync(). This change amends 8412009de62ff0c9540290b6fb0b8d1f470b2cb8. Task-number: QTBUG-68013 Change-Id: I0d65109dff5f82db530b6bdced96c05692af6b4b Reviewed-by: Liang Qi <liang.qi@qt.io>
* | QGraphicsView: Improve high-DPI item cachingMorten Johan Sørvig2018-04-261-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | Scale cache size by target paint device devicePixelRatio. Add manual test for the cache modes. Change-Id: I9f3a2b4c4cf12571aefe54ebf534009a2448fb48 Done-with: MihailNaydenov <garfieldhq@yahoo.com> Task-number: QTBUG-26795 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-04-2634-189/+62
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-2634-189/+62
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| | * tests/auto/widgets/widgets: Avoid unconditional qWait()sKari Oikarinen2018-04-2522-141/+42
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63992 Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * tests/auto/widgets/{effects,styles}: Avoid unconditional qWait()sKari Oikarinen2018-04-252-9/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63992 Change-Id: I1af537bae705d4627880c5ae50669b1ef72562f2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Skip flaky tst_QWindow::childWindowPositioning on WaylandJohan Klokkhammer Helsing2018-04-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes causes protocol errors (i.e. termination) on Wayland with xdg-shell v6. Task-number: QTBUG-67648 Change-Id: I6c855affb145590f47a425d233c5fd6b7e1e8914 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| | * Fix division by zero in radial gradiants with NEONAllan Sandfeld Jensen2018-04-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The NEON implementation uses rsqrt and thus can not be taken on 0, so replace the minimum with something close to zero instead of zero. Task-number: QTBUG-59961 Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Atomics: remove requirement for alignment equality with plain typesThiago Macieira2018-04-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally added so that you could replace a T with QAtomicInteger<T> in the same class and still keep ABI. However, for legacy reasons, on 32-bit x86, types larger than 4 bytes keep an old 1990s alignment of only 4 bytes, but modern std::atomic<T> for those 8- byte types enforces an alignment of 8 bytes. Therefore, the requirement to keep alignment is not possible to guarantee. In other words: you may not replace T with QAtomicInteger<T> or std::atomic<T> and assume no ABI breakages in all platforms. This is a requirement to implement atomicity. An 8-byte type aligned to only a 4-byte boundary could cross a 16-byte boundary or, worse, cross a cacheline boundary. Crossing the 16-byte boundary could be bad on some processors, but crossing the cacheline boundary (addresses ending in 0x3C, 0x7C, 0xCC and 0xFC, or 4 out of 64 possible addresses or 6.25%) is always bad: the CPUs cannot guarantee an atomic load or store operation. See also <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71660>. Task-number: QTBUG-67858 Change-Id: If90a92b041d3442fa0a4fffd15283e4615474582 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * tests/auto/widgets/kernel: Avoid unconditional qWait()sKari Oikarinen2018-04-247-33/+10
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63992 Change-Id: Icb32b516002c3bb2841c8e7a29624e54cfcbbcac Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | High-dpi drawTiledPixmap (raster paint engine)Morten Johan Sørvig2018-04-261-0/+54
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement more consistent behavior for drawTiledPixmap(), which should produce the same visual tiling pattern independent of display devicePixelRatio Consider the following pixmaps and draw calls: QPixmap px32; // 32x32 QPixmap px64; // 64x64 drawTiledPixmap(QRect(0, 0, 128, 128), px32); drawTiledPixmap(QRect(0, 0, 128, 128), px64); On 1x displays this will produce 4x4 and 2x2 tiles, respectively. On 2x displays this would previously produce a different tiling pattern, where the paint engine would tile in the device pixel coordinate system. Change this to tile in the device independent coordinate system, producing the same visual tiling pattern as the 1x case. It is possible to produce a 4x4 tiling pattern with high-resolution output from the 64x64 pixmap by setting the devicePixelRatio: QPixmap px64; px64.setDevicePixelRatio(2); drawTiledPixmap(QRect(0, 0, 128, 128), px64); This change adds an inverse scale to the image filler transform that accounts for the pixmap devicePixelRatio. [ChangeLog][QtGui] QPainter::drawTiledPixmap() now tiles in the device independent coordinate system. Change-Id: I4918d274192967f222f181b374571c7c597dcd76 Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: 石博文 <sbw@sbw.so> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix drawTiledPixmap() and texture-brush painting with high-DPR imagesEirik Aavitsland2018-04-253-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Although QPainter::drawImage()/drawPixmap() would render images scaled according to their devicePixelRatio(), that would not happen for drawTiledPixmap() and when using a textured brush. Implemented here, in combination with the pending "High-dpi drawTiledPixmap (raster paint engine)" commit. [ChangeLog][QtGui] Fix drawTiledPixmap() and texture-brush painting with high-DPR images Task-number: QTBUG-67248 Change-Id: I037e3f897fa708038a0222d3b0c61c7842d87961 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | tests: cleanup tst_QComboBox::keyBoardNavigationWithMouse()Gatis Paeglis2018-04-252-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use QCursor when we can position a mouse relative to the window coordinates via QTest::mouse*() functions. Even the way QCursor was user here seemed to be hackish. This hack apparently was there to make the test pass on macOS, I have verified that the updated test continue working on this platform. - Remove Q_OS_QNX ifdef, as this test does not depend on QCursor anymore. - Remove QTest::qWait()-s. Unconditinal waiting should not be used. - Add better comments. - Other minor things. And move tst_QComboBox to use QTEST_QPA_MOUSE_HANDLING code path. Eventually we want to deprecate the legacy code path. Change-Id: Ib72f324b5197d0fd66fc32b8c1c7509e58838e04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-241-4/+0
|\| | | | | | | Change-Id: If950406391f79d99f0101f0b6755395accb26f34
| * tst_QFile: Don't expect Windows HANDLE equality in nativeHandleLeaks()Kari Oikarinen2018-04-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | That check is flaky on Windows. It doesn't seem to be testing Qt functionality. I also don't see CreateFile2() documentation mentioning any guarantees that opening the same file twice would give the same HANDLE each time. Change-Id: Ica2e60571ae9fc39bf822803a2a9dd6add8323d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Make it easier to use resources in plugins when using static linkingSimon Hausmann2018-04-237-23/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCC generates code that registers resources automatically on program startup via global constructors. When linking statically and nothing references the symbols in the .o file compiled from the RCC generated code, then the linker will discard the embedded resources and they will not get initialized. That is why for static linking it is necessary to explicitly initialize resources using the Q_INIT_RESOURCE macro. We can avoid the need for the explicit initialization in the context of plugins that are statically linked into the application. resources.prf can generate a .cpp file with a helper function that contains all the Q_INIT_RESOURCE calls for all resources in the plugin. That helper function in turn is injected into the plugin entry point, which in turn is guaranteed to be included in the final binary. Change-Id: If1abf9c85ef92935020af073b989c58c1ae6ca63 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Introduce QPasswordDigestor functionsMårten Nordheim2018-04-233-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | Added a few functions to derive keys from passwords. Currently it supports PBKDF1 and PBKDF2 as defined in RFC 8018 ( https://tools.ietf.org/html/rfc8018 ). [ChangeLog][QtNetwork][QPasswordDigestor] Added QPasswordDigestor Task-number: QTBUG-30550 Change-Id: I2166b518bd8b54e3486514166e76fd9ba2f219c8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QSslKey: Implement PKCS#8 support for the generic backendMårten Nordheim2018-04-231-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to decode keys which are encoded with PKCS#8 using the generic back-end (used in winrt and secure transport). It works on both WinRT and macOS; however QSslKey seems unused in the WinRT backend and it seems only RSA keys can be used for certificates on macOS. Meaning that DSA and Ec, which in theory* should represent their unencrypted versions, can't currently be tested properly. * Can also be confirmed by loading the key using the ST or WinRT backend, calling toPem(), writing the output to a file and then loading the unencrypted key using openssl. [ChangeLog][QtNetwork][QSslKey] Added support for PKCS#8-encoded keys in the generic SSL back-end (used for SecureTransport on macOS and for WinRT). Note that it does not support keys encrypted with a PKCS#12 algorithm. Task-number: QTBUG-59068 Change-Id: Ib27338edc7dbcb5c5e4b02addfdb4b62ac93a4c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Speed up QTimeZone::isTimeZoneIdAvailable by a factor 43David Faure2018-04-233-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating and sorting a list of bytearrays just to check if one entry is present, is really overkill. By adding a new virtual method isTimeZoneIdAvailable() in the backend classes, we can do this much more efficiently. Implemented for Utc and Tz backends, the others fall back to the slow way. The new benchmark shows, in release mode: Before: 43 msecs per iteration (total: 86, iterations: 2) After: 1.1 msecs per iteration (total: 73, iterations: 64) Change-Id: Ic0d79a41d74e2ce6aa088fa7986c41d33902c36b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Qt Forward Merge Bot2018-04-203-190/+154
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-203-190/+154
| |\| | | | | | | | | | Change-Id: I0bea38585382b5d9c8d7a013bf6bcb3a6008d159
| | * Send ShortcutOverride event when receiving a non-spontaneous key pressAndy Shaw2018-04-201-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a key press is received which is not spontaneous then it needs to be manually sent as a shortcut override event to ensure that any matching shortcut is triggered first. This enables emulation/playback of recorded events to still have the same effect. [ChangeLog][QtWidgets] Sending a key press event with sendEvent() now sends a ShortCutOverride event first to the widget to trigger any shortcuts set first. Task-number: QTBUG-48325 Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Manual shortcut test: Arrange in QGridLayoutFriedemann Kleint2018-04-181-190/+114
| | | | | | | | | | | | | | | Change-Id: I93264bec8810f4dd1e2c010cc4dd35df93f31102 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Blacklist tst_QWindow::isActive on UbuntuKari Oikarinen2018-04-181-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-67768 Change-Id: Ie1e0b406c152c854ef3629fa4d469dd73452f128 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | tst_qimagereader: Make sure to include all image resources in testTor Arne Vestbø2018-04-202-70/+2
|/ / | | | | | | | | | | | | | | The manually maintained qrc file was missing corrupt_clut.bmp among others. Change-Id: I8916ba76a63950de03f25814d893306d046d273d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add HTTP caching headers to KnownHeadersJan Murawski2018-04-191-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkRequest is already aware of the Last-Modified header but has been lacking support for the If-Modified-Since, ETag, If-Match and If-None-Match headers. These headers are used with HTTP to signal conditional download requests. See RFC 7232 for more information. Change-Id: I248577b28e875fafd3e4c44fb31e8d712b6c14f1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QObject: Extend debug output of connectLars Schmertmann2018-04-181-0/+21
| | | | | | | | | | | | | | | | | | | | Sometimes it is hard to find the line, when the warning "QObject::connect: invalid null parameter" appears in the log. This change adds the class names of the sender and receiver to give a hint where to search for the wrong call to connect. Change-Id: I00cead7d943f96d60f198cb3f0bed34ba10285c5 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Auto-tests: remove unneeded 'gui' from QT variableTimur Pocheptsov2018-04-182-3/+3
| | | | | | | | | | | | | | | | none of these tests needs anything GUI-related. Change-Id: I6b3c02bf13da60ab460f0cc4d804f1d03bc68f50 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>