summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that child windows are visible again when showing their parentAndy Shaw2019-10-311-0/+23
| | | | | | | | | | | | | | | When a window is closed, then it will cause the child windows to be closed as well as a result. Therefore in order to ensure that they are shown again as a result, we need to remove the WA_WState_ExplicitShowHide attribute if the widget was not already hidden before. This enables us to test for this attribute when calling showChildren(), so that if the window has a windowHandle then we can make sure that this widget is shown again. Fixes: QTBUG-73021 Change-Id: I1186242b889899dfcd38d782a67567348e2055ee Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit ccd3bf0871b81dfc09bb469b161f32dfb47ee53e)
* DTLS auto-test(s) - fix a buggy logic with pending datagramsTimur Pocheptsov2019-10-112-4/+4
| | | | | | Fixes: QTBUG-79128 Change-Id: Ifebd5b056541b7732b15b5cf063ad22ab754a64c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix QRandomGenerator initialization on AMD CPUsDmitry Kazakov2019-10-081-3/+3
| | | | | | | | | | | | | | | | Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a failing random generation instruction, which always returns 0xffffffff, even when generation was "successful". This code checks if hardware random generator generates four consecutive equal numbers. If it does, then we probably have a failing one and should disable it completely. Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a Fixes: QTBUG-69423 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 5839714d986f28412c9f9ed4801d1bf9378f7b51) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update lancelot tests to use non-system-specific host info collectionDaniel Smith2019-09-231-18/+10
| | | | | | | | | | | Change the lancelot baseline test runner to use generic text files for host info data collection. This also avoids relying on QProcess and scraping the bash scripts output from stdout. Fixes: QTBUG-71836 Change-Id: I88a46c99dbb11f71afc18cae5a6d2fbebcbe76c5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 651dd26403052f98397783927ad02e008acf0552)
* MS TZ data: avoid calculating a date in year 0Edward Welbourne2019-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | There is no year 0 in the proleptic Gregorian calendar, so QDate() won't be happy if asked for a date in it. Tweak scanning of the data we get from MS-Win so as to avoid a date calculation that could otherwise happen in year 0 when constructing QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")). Added a test for this case, which Oliver Wolff has kindly verified does reproduce the assertion failure. However, Coin is unable to reproduce, as all its MS builds are configured with -release, so Q_ASSERT() does nothing. (The relevant code then skips over year 0, albeit for the wrong reasons, and gets the right results, albeit inefficiently, leaving no other symptom by which to detect the problem.) Fixes: QTBUG-78051 Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 8286daba038d3c90d2bc06785ffcf9c0c603cb83) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12.5' into 5.12Qt Forward Merge Bot2019-09-071-0/+17
|\ | | | | | | Change-Id: I41a252fdbf22551aadb0b1a6e9ecf3f95f99fbd4
| * Fix crash when text contains too many directional charsRainer Keller2019-08-301-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a text to be layouted contains more than 128 directional characters it causes the application to crash The function initScriptAnalysisAndIsolatePairs() collects information of RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is capped to 128. Later the function generateDirectionalRuns() iterates the text again and tries to access items from the previously capped vector above the upper bound. Task-number: QTBUG-77819 Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QShortcut: call base class implementation in event()Christian Ehrlicher2019-09-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | QShortcut::event() did not call the base class implementation QObject::event() which caused that e.g. QEvent::DeferredDelete was not handled. Fix it by calling QObject::event() when the event was not handled. Fixes: QTBUG-66809 Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | tst_http2::goaway - run in ALPN mode onlyTimur Pocheptsov2019-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | I was observing rare crashes on my mac, where I was using SecureTransport. This would imply both the client (the test) and the server were working in h2c mode. But this is against the test's logic - the first request will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2 requests instead. Fixes: QTBUG-77476 Change-Id: I048ca242e2096ca36dd112277807d1fee530150c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QPainter lancelot test: improve drawImage testingEirik Aavitsland2019-09-021-2/+8
|/ | | | | | | | | | | | | In QPainter, there is a shortcut code path for the drawImage(point, image) call, relative to the full drawImage(targetRect, img, srcRect). The lance script interpreter would only use the latter, so the former was not covered by the tests. As a driveby, remove the pointless usage of non-default dithering flags in drawImage(), since it is more important to test the default. Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make the inputRejected test compatible with -no-feature-clipboardJames McDonnell2019-08-151-0/+4
| | | | | | | | | Qt for QNX is, by default, built without the clipboard feature. Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* QTextureFileReader: backport ASTC supportEirik Aavitsland2019-08-154-24/+51
| | | | | | | | | | Add support for astc format files as an experimental feature. To enable, configure with "-feature-texture_format_astc_experimental" (Backported from commit 5a4db421bd94acd12a4ac1f77031996b95f85dbf) Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix qinstall on Windows for directories containing read-only filesJoerg Bornemann2019-08-151-3/+0
| | | | | | | | Initial patch by: Vlad Lipskiy <eswcvlad@yahoo.com> Fixes: QTBUG-77299 Change-Id: I803b809d1f23d844252b701cb070f6e4ba34eca1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add tst_qmake::qinstallJoerg Bornemann2019-08-143-0/+108
| | | | | | | | ...with a failing test case for QTBUG-77299. Task-number: QTBUG-77299 Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make test less dependent on moving the cursorMorten Johan Sørvig2019-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | The sendMouseMove() function calls QTest::mouseMove(), which again calls QCursor::setPos() to move the cursor. It then creates and sends a MouseMove event, using the constructor which picks up the global position by calling QCursor::pos(). On macOS 10.14, QCursor::setPos() may silently fail if the user does not grant the application permission to move the cursor (via a dialog). As result of this the mouse move event gets an incorrect global position. Provide the global position directly when creating the event to make sure it gets the correct value. Task-number: QTBUG-75786 Change-Id: I3e8df450fea802783a3d1dbe471753f502b42de3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWizard: Account for missing background image on macOS 10.14+Morten Johan Sørvig2019-08-111-10/+9
| | | | | | | | | | | We were loading “Background.png” from the KeyboardSetupAssistant app bundle. As of macOS 10.14 that image is no longer there. Adjust auto tests and document the behavior. Change-Id: Icb4dd73b3fa88927e87bb86db2bc9f7b4a8094f7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *)Morten Johan Sørvig2019-08-111-0/+18
| | | | | | | | | Commit b6ded193 added an unconditional dereference of the platformScreen pointer, for calls where nativePostion is non-nullptr. Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QBitArray: fix fromBits() and actually test itThiago Macieira2019-08-081-0/+57
| | | | | | | | | | | | | | | When I initially added it, it was ony for QCborValue, but I never added the tests. Turns out there were two bugs: [ChangeLog][QtCore][QBitArray] Fixed two bugs that caused QBitArrays created using fromBits() not to compare equal to the equivalent QBitArray created using other methods if the size was zero or not a multiple of 4. If the size modulus 8 was 5, 6, or 7, the data was actually incorrect. Fixes: QTBUG-77285 Change-Id: Ife213d861bb14c1787e1fffd15b70573d162042c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* A GCC 4.8 build fixVille Voutilainen2019-08-081-1/+1
| | | | | Change-Id: Ic128486711118e1124739e8dca30547ab8ba9816 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash in QTextDocument::clearUndoRedoStacks()Eskil Abrahamsen Blomfeldt2019-08-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When calling QTextDocument::clearUndoRedoStacks() with UndoStack, there were two bugs: The first was that we were retrieving the item at "undoState" and deleting this. This is actually the upper limit of the for loop. If the stack does not contain any redos, then it would be == undoStack.size() and we would assert. If there were redos, then we would delete the item at undoState multiple times (actually undoState times). In addition, when the loop exited, we first removed the dangling pointers using remove() and then there was a weird resize() to the new size minus the old undoState. This would either assert because we tried to resize to a negative number, or it would arbitrarily remove items from the stack. [ChangeLog][QtGui][Text] Fixed a crash bug in QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack). Task-number: QTBUG-69546 Change-Id: I8a93e828ec27970763a2756071fa0b01678d2dcd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* tst_http2::connectToHost - fix flakinessTimur Pocheptsov2019-08-072-6/+0
| | | | | | | | | | | some assumptions were incorrect: our test server immediately sends its SETTINGS frame, as a result we have to reply with client preface + SETTINGS(ACK). So QVERIFY(!prefaceOK) was wrong from the beginning and was only passing by pure luck. Change-Id: Ie43f0d4ac41deb0e5339badaae6149a9b2f9d9b3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_http2::connectToHost - add a fix for SecureTransport backendTimur Pocheptsov2019-08-011-0/+13
| | | | | | | | | | | One of the tests above was unsetting a variable that enforces the use of a temporary keychain. We have to set it back, otherwise the test is failing. What surprises me though - why I had this problem only locally and not on CI? Apparently, SecureTransport is not covered by our configurations ... Change-Id: I0ff1e3e304632869391ed61213c245b949d8c778 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Blacklist tst_http2::connectToHostTimur Pocheptsov2019-08-011-0/+3
| | | | | | | Test if flakey. Change-Id: I1f956f47ab4cf0602f3631e4f7908df35f5ce83f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QHighDPI: Fix broken scaling of QPoint(F)Friedemann Kleint2019-08-013-0/+86
| | | | | | | | | | | | | | For some reason, the overload resolution of the High DPI scale() functions introduced by b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 chose the wrong overloads for QPointF and/or QPoint; it fell back to the generic template intended for qreal, QSize, etc, ignoring the origin. Remove the template and spell out all overloads. Fixes: QTBUG-77255 Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QHostInfo: Always post results through the event loop to the receiverVolker Hilsheimer2019-07-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Lookups performed via QHostInfoRunnable must not synchronously call the user-code's receiver objects, as that would execute user-code in the wrong thread. Instead, post a metacall event through the event loop of the receiver object, or the thread that initiated the lookup. This was done correctly for the trivial cases of empty host name or cached results, so the code generally existed. By moving it from a global function into a member function of QHostInfoResult, we can simply access the required data to construct and post the event. As we process that posted event, we need to check that the context object (which is already guarded via QPointer) is still alive, if we had one in the first place. If we had one, and it's deleted, then abort. [ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost overloads are now called correctly in the thread of the context object. When used without context object, the thread that initiates the lookup will run the functor, and is required to run an event loop. Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033 Fixes: QTBUG-76276 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Implement 'preconnect-https' and 'preconnect-http' for H2Timur Pocheptsov2019-07-241-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | QNetworkAccessManager::connectToHostEncrypted()/connectToHost() creates 'fake' requests with pseudo-schemes 'preconnect-https'/ 'preconnect-http'. QHttp2ProtocolHandler should handle this requests in a special way - reporting them immediately as finished (so that QNAM emits finished as it does in case of HTTP/1.1) and not trying to send anything. We also have to properly cache the connection - 'https' or 'http' scheme is too generic - it allows (unfortunately) mixing H2/HTTP/1.1 in a single connection in case an attribute was missing on a request, which is wrong. h2c is more complicated, since it needs a real request to negotiate the protocol switch to H2, with the current QNetworkHttpConnection(Channel)'s design it's not possible without large changes (aka regressions and new bugs introduced). Auto-test extended. Fixes: QTBUG-77082 Change-Id: I03467673a620c89784c2d36521020dc9d08aced7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix lancebench results oddnessAllan Sandfeld Jensen2019-07-231-10/+10
| | | | | | | | | | | | Imports were expanded in the list of commands every time they were evaluated. This meant any test with imports ran slower and slower the more iterations it got through. Fixed by creating a new PaintCommands object every time and living with initialization of it being part of the benchmark results. Change-Id: Ib53a3a25f1393437452bc5aede04ccb63e8715a6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix QCborStreamReader not flushing QIODevices due to internal bufferingThiago Macieira2019-07-192-19/+168
| | | | | | | | | | | | | | | When successfully finishing a parse, it's reasonable to expect that the QIODevice was advanced to the end of the input data. [ChangeLog][QtCore][QCborStreamReader] Fixed a bug that caused the QIODevice that the data was being read from not to show the entire CBOR message as consumed. This allows the user to consume data that may follow the CBOR payload. Fixes: QTBUG-77076 Change-Id: I1024ee42da0c4323953afffd15b23f5d8fcc6f50 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* tst_http2 - make the test less rough in generalTimur Pocheptsov2019-07-181-11/+40
| | | | | | | | | | | | | | 1. Use per-case QNAM objects 2. In a slots (connected to QNetworkReplies) - if an error detected - stop the event loop (no reason to continue waiting) and then do normal QVERIFY/QCOMPARE things. 3. In tests, check QTest::currentTestFailed after the event loop returned - if an error was detected by a slot, no need to continue with QCOMPARE/QVERIFY in the test itself. Task-number: QTBUG-77053 Change-Id: I3827a629a2749becd3dc6eee7fd6994d96441e65 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_http2::flowControlServerSideTimur Pocheptsov2019-07-151-0/+7
| | | | | | | | | fix the bloody test for good - the idea to have a shared QNAM (shared by test cases in this test) was somewhat wrong to start with. Fixes: QTBUG-77053 Change-Id: I5755e96ec988e2dd546f527f3f902fc43914b0b7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove unused arguments from QWidgetPrivate::create_sysTor Arne Vestbø2019-07-121-3/+3
| | | | | | | | | | | | | The public QWidget::create still has them, but we don't need to propagate them on - that just makes debugging the window creation flow harder. The window argument to QWidget::create is technically used to guard an early exit in the function, but to keep behavior the same we leave it for now. Change-Id: Ic0287575aa25f1272e216adc1b75e34d6f55f6d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QSaveFile: Fix changing the file name after hitting on readonly fileFriedemann Kleint2019-07-111-0/+34
| | | | | | | | | The call to QFileDevice::unsetError() in QSaveFile::open() does not clear QSaveFilePrivate::writeError. Clear it in addition. Fixes: QTBUG-77007 Change-Id: I5e5009750f1726d1c74c1b4eb1c33f3a5393fe4f Reviewed-by: David Faure <david.faure@kdab.com>
* Windows: handle errors correctly when connecting to unreachable hostVolker Hilsheimer2019-07-111-10/+29
| | | | | | | | | | | | | | | | | | The previous code handled only some error codes, in a very inefficient way, for some code paths. This change standardizes error handling using a helper function that maps winsock WSAE* codes to Qt error codes. The test for connecting to unreachable hosts or ports is now more generic, and enabled on Windows, where it passes in local tests, but dependency on network configuration still makes it fragile, so ignoring some failures without completely skipping the test. [ChangeLog][Network][Windows] Correctly emit errors when trying to reach unreachable hosts or services Change-Id: Icaca3e6fef88621d683f6d6fa3016212847de4ea Fixes: QTBUG-42567 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make tst_QGraphicsItem painting tests most robustVolker Hilsheimer2019-07-101-14/+11
| | | | | | | | | | | | | | | | | | | Counting absolute paint events is fragile, as there are no guarantees that a single call to QApp::processEvents only delivers a single paint event to a widget. As of QTBUG-76566, we see that the items occasionally receive three calls to paint, which can be simulated by activating other windows while the test is running and waiting for events to be processed. Instead, verify that we do receive any paint events as the first test, and then verify increments when we expect updates. This also reverts change 24b9424adcda1ab083fae4ae857007227ba5fee2. Change-Id: Ib51853e918f31acd3aea10d4109c95f34012a29f Fixes: QTBUG-76566 Reviewed-by: Dimitrios Apostolou <dimitrios.apostolou@qt.io> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Further stabilization of QGraphicsItem::cursor testVolker Hilsheimer2019-07-101-16/+9
| | | | | | | | | | | | | | | | The QTest::mouseMove calls are not reliable, and seem to produce flakiness, at least on WinRT. Removing them, and only depending on handling of the synchronously delivered QMouseEVent for simulated mouse moves. Also, initialize the expected cursor shape from an empty scene; this avoids that showing the view with the cursor accidentially on an item results in the wrong default shape. Remove hard coded coordinates, just test what we know. Fixes: QTBUG-73545 Change-Id: I6f81d6b16bb613ec77aaa776d6a80aac739aeb58 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't set the mouse cursor for items that are disabledVolker Hilsheimer2019-07-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | As with widgets, items that are disabled should not receive any input events. Similar to QGraphicsScene, which ignores disabled items when handling mouse presses, the view should also ignore them when handling mouse moves to update the cursor. Since QGraphicsView only adjusts the cursors on mouse moves, reenabling an item that is currently under the mouse will not change the cursor. This is consistent with other changes of item attributes that would position the item under the mouse (such as moving it). The overhead of hit-testing items for every such attribute change would be too large, and applications can generate a mouse move event if they really need to adjust the cursor in all situations. [ChangeLog][QtWidgets][QGraphicsView] Ignore disabled items when setting the mouse cursor. Fixes: QTBUG-76765 Change-Id: Ifcd31fc0581e8421e58eeb436a55b031909eed7e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Stabilize QGraphicsItem::cursor and select_multi testsVolker Hilsheimer2019-07-081-10/+16
| | | | | | | | | | | | | | The tests send QEvent::MouseMove events to the view, but don't fully construct the event with both local and global position. Consequently, QMouseEvent will use QCursor::pos as the global position, which is unreliable, as QTest::mouseMove can not guarantee that the mouse really moves - when running the tests locally on e.g macOS, it never does. So instead construct the QMouseEvent with the trivially calculated global position. Change-Id: Ic4c914e3af7f15751545080d4743b06d3887cce8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Revert "Temporarily skip tst_QSslSocket::resume"Mårten Nordheim2019-07-031-1/+0
| | | | | | | | | | | | This reverts commit 9a25d27b9d58316dee5d2305135d2d74ad5d51e7. The QSKIP is no longer needed as the imap server's certificate was updated Task-number: QTBUG-76610 Change-Id: I1007ce50d6f7f6258fdeb8894c66678a660b03ca Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Skip flaky test on MacOS_10_12Dimitrios Apostolou2019-07-021-0/+6
| | | | | | | | | | | | This is the most flaky-pass test currently. It fails the first time it is run on MacOS_10_12, but succeeds all the following times. This happens extremely often, so disable it until the issue is resolved. Task-number: QTBUG-76566 Change-Id: I94359eceb91c3b958930424e6c8b5957fb3f1252 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update visible window's alpha when toggling WA_TranslucentBackgroundVolker Hilsheimer2019-07-021-0/+6
| | | | | | | | | | | | | | | | | | QWidgetPrivate::updateIsTranslucent sets the surface format of the window with the alpha based on the translucency attribute, so we need to call this function when the attribute value changes. The test can confirm that the window's requested surface format has changed, we can't rely on what is actually set, and don't have to rely on hard-coded values like 8bit alpha. While WA_NoSystemBackground needs to be set for WA_TranslucentBackground to have an effect, we can't clear the attribute when clearing translucency (as it might have been set explicitly). Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff Fixes: QTBUG-60822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QSocks5SocketEngine: account for in-transit signal when waiting for readMårten Nordheim2019-07-021-4/+4
| | | | | | | | | | | | | | | | When calling waitFor{ReadyRead,Disconnected} it will wait for data but if the data is already received and the read notification has been queued (and there's no more data coming in) it will return false. By checking if a read notification has been queued and then handling this we can easily take care of this scenario. Fixes some flaky tests which missed the read data in waitForDisconnect and similar. Fixes: QTBUG-38385 Change-Id: Ic05d59883c1175783e56ff1822b6636c35aec874 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Brush up DiaglibFriedemann Kleint2019-06-2410-40/+37
| | | | | | | | Fix most clang warnings about override, nullptr, range-based for loops. Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix window shortcuts when a completer popup has focusVolker Hilsheimer2019-06-251-0/+26
| | | | | | | | | | | | | | | | | The completer popup has focus, making QShortcut direct to it's window rather than to the window the completer belongs to. As QShortcut handles the case for Tool windows that have a parent, but doens't do the same for popups. And they shouldn't be treated the same way, as a context menu popup for a e.g. text edit should in fact block the text edit's shortcuts while open. However, the completer popup is special, in that it explicitly makes the widget completes for its focusProxy, which is what we can use to fix this issue. Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af Fixes: QTBUG-4485 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2019-06-101-0/+73
| | | | | | | | | | | | | | | | | | | | 81e298a51d08c510457b4a26b37c0d4aac5eba65 fixed a case where the focus chain was screwed up when the order was already correct. This worked correctly in most cases but not when the next focus widget of the first one had Qt::NoFocus. The optimization check if lastFocusChildOfFirst is the same as second is thrown away since it now does not longer screw up the focus chain and the save would only be four pointer assignments. Fixes: QTBUG-75388 Task-number: QTBUG-10907 Task-number: QTBUG-68393 Task-number: QTBUG-69619 Change-Id: I581ed532156c34ea970123afd063194aab016304 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Temporarily skip tst_QSslSocket::resumeMårten Nordheim2019-06-241-0/+1
| | | | | | | | Will be reverted once ready Change-Id: Id03df7dea1dd65579ec83606fddf2a73a45a0d64 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* SSL: Update an about-to-expire certificateMårten Nordheim2019-06-242-30/+30
| | | | | | Change-Id: I9e29baf529b74ae33fa0ee7250e5af6b1873e86f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Revert "tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows"Timur Pocheptsov2019-06-211-23/+0
| | | | | | | | | | | QSslSocket (OpenSSL backend) does not use mutex/locks during a handshake, so we re-enable previously skipped tests. This reverts commit 8c87a1402cc819c00301566755da5cb65461fac0. Change-Id: I994b085f016f0eb18b3ba439a7041ea08cd3577b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Stabilize tst_qsplitterFrederik Gladhorn2019-06-192-2/+1
| | | | | | | | | | | | | This is the worst fix ever, adding one more qWait. The test has been updated in the 5.13 branch, so there a different fix will be needed. For now this is in line with the rest of the code. This test is currently one of the worst offenders when it comes to flaky tests. Task-number: QTBUG-64639 Change-Id: Ia1e71cc948997408b9658839013c9ad098111033 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Report correct state change when destroying QAbstractAnimationTor Arne Vestbø2019-06-201-0/+15
| | | | | Change-Id: Ibe5310e20268d1baa5b329a4d02a3dc38d875008 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12.4' into 5.12Qt Forward Merge Bot2019-06-173-14/+27
|\ | | | | | | Change-Id: I61c92717cf82cfe2b14a4d7cbe17f03c3634e827