summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QRandomGenerator: improve floating-point random generationThiago Macieira2017-10-201-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | The previous version was good, just not optimal. Because the input was an unsigned 64-bit number, compilers needed to generate extra code to deal with HW instructions that only convert 64-bit signed input. And that was useless because a double uniformly distributed from 0 to 1 can only have 53 bits of randomness. The previous implementation did exactly what the Microsoft libstdc++ and libc++ implementations do. In my opinion, those implementations have an imperfect distribution, which is corrected in this commit. In those, all random input bigger than 0x20000000000000 has a different frequency compared to input below that mark. For example, both 0x20000000000000 and 0x20000000000001 produce the same result (4.8828125e-4). What's more, for the libc++ and MSVC implementations, input between 0xfffffffffffff001 and 0xffffffffffffffff results in 1.0 (probability 1 in 2⁵³), even though the Standard is very clear that the result should be strictly less than 1. GCC 7's libstdc++ doesn't have this issue, whereas the versions before would enter an infinite loop. Change-Id: Ib17dde1a1dbb49a7bba8fffd14eced3c375dd2ec Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Clean dynamic function resolving done for XP in QFileInfo testsOrgad Shaneh2017-10-191-39/+15
| | | | | Change-Id: I15364b1e8c4f4406fef2be68ca221a8867d0dcfa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 APIOrgad Shaneh2017-10-191-3/+0
| | | | | Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QAbstractItemView: Make it easier to drop above and below itemsThorbjørn Lund Martsum2017-10-181-0/+13
| | | | | | | | | | | | | | | | | | | Before this patch a very accurate drop position below or above an index was needed. Therefore it was not that easy to do. This patch increases the above/below area to be about 18% of the item (still leaving the most space for the item). An average user will likely be 2-3x faster with dropping below or above (while not losing much when dropping on items). [ChangeLog][QtWidgets][ItemViews] Made it easier to drop above and below items. Change-Id: I47f0f80c76878c17ebf3f93d0a0cc82755971c2a Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-184-13/+12
| | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTabletEvent/manual widgets test: Fix reporting of proximity eventsFriedemann Kleint2017-10-181-4/+20
| | | | | | | | Proximit events are sent to the QGuiApplication, catch them via event filter. Change-Id: I7f896e7d9f5c90347b9e3c708feb69abd1c5fc95 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QTabletEvent/manual widgets test: Port to C++ 11Friedemann Kleint2017-10-181-29/+19
| | | | | Change-Id: If5ebb45ce286d6a96c9f8bfe1fac70661d065460 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-1710-10/+126
|\ | | | | | | refs/staging/5.10
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-1610-10/+126
| |\ | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | * Replace 'an unique' with 'a unique'Kai Koehne2017-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Unique begins with a "y" sound, hence a unique is correct. Change-Id: I9eb6b4d4c9ddab45af931e97c041c24edf163eca Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Extend blacklisting of tst_qwidget tests to cover RHEL 7.3 & 7.4Tony Sarajärvi2017-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The autotest has been blacklisted for RHEL 7.1 and RHEL 7.2 earlier already and it is still failing in 7.4. Task-number: QTBUG-46116 Change-Id: I0f33be849513a2debaf8c093dcd413fa09b5c681 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
| | * Fix blacklisting of tst_QOpenGL in WindowsTony Sarajärvi2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ba1b73175b5b47ff0565c58f0d6c51d515c21831 tried blacklisting this autotest in Windows 7 only. This however does not work. We can't pin point blacklisting to a specific Windows version. Task-number: QTBUG-63122 Change-Id: I5edb5b56fd86ad194214818a838db9cfd6be2ad1 Reviewed-by: Simo Fält <simo.falt@qt.io>
| | * Extend blacklisting of tst_gestures in RHELTony Sarajärvi2017-10-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This autotest has been blacklisted already in RHEL 7.1 and RHEL 7.2. This one extends it to 7.3 and 7.4. Task-number: QTBUG-52523 Change-Id: I3e2d8cd882d9f7dc58a65bde88e3aa16438b13c3 Reviewed-by: Simo Fält <simo.falt@qt.io>
| | * Add support for HTTP status 308 Permanent RedirectMårten Nordheim2017-10-101-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 308 Permanent Redirect was introduced after redirection support was initially added to Qt. [ChangeLog][QtNetwork][QNetworkAccessManager] Added support for HTTP status 308. Task-number: QTBUG-63075 Change-Id: I1c6cda331d776237113ef8854de9abfe7e41ed3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QUrl: re-fix the setPath("//path") case leading to scheme://pathThiago Macieira2017-10-061-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in Qt 5.2) and aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in 5.6) both tried to deal with this problem, with different levels of success. This is the third attempt (and hopefully the charm). Instead of modifying the path that the user provides, go straight ahead and declare it invalid. This is supported by RFC 3986, which declares this expansion impossible: relative-part = "//" authority path-abempty / path-absolute / path-noscheme / path-empty path-abempty = *( "/" segment ) path-absolute = "/" [ segment-nz *( "/" segment ) ] path-noscheme = segment-nz-nc *( "/" segment ) The "path-abempty" and "path-noscheme" cases are the two issues we already handle. This commit adds the third one: path-absolute, which requires that the first segment of the path be of non-zero length. That is, it is now possible again to have http://example.com//path constructed piece-wise, without it producing http://example.com/path. Additionally, it catches the case of http://example.com//path parsed from full URL then followed by setAuthority(""). Change-Id: I69f37f9304f24709a823fffd14e67a5e7212ddcd Reviewed-by: David Faure <david.faure@kdab.com>
| | * Increase timeout for tst_QXmlSimpleReader::inputFromSocket() testMilla Pohjanheimo2017-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test tst_QXmlSimpleReader::inputFromSocket() is failing with "QTestLib: This test case check ("(((server->listening)))") failed because the requested timeout (5000 ms) was too short, 11700 ms would have been sufficient this time". Increased the timeout, since it's better to wait than to fail. Task-number: QTBUG-63539 Change-Id: I804549648ea834e41d3c87871f5bab90f209385c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Improve performance in QThreadPoolSvenn-Arne Dragly2017-10-041-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When many runnables are executed, this improves the performance by not resizing the queue for each runnable, which was the case in the previous version, because of many calls to QVector::takeFirst(). Also add a test that makes sure tryTake() is safe to call and does not leave the queue in a bad state that tries to use nullptr entries. Change-Id: I608134ecfa9cfc03db4878dcbd6f9c1107e13e90 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * tests: un-blacklist tst_QMenuBar::taskQTBUG4965_escapeEatenGatis Paeglis2017-10-042-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can't qWaitForWindowExposed on native menu bars. Other test functions in this file are already disabling the native manu bar. Task-number: QTBUG-24326 Change-Id: Iecf907ca84589159417d0d942c911485a41af164 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | | HTTP/2 protocol handler: tweak receive window sizesTimur Pocheptsov2017-10-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using the default ones, provided by RFC7540. It appears they are way too restrictive and conservative: when downloading something relatively big, a stream keeps spending the whole session/its own 'recv' windows and thus we have to constantly send WINDOW_UPDATE frames. This significantly slows down our HTTP/2 implementation, making it orders of magnitude slower than HTTP/1.1. To fix this: - We send SETTINGS_INITIAL_WINDOW_SIZE in the first SETTINGS frame to inform our peer that per-stream WINDOW is bigger than 64Kb - We increase the session's receive window size. Task-number: QTBUG-63722 Change-Id: I31312fcfd5f0fc0aee6aaa5d3562cc7d1b931adc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | configure: make C++11 <random> a required functionalityThiago Macieira2017-10-161-23/+3
|/ / | | | | | | | | | | | | | | | | Error out if it's missing or broken (Mersenne Twister not present). This ensures that we never have a low-quality random generator in Qt. Change-Id: I0a103569c81b4711a649fffd14ec80649df7087e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix QWinEventNotifier for auto-reset eventsJoerg Bornemann2017-10-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Auto-reset events are automatically reset to non-signaled when we get notified about the signaled state. This implies that we cannot check the event state again in activateEventNotifiers. Instead, store the signaled state in a QAtomicInt and test and decrement that. This amends commit 85403d0a. Task-number: QTBUG-63555 Change-Id: I0adee3d2929783f98d91060f9106c8b5266d72fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | A minor cleanup - fix a commentTimur Pocheptsov2017-10-111-1/+1
| | | | | | | | | | | | | | | | ... so that it comments the actual code, not what this code was before. Change-Id: Ib191b9d7bd3ae3cda39a15f0f711cb1dd3c5c2b7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Autotest: use _exit() instead of exit() to simulate an unclean exitThiago Macieira2017-10-082-5/+11
| | | | | | | | | | | | | | | | | | | | We're not going to crash to avoid core dumps getting recorded by systemd, filling up filesystems or showing dialog boxes. We just need to exit without running destructors. Now, exit() isn't supposed to run function-scope destructors, so just in case we use _exit(). Change-Id: I0b48fc8e90304e0dacc3fffd14e909ff248ce1a1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Move detection of <future> to a configure testGiuseppe D'Angelo2017-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | <future> is needed by QThread::create. Instead of a fragile series of preprocessor tests, move its detection to a configure test. This dramatically simplifies the code, but on the other hand ties the availability of QThread::create() to the system used to compile Qt (rather the one used to compile an application). Change-Id: If1b06363379bf29126cfa68f2a0651cbb78a67f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Ensure result of all QTest::qWaitFor are verifiedTor Arne Vestbø2017-10-0538-108/+109
| | | | | | | | | | | | | | | | | | The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-0510-24/+371
|\ \ | | | | | | | | | refs/staging/5.10
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-0410-24/+371
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * tst_QSsl(longlongnamefollows) - fix a flakey auto-testTimur Pocheptsov2017-10-031-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original test was using QSslSocket::waitForEncrypted function, which is apparently a bad idea on Windows: connecting to 'www.qt.io' we have to verify certs and there is no guarantee a given Windows VM has the required CA certificate ready in its cert store. In such cases we start a background thread (aka CA fetcher's thread) and it calls a (potentially blocking for a significant amount of time) function (CryptoAPI). When finished, this thread reports the results via queued connection, which does not work if we are sitting in a tiny-loop inside waitForEncrypted. Re-factor the test to use signals/slots and a normally running event loop. Also, the last test makes a wrong assumption about Windows - fixed. Task-number: QTBUG-63481 Change-Id: I4abe9cda2a6c52d841ac858cccb6bf068e550cb8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Fix cookies not being applied on redirectMårten Nordheim2017-09-291-0/+28
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63313 Change-Id: I5245fc837557f19062cbbf0f1dfb86353c85229f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix crash when reparenting window containerPaul Olav Tvete2017-09-281-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowContainer assumed that a widget could never change from native to non-native. This is not a fact when the window container is reparented to toplevel and back. In this case, usesNativeWidgets would be stuck at true, and parentWasChanged() would go down the native widget path, triggering an assert. The solution is to always recalculate the usesNativeWidgets bool. Task-number: QTBUG-63168 Change-Id: I88178259878ace9eb5de2ee45ff5e69b170da71c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
| | * Blacklist tst_QWindow:testInputEvents on RHEL 7.4Tony Sarajärvi2017-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Swapping from RHEL 7.2 to 7.4 produces new autotest failures. Task-number: QTBUG-63433 Change-Id: I3e59aa73b5874cfec06e166f521e06b0c7829743 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Return focus to correct widget after showing menuPaul Olav Tvete2017-09-261-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By the time we call setKeyboardMode(true), the menu may already have taken focus. This change sets keyboardFocusWidget before opening the popup, and makes sure that keyboardFocusWidget is not set to the popup. (We cannot remove the assignment from setKeyboardMode(), since it's called from several places.) [ChangeLog][QtWidgets] Fixed widget losing focus after showing menu second time. Task-number: QTBUG-56860 Change-Id: Ic01726bf694e6f365dd7b601ad555156e0fdf6c5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QCompleter: Send activated() signal only once on return keyGabriel de Dietrich2017-09-221-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the complex event forwarding logic between QCompleter, QComboBox, QLineEdit and QWidgetLineControl, in some cases the same single user return key press could result in duplicated activated() signals being emitted by QComboBox. The first one would be emitted because QLineEdit emitted editingFinished() as a result of QCompleter::eventFilter() having forwarded the return key press event to QComboBox. The second one, would happen right after, as QCompleter::eventFilter() would process the same event on behalf of its popup. (We recall that QCompleter is installed as its own popup event filter. That's also the case for the completer's widget, although the purpose there is limited to focus-out events). The current fix consists on skipping the emit as a result of QLineEdit::editingFinished() if the completer's popup is still active. For this to be accurate, it helps to test whether the completer's popup is visible, so we will not be hiding it in QWidgetLineControl::processKeyEvent() anymore. Indeed, we know that if the popup is visible, that means that processKeyEvent() was called after being forwarded by the completer's popup event filter. Furthermore, the popup will be hidden by its event filter shortly after it returns from said event forwarding call. Based on a patch by Alexey Chernov <4ernov@gmail.com>. Task-number: QTBUG-51858 Task-number: QTBUG-51889 Change-Id: I013f6c3000ae37b5b0ec20eaf5cf7746c9c903e3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Restore compatibility with pre-5.9 Keccak calculationThiago Macieira2017-09-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 12c5264d9add1826d543c36d893db77262195fc6 fixed the calculation of SHA-3 in QCryptographicHash: we were previously calculating Keccak. Unfortunately, turns out that replacing the algorithm wasn't the best idea: there are people who need to compare with the result obtained from a previous version of Qt and stored somewhere. This commit restores the enum values 7 through 10 to mean Keccak and moves SHA-3 to 12 through 15. The "Sha3_nnn" enums will switch between the two according to the QT_SHA3_KECCAK_COMPAT macro. [ChangeLog][Important Behavior Changes] This version of Qt restores compatibility with pre-5.9.0 calculation of QCryptographicHash algorithms that were labelled "Sha3_nnn": that is, applications compiled with old versions of Qt will continue using the Keccak algorithm. Applications recompiled with this version will use SHA-3, unless QT_SHA3_KECCAK_COMPAT is #define'd prior to #include <QCryptographicHash>. [ChangeLog][Binary Compatibility Note] This version of Qt changes the values assigned to enumerations QCryptographicHash::Sha3_nnn. Applications compiled with this version and using those enumerations will not work with Qt 5.9.0 and 5.9.1, unless QT_SHA3_KECCAK_COMPAT is defined. Task-number: QTBUG-62025 Discussed-at: http://lists.qt-project.org/pipermail/development/2017-September/030818.html Change-Id: I6e1fe42ae4b742a7b811fffd14e418fc04f096c3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fix #if-ery and accompanying commentEdward Welbourne2017-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The comment was back-to-front on the meaning it needed to address; and the #if-ery used a deprecated define, now changed to match what sanity-bot asked for. Change-Id: I0a971ab2e405e5908066da86964d67c8b852f114 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Blacklist tst_QItemDelegate::testLineEditValidation in openSUSE 42.3Tony Sarajärvi2017-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This autotest is blacklisted as it is deemed flaky. Task-number: QTBUG-63262 Change-Id: I216985e81d1c1cb3528fd8a005be48cad2a31ab7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Blacklist flaky QItemDelegate tests in openSUSE 42.3Tony Sarajärvi2017-09-201-4/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-62967 Change-Id: I05cbf06f068701ee16b54e7052e02becc0c47702 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| | * Itemviews: Set the WA_InputMethodEnabled attribute correctlyAndy Shaw2017-09-201-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When focus is put back onto an itemview and the current item is editable then the WA_InputMethodEnabled attribute should be set. Likewise this should be set/unset when the current index changes too, depending on whether the index is editable or not. Change-Id: Iaea075e669efd21bdaa89a49c500c449272d098b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Widgets: change QWidget::setTabOrder to understand compound widgetsRichard Moe Gustavsen2017-10-041-1/+93
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "compound widget" is a widget that has a focus proxy set to an inner child. This is normal for complex black-box components where focus handling is delegated to the children. Since the compound can have several children, a local tab order might exist between them. The current implementation of setTabOrder had no idea about compound widgets. As such, when connecting two compounds in the tab chain, it would just break up their inner tab order and cause tabbing to ignore children other than the proxy. The new implementation recognizes compound widgets, and add some extra code to figure out the correct tab targets. This way, the local tab order between the children will be preserved. This implementation was inspired by the patches of Marek Wieckowski posted in the linked bug report, and later modified by Nikita Krupenko. [ChangeLog][Widgets] QWidget::setTabOrder() will now preserve the local tab order inside a widget if it has a focus proxy set to an inner child. Task-number: QTBUG-10907 Change-Id: I0673d39d70ec8c6bf64af30bf978d67c651b2f3c Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | qmake: Allow non-bundle apps and libs to have an Info.plistTor Arne Vestbø2017-09-291-1/+1
| | | | | | | | | | Change-Id: I5fe5c8d3214876520b5259d478ac9ef887c61e95 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Clean up OS version checks for Apple platformsJake Petroules2017-09-293-4/+4
| | | | | | | | | | | | | | | | | | | | Convert QSysInfo/QOperatingSystemVersion to __builtin_available where required or possible, or to QOperatingSystemVersion where __builtin_available cannot be used and is not needed (such as negated conditions, which are not supported by that construct). Change-Id: I83c0e7e777605b99ff4d24598bfcccf22126fdda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Improve qustrlen further by avoiding the alignment prologueThiago Macieira2017-09-261-6/+31
| | | | | | | | | | | | | | | | | | | | | | This avoids looping prior to the main 16-byte loop, by performing one load that may include bytes prior to the start of the string. This is guaranteed not to fault, since str points to a valid character, but it may cause Valgrind to print warnings. Change-Id: I6e9274c1e7444ad48c81fffd14dcae854bba24b2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | macOS: Deliver NSWindow notifications to all windows, not just top levelTor Arne Vestbø2017-09-262-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Child QWindows (or in the case of QWindows embedded in native applications: top level QWindows where the corresponding NSView is a child of another view, so not being the contentView of its window), still need some of the NSWindow notifications to e.g. update their exposed state when the window becomes visible. We make sure to send the notification to all QCococaWindow children of the relevant NSWindow, and let each callback decide if it should only apply to content views. This fixes an issue where a QWindow would never be exposed if the window was a child NSView and added to a NSWindow that was yet to be shown. Change-Id: I7f7df8bc5f4ca3ac553a2c146f8c3229b197c059 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | tests: make exposeEventOnShrink_QTBUG54040 not flakey on xcbGatis Paeglis2017-09-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: https://tronche.com/gui/x/xlib/events/exposure/expose.html "The circumstances in which the X server generates Expose events are not as definite as those for other events." On windows with XCB_GRAVITY_NORTH_WEST flag set we should not get expose events according to e2665600c09358854bb0b29389cc873a2684f77b, but as stated earlier this might not always be true. Nevertheless, sometimes we get expose event from X server when shrinking window, but most of the time we don't. Make the test not flakey by checking that we get at least 1 expose event, instead of exactly 1. Now running test 500 times in a loop does not fail. Task-number: QTBUG-63424 Change-Id: I8004e622020cc09e11b7d592faf6d9ee1b9cfee2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Widgets: be able to tab to a widget that has a focus proxyRichard Moe Gustavsen2017-09-251-41/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tabbing/searching for the next focus widget, the current code would check if the next widget in the focus chain had a focus proxy, and if so, ignore it. The exact reason for this behavior is not clearly understood, but some widgets (e.g QSpinBox) has children (a QLineEdit) that sets the parent as focus proxy. If we didn't ignore children with focus proxy, tabbing from a QSpinBox would lead us to find the inner QLineEdit, which (because of its proxy), would lead us back to the QSpinBox. And therefore not be able to tab out. But ignoring the focus proxy has other problems. Normally a focus proxy is the next sibling to the widget it acts as a proxy for, and tabbing to the widget will therefore appear correct. But if the focus proxy is not the next sibling, the logic will fail, since the tab would anyway give focus to the next sibling. This becomes very apparent if the focus proxy is a child of the widget, since then its likely that the focus proxy is not the _first_ child among all the children. So tabbing to the parent would not give focus to the proxy. This patch will change this logic so that you are allowed to tab to a widget with a focus proxy. But we check that if you do so, you actually end up moving focus in the right direction. If not, we ignore it like before. This will ensure that we tab correctly when dealing with focus proxies, and especially when focus proxies are used to construct compound widgets. [ChangeLog][Widgets] When tabbing to a widget with focus proxy, focus will now be given to the proxy rather than just being ignored. Task-number: QTBUG-10907 Change-Id: I66d1da5c941fdd984bb2783cc355ca65b553b5dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Autotest: centralize the detection of IPv6 supportThiago Macieira2017-09-251-12/+12
| | | | | | | | | | | | | | I'll need it again in the next commit. Change-Id: I209fcd5dbc2b4e5381cffffd14df65dcee71ca7e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QRandomGenerator: update API to better nameThiago Macieira2017-09-221-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | "generate" is better than "get", and we already have "generate(it, it)" which uses std::generate(). This changes: - get32() → generate() - get64() → generate64() and QRandomGenerator64::generate() - getReal() → generateDouble() Change-Id: I6e1fe42ae4b742a7b811fffd14e5d7bd69abcdb3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Blacklist tst_QItemDelegate::enterKey tests on openSUSE 42.3Shawn Rutledge2017-09-221-3/+1
| | | | | | | | | | | | Task-number: QTBUG-62967 Change-Id: Ifce1c8732e126e26636057de29e1fe6348c914bb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-09-2115-38/+64
|\ \ | | | | | | | | | refs/staging/5.10
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-2015-38/+64
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973