summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Clean-up in QDateTime's parsing of ISODate{,WithMs}Edward Welbourne2018-02-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | Actually check that there's a T where ISO 8601 wants it (instead of just skipping over whatever's there), with something after it; move some declarations later; add some comments; and use the QStringRef API more cleanly (so that it's easier to see what's going on). Simplify a loop condition to avoid the need for a post-loop fix-up. This incidentally prevents an assertion failure (which brought the mess to my attention) parsing a short string as an ISO date-time; if there's a T with nothing after it, we won't try to read at index -1 in the following text. (The actual fail seen had a Z where the T should have been, with nothing after it.) Add tests for invalid ISOdate cases that triggered the assertion. Task-number: QTBUG-66076 Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a9c111ed8c30a5a8fec3f02244f0d5a4bd08e931)
* QHeaderView: properly restore section data after layoutChanged()Christian Ehrlicher2018-01-291-4/+9
| | | | | | | | | | | | QHeaderView is doing a complete rebuild of the sections when the layout changed because everything could have happened. But since layoutChanged is also called during e.g. sorting, the old data must be restored when possible. Task-number: QTBUG-65478 Change-Id: I088d4d843cad362b97df6dc5e0dcb9819b13547f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't indefinitely wait for data if it was able to read some dataAndy Shaw2018-01-241-0/+84
| | | | | | | | | | | Passing -1 to waitForReadyRead() may cause it to wait for some time but the data retrieved may be enough for processing. So if 0 is passed from read, indicating that there is potentially more to come, then it will do a waitForReadyRead() then for more data to come. Change-Id: I75f270d1f124ecc12b18512cc20fb11f7a88f02e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-2035-48/+48
| | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* qmake: require a drive in a DOS path for it to be absoluteEdward Welbourne2018-01-183-21/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | For Q_OS_WIN, a path is only truly absolute if it includes a drive letter; merely starting with a slash is not enough. (We can't support UNC paths, so don't even try: qmake runs various commands in the source directory using CMD.exe, which doesn't support UNC as PWD.) This requires, when resolving a path relative to a root, transcribing the root's drive to such not-quite-absolute paths. Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now use IoUtils::resolvePath() rather than delegating to QDir's absolute path method, since that doesn't correctly recognize the need for a drive letter (and qmake did run into problems with some paths, from splitPathList and a failing test, as a result). Moved existing ioUtils tests for handling of relative / absolute paths out into separate functions and expanded significantly. Fixed some existing tests to use an absolute path where one is needed; added two tests involving driveless (but rooted) paths; and fixed the test init to set a value for QT_HOST_DATA/src property (the lack of which lead to an assertion failure with this fix). Task-number: QTBUG-50839 Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-111-24/+0
|\ | | | | | | Change-Id: Ic23e90146470d69060313628562f76a710696bab
| * Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()"Thorbjørn Lund Martsum2018-01-051-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | It caused some sorting issues. This reverts commit 93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9. Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33 Task-number: QTBUG-65478 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | macOS: Blacklist modalWindowEnterEventOnHide_QTBUG35109 instead of skippingTor Arne Vestbø2018-01-092-3/+1
| | | | | | | | | | | | | | | | | | We have the ability to blacklist tests for CI runs now. Task-number: QTBUG-35109 Change-Id: I8590e83faba764dce2d52e8c62e2e2c63f7bf219 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QFtp: only use fall-back password for anonymous accessRyan Chu2018-01-091-2/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used to fall back to anonymous login independently for username and password; however, it should only use a fall-back password if the username is missing or (case-insensitive) "anonymous". When a non-anonymous username is given without password, we should simply skip he PASS message to FTP. If the FTP server requests a password, in the latter case, QFtp will signal authenticationRequired; in all cases, if the server rejects the given credentials, QFtp signals authenticationFailed. Either way, the client code can then query the user for credentials as usual. Task-number: QTBUG-25033 Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | CoreText: Order fallback fonts based on writing system supportEskil Abrahamsen Blomfeldt2018-01-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | After we stopped sanitizing the fallback font list (with change 6ca48a847a1805c3826004c5b989b4ae14397a37), we now need to make sure it is ordered so that the fonts that support the writing system in question are always tested first, otherwise we can end up loading a lot of fonts that will never be used. Task-number: QTBUG-65605 Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QFileSystemModel/Windows: Make file name checking case-insensitiveFriedemann Kleint2018-01-091-1/+28
| | | | | | | | | | | | | | | | | | | | | | Introduce a special hash modeled on the one used for QFileSystemWatcher on Windows. Task-number: QTBUG-31103 Task-number: QTBUG-64147 Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Fix license headersJani Heikkinen2018-01-091-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | Old header.LGPL21 header was used at some files. Replase those with new header.LGPL one Remove old header.LGPL21 Task-number: QTBUG-57147 Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix fallback fonts for non-common writing systemEskil Abrahamsen Blomfeldt2018-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we request fallback fonts, we cannot discriminate the fonts based on the writing system support. This is especially important since common script is now merged with other scripts, meaning that a common script character will always go through the fallback mechanism when not supported by the main font. When drawing for instance a string of Devanagari characters on macOS, we would get a list of 33 fallback fonts, but almost all of them would be the default Devanagari font, since none of the other fallbacks would support that script. Meaning that we would just check the same font over and over, which makes no sense. The fallback list has been retrieved specifically for the given script, so we do not need to consider that when fetching the fonts. For most of the common set, we will not have noticed the bug, because at least one of the writing system-specific fallbacks will have had support for latin characters as well. But when trying to mix emojis and some non-common script, we would get a box in place of the emoji, which had been adopted to the main script and would only be looked for in the fonts supporting this. Note that this exposed an issue with the QRawFont test on some systems. When the sample text contained a space, it would be possible to get a fallback font for this character, since we now effectively support fallbacks. This is not the correct behavior, but it is unrelated to this fix, and it was not what the QRawFont::unsupportedWritingSystem() test was written to check. I have therefore removed the space from the sample text to make the test pass, and will make a separate task of fixing the issue of merging fonts for whitespace characters. [ChangeLog][QtGui][Text] Fixed a bug where mixing different writing systems with emojis could lead to missing glyphs. Task-number: QTBUG-61882 Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Revert "Blacklist tst_QDateTime::operator_eqeq"Edward Welbourne2018-01-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | Remove black-listing of test; the problem was due to misconfigured time-zone on the CI system - it was on some zone that presently coincides with UTC, not actually on UTC as supposed. This reverts commit 597b96b8fa2fc8b9331db8ecc85d742be83fbec5. Change-Id: I72ad1dfa38532362c05aef33cd874f7f79879a41 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | tst_QUdpSocket - unblacklist tests on Ubuntu 16.04Timur Pocheptsov2018-01-052-4/+19
|/ | | | | | | | | We use QSKIP instead for kernel versions [4.6, 4.13). Task-number: QTBUG-65440 Change-Id: Ie764b5a4eb8a67dc2a43d4dc67b5d6eb772f6b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
* Fix source code file permissionsSimon Hausmann2018-01-021-0/+0
| | | | | | | | Fix permissions after commit ffc8409aa58c04c1dd140001976b55925ac959f6 - our source files are not executable. Change-Id: Idc5103704256b6f73857b645c323492beaabe879 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist tst_QUdpSocket on Ubuntu 16.04Joni Jantti2017-12-271-0/+5
| | | | | | | | | tst_QUdpSocket::broadcasting and tst_QUdpSocket::pendingDatagramSize fail on the new Ubuntu 16.04 clean template. Task-number: QTBUG-65440 Change-Id: I0e973b9c90b7c5827406bac8138370b61992a115 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Blacklist tst_QDateTime::operator_eqeqJoni Jantti2017-12-271-0/+3
| | | | | | | | | This autotest fails on the new Ubuntu 16.04 template with UTC timezone in the system settings. Task-number: QTBUG-65435 Change-Id: I397f01ab3fed354a4eeec8b05415226a75fce5a1 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* qfloat16: NaN is not infiniteThiago Macieira2017-12-271-0/+2
| | | | | | Change-Id: I39332e0a867442d58082fffd1502b7010424f0f8 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use AccessCheck for current user effective file permissionsDyami Caliri2017-12-211-6/+19
| | | | | | | | | | | | | On Windows, QFileInfo.isWritable() was returning true in situations where the file would only be writable with elevated privileges. Using AccessCheck instead of GetEffectiveRightsFromAcl to get the correct results. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Done-with: Edward Welbourne <edward.welbourne@qt.io> Task-number: QTBUG-30148 Change-Id: I7a3468ac069bf782ca312078e3a84107b6cd468c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Don't crash with null receiver/context in new-style connectsSergio Martins2017-12-191-0/+11
| | | | | | | | | old style connects have protection against null sender and null receiver, but new style only had against null sender. Change-Id: Ie555ac078412918e60c3b60830fe1f3abfb7f5af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTreeView: Make sure QHeaderView is notified on layoutChanged()Christian Ehrlicher2017-12-171-0/+24
| | | | | | | | | | | | | | | | | | QHeaderViewPrivate::_q_layoutChanged() was not called when used in a QTreeView because it was explicitly disconnected in setModel(). The disconnect was added sometime prio to Qt 4.3, but there the signal was connected to the doItemsLayout() slot. This was correct since QTreeView::doItemsLayout() is calling header->doItemsLayout(). In Qt 4.3.0 _q_layoutChanged() was introduced and the disconnect was adjusted. But since _q_layoutChanged() is doing much more than doItemsLayout() (e.g. restoring hidden sections), functionality was lost. The problem was already observed for Qt 4.6 (QTBUG-18196) but only partially fixed. Task-number: QTBUG-41124 Task-number: QTBUG-54610 Change-Id: Id13a9930d0163812e12a0287016bab9c3aa02068 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Fix assert when emitting a signal from a different threadJesus Fernandez2017-12-141-0/+32
| | | | | | | | | | | | | If a signal is emitted more than once in a multithreaded application the QSignalEventGenerator::execute function asserts in the check for a valid signal index. It happens after abandoning the state and all the connections are disconnected. If we have pending signal to be processed the QObject::sender() won't be able to resolve the sender object. Task-number: QTBUG-61463 Change-Id: I9d4b7266c6dddc9ff2e7453b05a6989876ccb332 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix typoOliver Wolff2017-12-131-3/+3
| | | | | Change-Id: If6111c59b958ba03f6ec5966af5cf443cae5cf9b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Set sharedPainter correctly for QGraphicsEffectLaszlo Agocs2017-12-121-0/+21
| | | | | | | | | Autotest is taken from the previously reverted 8b1377fde16a2049a1c27f6d005bff84a8f85f28. Task-number: QTBUG-60231 Change-Id: I44dd79cba22b6baefdd6d95c176790bef0b7eafe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tst_QUdpSocket: fix linkLocalIPv4 testThiago Macieira2017-12-051-3/+2
| | | | | | | | | | | I broke it in commit 4da2dda2aa1f710177157dc1cf841e0bf0b9d829. It wasn't flaky or anything: it was plain broken and would never pass. That indicates no node in the CI has an IPv4 link-local address (and apparently neither did I at the time). Change-Id: Ifb5969bf206e4cd7b14efffd14fb62176546916e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_QUdpSocket: Don't test for .bytesAvailable on untrusted platformsThiago Macieira2017-12-051-0/+15
| | | | | | | | | FreeBSD, for example, does not have SO_NREAD and its FIONREAD returns the full socket buffer size, including IP and UDP headers. Change-Id: Ifb5969bf206e4cd7b14efffd14fb5d8ca778d16a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use a custom QAnimationDriver to take control over timeJan Arve Sæther2017-12-022-74/+163
| | | | | | | This should reduce flakyness of tests. Change-Id: I26e0a97f7cd3e7cee2ffb44188300c37578cddd7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* macOS: Blacklist: tst_QPropertyAnimation::startWithoutStartValue()Friedemann Kleint2017-12-011-0/+2
| | | | | | Task-number: QTBUG-64108 Change-Id: Id60a9a1bfede9cbe90f378d131a331d726acfdae Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* macOS: Blacklist tst_QPauseAnimation::noTimerUpdates()Friedemann Kleint2017-12-011-0/+2
| | | | | | Task-number: QTBUG-64107 Change-Id: Ie77d2d2525e79fb7e17f1a69d15ef40982f9242d Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* tests/auto/auto.pro: Use correct null device for DBUS checkFriedemann Kleint2017-12-011-1/+1
| | | | | | | | | A mysterious file c:\dev\null appeared when running the auto tests on Windows. Fix by using QMAKE_SYSTEM_NULL_DEVICE. Amends 5f3529be32df3cce81e77c3dbb76cfda7feb320c. Change-Id: I0224a9ccd61c4f10b2ddb8f8d690e1849aa88d8a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Blacklist tst_QSplitter::replaceWidget(visible, not collapsed) for LinuxFriedemann Kleint2017-12-011-0/+2
| | | | | | | | | The test is flaky on Linux. Task-number: QTBUG-64639 Change-Id: Iec56ebce4f656f52187b34c8f655b137e41c3d17 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* tst_QFileSystemModel: Stabilize readOnly(), sortPersistentIndex()Friedemann Kleint2017-11-301-2/+10
| | | | | | | | | | | | | The tests start to show flakyness on Linux in 5.10 (rowCount() check failing). This seems to point to a race condition between the files showing up and the file system watchers of QFileSystemModel starting. To fix this, close the file and wait until it shows up in the directory before pointing the QFileSystemModel to it. The tests then no longer rely on the file system watchers. Change-Id: I39cffb4cacf6843e8e4180efb405345307c78dd8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* tst_QNetworkReply: Blacklist putToFtpWithInvalidCredentials for WindowsFriedemann Kleint2017-11-291-0/+2
| | | | | | Task-number: QTBUG-62860 Change-Id: Ibf4d7de9eedc2236375ad10ca4bea08055c7ae00 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix aliasing problem in QVector::removeAll()Marc Mutz2017-11-281-0/+8
| | | | | | | | | | | | Since removeAll() takes its argument by cref, if passing a reference to an element of the container to removeAll(), the element may be deleted (overwritten) by anyother value, leading to UB. Add a test that actually happens to fail for me without the patch, even though that might not be guaranteed (we may invoke UB). Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Stop depending on test.macieira.orgThiago Macieira2017-11-272-3/+3
| | | | | | | We have had test.qt-project.org for close to 3 years now. Change-Id: I71488efd29b645f7b228fffd14fadf4627288243 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Initialize QLoggingRegistry rules on first useTor Arne Vestbø2017-11-251-6/+18
| | | | | | | | | | Allows categorized logging before QCoreApplication has been created, which otherwise would silently fail to output anything because the category would never be enabled, despite QT_LOGGING_RULES being set. Change-Id: I1861e5366ea980dff2ffa753b137276c77278eee Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into ↵Thiago Macieira2017-11-251-0/+63
|\ | | | | | | refs/staging/5.9
| * Merge remote-tracking branch 'origin/5.9.3' into 5.9Liang Qi2017-11-231-0/+63
| |\ | | | | | | | | | Change-Id: I9add7e07ff1b6a1cf52f59dbb8319f30e114e5fc
| | * QSemaphore: fix regression when the timeout < 0Thiago Macieira2017-11-141-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was introduced by eaee1209f0ead5be786e81db8aee604ccfea85b0, so it affected only 5.9.2. [ChangeLog][QtCore][QSemaphore] Fixed a regression that would make tryAcquire() not to wait forever if the timeout was a negative value. Note: new code is advised to only use -1 to indicate "forever", as some other functions taking timeout periods do not accept other values. Task-number: QTBUG-64413 Change-Id: I57a1bd6e0c194530b732fffd14f58fce60d5dfc9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QFlags: support enum classes in setFlag()Giuseppe D'Angelo2017-11-241-0/+12
| | | | | | | | | | | | | | | | | | | | | Unary ~ is not defined for enum classes, so we need a cast. Change-Id: I79d495ebcc24ab960da8dae3be08eb307a9de448 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | tst_QTcpSocket: fix disconnectWhileLookingUpMårten Nordheim2017-11-242-3/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and unblacklist it on Windows. From what I can tell there is no particular reason why this test fails other than that it is a little too slow sometimes (these things happen). So, to fix the test I bumped the timeout, but to avoid the test running for longer on every test-run it now also ends when the socket enters the "Unconnected" state. Previously it failed 171/500 times, and after this patch it failed 0/1000 times. Change-Id: I4266bff6b91aaaf502ee66265d01c3a177706402 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | QHeaderView: Simplify and fix layoutChange handlingStephen Kelly2017-11-221-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A layoutChange indicates that anything can have moved to anywhere else, including as a result purely of new items being added. It can also indicate that items are removed. The old code here incorrectly assumed that the section count remained constant over this operation by setting the size of the oldSectionHidden QBitArray - whose size is the size before the layoutChange operation - and then calling setBit with model rows numbered after the layoutChange operation. As the two are not necessarily the same dimensions, this can result in asserts from the setBit call. Simplify the handling of layoutChanged entirely by clearing section information, and using the QPersistentIndexes which indicate hidden state to restore that state after re-population. Task-number: QTBUG-53221 Change-Id: I3cda13e86b51b3029b37b647a48748fb604db252 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | CMake: Set SKIP_AUTOMOC/AUTOUIC where neededKevin Funk2017-11-226-3/+172
| | | | | | | | | | | | | | | | | | | | Make sure we don't run into warnings for CMake 3.10 Task-number: QTBUG-63442 Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
* | Fix tst_QSslSocket::waitForConnectedEncryptedReadyReadMårten Nordheim2017-11-222-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and unblacklist it. It was blacklisted some years ago because it was failing too often. It was failing because the ssl socket had already received and decrypted all the data it was going to get, meaning the waitForReadyRead call was just going to block forever. Change-Id: Ia540735177d4e1be8696f2d752f1d7813faecfe5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Start from the first visible item when doing a searchAndy Shaw2017-11-221-0/+97
| | | | | | | | | | | | | | | | | | | | Since the first item in a treeview might be hidden, start from the first visible item in the view when starting or wrapping round during a keyboard search. Task-number: QTBUG-63869 Change-Id: I202bea567c6d4484c3ffaf8a5f9af8ea2e13708d Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | tst_QNetworkReply::ioHttpRedirectErrors - fix a flaky testTimur Pocheptsov2017-11-221-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test became a real pain recently. A close look at the test shows several problems (strangely enough, the failure can never be reproduced on real machines, only on VM - Ubuntu and RHEL 6.6). There are several asserts that are firing from time to time here and there. They show that the logic in test is broken/incorrect. QNAM can open several connections to a host, our test then incorrectly resets its 'client' data-member and bad things can later happen after 'bytesWrittenSlot' executed (and deleted a socket). For example, I can reproduce this scenario in every second run: 1. incoming connection -> client = socket(descriptor), connect to client's readyRead (s1) 2. incoming connection -> client = socket(descriptor), connect to client's readyRead (s2) QNAM sends a request on s1. We reply on s2 (which is already wrong) and call client->deleteLater(), which resets client to nullptr. If QNAM sends something else on s1, we hit assert(!client.isNull()). To avoid this, whenever 'sender' in any slot is different from the 'client', we use the actual 'sender' to reply. Another problem is this weird and rather cryptic waitForFinish which is not needed in this particular test since we wait for reply error, not 'finished'. As it happened before - it's not clear if these two problems were the cause of guaranteed fails on CI - an integration failed ~10 times in a row in the same test (not happening anymore though). Task-number: QTBUG-64569 Change-Id: Id9aa091290350c61fadf1c3c001e7c2e1b5ac8f4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QTreeView: recalculate row heights in hide/showColumn()Christian Ehrlicher2017-11-171-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling QTreeView::hideColumn() the row heights are not recalculated. This can lead to rows which are unnecessarily high due to hidden columns may contain large (e.g. multiline) content. The same applies to showColumn() - there the row might be to small. Hiding columns directly via QTreeView::header()->hideSection() is not covered by this patch since QHeaderView has no way to inform about newly shown/hidden sections. Task-number: QTBUG-8376 Change-Id: I20b1198e56e403ab8cf649af76e5e2280821dd68 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Menurama: Fix custom application class constructor signatureGabriel de Dietrich2017-11-172-2/+2
| | | | | | | | | | Change-Id: I989b9205dde9280f97dedbaad47ef4a8d75004ac Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Add QThreadPool autotest to detect stale threads after tryTakeSvenn-Arne Dragly2017-11-161-0/+68
| | | | | | | | | | | | | | | | | | | | | | This test makes sure that we do not introduce a regression where the threads exited the inner loop over the queue before the queue was empty. This was triggered by calling tryTake at least maxThreadCount times, which left the same number of null pointers in the queue and caused the inner loop to exit too soon for all the threads. Change-Id: I3a9d800149b88d09510ddc424667670b60f06a33 Reviewed-by: Lars Knoll <lars.knoll@qt.io>