summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Enable tst_qaccessibilitymacFrederik Gladhorn2017-05-043-36/+0
| | | | | | | | | | | | | The test was disabled because it was checking if we had the right permissions. It does seem as if the permissions do not matter as long as everything is in process though. As seen by the regression in fafdb171e0c317ee8f871dc7b504d3713d5860eb it's important to run the test. This regression would have been caught. Change-Id: Ia1938e683badd1de2657aa6dc8a3b3bbe430e8c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Introducing multiscreen-menus manual testGabriel de Dietrich2017-05-036-1/+253
| | | | | | | | | | | | | | | | We have been noticing several menu popup sizing issues in the presence of multiple, heterogenous displays. Most remarkably, we'd often pick the primary display's geometry when computing the menu's size hint. This results in usability issues if the primary display is smaller than the display onto which the menu popup is being displayed. This manual test covers menu bar, context and push button menus. Torn-off menus are also enabled. We turn off the use of native menu bars to cover a few more cases. Change-Id: I29658ebdc56e41aa1bf99d06d96aed6bfb5461b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QIconLoaderEngine: Fix actualSize() for no-entryPalo Kisa2017-05-031-0/+1
| | | | | | | | | Return an empty size if no suitable entry found to avoid mismatch with the returned pixmap()'s size (the QIconEngine::actualSize() returns the originally requested size). Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Improve suppression of spurious socket notifications under WindowsAlex Trotsenko2017-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | There were still two cases where spurious notifications would be possible: - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP socket somewhere outside the slot connected to readyRead() signal (::WSARecvFrom posts FD_READ notification, even if a notification for incoming datagram already exists in the message queue); - a socket was registered to receive several types of event and WM_QT_ACTIVATENOTIFIERS message is located between the different events for this socket in the queue. Provided patch ensures that the message queue is synchronized with the Qt event processing mechanism and adds a way to detect spurious notifications inside the window procedure. Task-number: QTBUG-58214 Change-Id: I49609dace601f300de09875ff1653617efabd72f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Peter Seiderer <ps.report@gmx.net>
* QWindowsPipeReader: fix possible invalid invocation of ReadFileEx()Alex Trotsenko2017-05-021-0/+12
| | | | | | | | | | | If the user calls QLocalSocket::setReadBufferSize() with a value less than the current size of the pipe buffer, startAsyncRead() would call ReadFileEx() with invalid parameters: ReadFileEx(handle, nullptr, some_big_value, ...); Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix tst_QFileDialog2::completionOnLevelAfterRoot()Friedemann Kleint2017-04-291-1/+1
| | | | | | | | Change the check for the unambiguous match to be case insensitive. Task-number: QTBUG-60466 Change-Id: Iaa019cc803a56b015f45309fb1b3a7a8a3d82ee4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix test build with ICC: QFlags does not auto cast to uintThiago Macieira2017-04-281-9/+9
| | | | | | | | | | I don't know why. tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton) tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Fix return of empty paths with multiple points on intersectionsAllan Sandfeld Jensen2017-04-281-0/+255
| | | | | | | | | | The intersection algorithm for intersection with rects, might return one edge of the rect even if that edge does not intersect with the path. To deal with that we collapse paths with empty bounding rects to the empty path. Task-number: QTBUG-60024 Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Revert "Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11"Timur Pocheptsov2017-04-271-2/+0
| | | | | | | | | This reverts commit 96c27f0dfa72f7800c85af10c00e0dababdc3fbf. We now use a custom keychain that should fix the original problem with the test. Change-Id: I52e4105f34a46ad7080750d9a62480ebe3a56e68 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMenu: Display the menu title on the torn-off menu's title barGabriel de Dietrich2017-04-262-1/+17
| | | | | | Change-Id: If16e262a6c8b39dff517cc105cf55686d4c22582 Task-number: QTBUG-11693 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Revert "tst_qsslsocket::protocolServeSide - fix for macOS 10.11"Timur Pocheptsov2017-04-261-16/+2
| | | | | | | | The fix is outdated - the tests it was fixing - pass on 10.11. Change-Id: I8b42c1d3d2f1279382b15c20587dcc93cf1b6b40 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix tst_QLineEdit for offscreen and minimal platformsSami Nurmenniemi2017-04-261-11/+27
| | | | | | | | | Unselecting with offscreen and minimal platforms behave similarly as in Windows and QNX. If left or right key is used for unselecting, cursor position is changed. Change-Id: I022cd2fec80ad1875fec983e1e3536a105e18bb2 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
* Fix tests that assume system files are owned by root for qemuSami Nurmenniemi2017-04-266-4/+46
| | | | | | | | | | | | | | | | | If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QWindow modal dialog tests for offscreen and minimal platformsSami Nurmenniemi2017-04-261-0/+16
| | | | | | | | Changed testing of focus of modal dialogs to match behavior on offscreen and minimal platforms. Change-Id: Ife3ea41b4b78df2e64c8d8e740332914b1e5a67c Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
* Fix tst_QWidget for platform "offscreen"Sami Nurmenniemi2017-04-262-1/+13
| | | | | | | | | Some features are not implemented by "offscreen" platform. Skip tests failing because of that. Some failing cases are also already skipped or blacklisted on "xcb" platform. Change-Id: I17269169379c270bd7d6f2ddda03ad9b114a71ce Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
* QUrl: fix IDN conversion when the ACE form is invalidThiago Macieira2017-04-251-0/+25
| | | | | | | | | | | | | | | | We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Blacklist tst_MacGui autotest in macOS 10.11Tony Sarajärvi2017-04-241-0/+2
| | | | | | Task-number: QTBUG-60385 Change-Id: I6e692ff55d26b9070343d612e2f872091d5c343d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QUrl: fix IDN whitelist checking when the TLD is in UnicodeThiago Macieira2017-04-241-0/+8
| | | | | | | | | | The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
* Rename macos blacklisting to osxTony Sarajärvi2017-04-241-1/+1
| | | | | Change-Id: I7e370ad8e1e2cb87188e149c96681e4c18abaa4f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Blacklist tst_qsemaphore on macOS 10.12Tony Sarajärvi2017-04-241-0/+1
| | | | | | Task-number: QTBUG-58745 Change-Id: I085a2ac60cc24c287140788a88512657238a2c4b Reviewed-by: Liang Qi <liang.qi@qt.io>
* Deprecate QCoreApplication::flush()Gatis Paeglis2017-04-225-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Fix QMetaMethod::invoke and automatic type registrationOlivier Goffart2017-04-221-0/+29
| | | | | | | | | | | | | | | | | This was simply not working for two reasons: - The index passed to QMetaObject::metacall was not right (there was an offset because of the return type) - If the registration succeeded, the arguments were not even initialized. The tests in tst_moc always called QMetaMethod::parameterType before calling invoke, which was properly registering the type. So this was not seen in the tests before. [ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and types whose metatype gets automatically registered. Task-number: QTBUG-60185 Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLoggingRegistry: remove rules vectorMarc Mutz2017-04-211-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only contained a concatenation of the individual rule sets, probably to fix their order in a central place, as well as simplifying iteration in defaultCategoryFilter(). Fix these two issues differently, but introducing a RuleSet enum that lists rule sets in the order in which they should be applied by defaultCategoryFilter(), and turn individual rule sets vectors into a C array of vectors. This enables two nested loops in defaultCategoryFilter to replace the one loop over 'rules'. Apart from building up 'rules' in updateRules(), this was the only access to that member. That leaves updateRules() with just the task of running defaultCategoryFilter() on the new rule sets. Consequently, a call to updateRules() can now replace the identical loop in installFilter(). Performance should not suffer. Iterating over a fixed-size array of vectors is hardly any slower than iterating over a single vector, and while the construction of 'rules' was probably a one-off task in most programs, this way of keeping the rules also saves memory because rules are not kept in two different vectors. It is also more maintainable, of course. Change-Id: Ibc132d096c8137dd02b034752646212e51208637 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Skip tst_QMdiArea::setViewport on macOS due to flakey failures in CITor Arne Vestbø2017-04-201-0/+4
| | | | | | Task-number: QTBUG-58520 Change-Id: I582c190de45e85e2dfb397289720c655ec8d781c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix tst_QTcpServer for QEMUSami Nurmenniemi2017-04-201-0/+53
| | | | | | | | | QEMU does not support all syscalls needed for tcp socket testing. Skipped tests that can't pass on QEMU. Task-number: QTBUG-59966 Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: fix the testGiuseppe D'Angelo2017-04-201-2/+2
| | | | | | | | | | | | | | 8a375341cf7a7cf38ef427bc0c9f1abde05a471d added swap() to QJson* classes and marked them shared-not-movable-until-qt6. This change made QMetaType start reporting that QJson* classes were movable; however, the test used QTypeInfo and not QTypeInfoQuery to double check that information. Port the test to QTypeInfoQuery. Change-Id: I3227a70a8f24c0013257e180e9cb9cfebe9947f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Split Q_COMPILER_UNICODE_STRINGS: add Q_STDLIB_UNICODE_STRINGSMarc Mutz2017-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bf2160e72cd8840a8e604438cbdc807483ac980a, we can rely on charNN_t support in all compilers except MSVC 2013, and since that commit, we use (in 5.10, not 5.9, yet) !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS) when we only need charNN_t, the type, as opposed to its library support (u16string, char_traits<char16_t>, ...). This patch splits the Q_C_UNICODE_STRINGS macro into two, adding Q_STDLIB_UNICODE_STRINGS for when we need std::uNNstring, leaving Q_C_UNICODE_STRINGS for when we need just charNN_t support. In QDebug, when constructing a QChar out of a char16_t, cast to ushort first, since QChar(char16_t) was only officially introduced in Qt 5.10. [ChangeLog][Potentially Source-Incompatible Changes] The internal Q_COMPILER_UNICODE_STRINGS macro is now defined if the compiler supports charNN_t, even if the standard library does not. To check for availability of std::uNNstring, use the new Q_STDLIB_UNICODE_STRINGS macro. Change-Id: I8f210fd7f1799fe21faf54506475a759b1f76a59 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Initialize QLoggingRegistry rules on first use, not qApp construction"Tor Arne Vestbø2017-04-191-16/+2
| | | | | | | | | | | | | This reverts commit 47cc9e23a313d67a4a3107242f205d2473842021. We use QCoreApplication::applicationDirPath in the logging initialization to find a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires a QCoreApplication instance this leads to a qWarning, which in turn leads to a recursive call to the logging initialization, and in turn to a recursive mutex deadlock. Task-number: QTCREATORBUG-18031 Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QLineEdit: fix broken testElvis Angelaccio2017-04-191-0/+4
| | | | | | | | | Commit 288bfb0bbd added a test that uses QLineEditIconButton, which requires QT_BUILD_INTERNAL to be defined in order for the findChild() call to work as expected. Change-Id: Ieda18f4e26a91322e8a83c14f8d1fbbe4313ecf0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix PNGs saved from QImage transform of 8-bit imagesAllan Sandfeld Jensen2017-04-191-0/+14
| | | | | | | | | | | Fixes two separate errors. QImage::transform was incorrectly adding colors to the color-table of the returned image when the converted image would not be indexed, and qpnghandler was looking at non-empty color- table instead of color format. Task-number: QTBUG-43708 Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QLineEdit: Make the clear button always the leftmost buttonElvis Angelaccio2017-04-191-0/+23
| | | | | | | | | | | | | | QLineEditIconButton currently draws a fully transparent pixmap in its paintEvent() function, when the line edit is empty. This does not work when there is another trailing QAction that is visible even when the line edit has no text, as reported in QTBUG-59957. To fix this issue, make sure the clear button is always the leftmost button. Task-number: QTBUG-59957 Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Initialize QLoggingRegistry rules on first use, not qApp constructionTor Arne Vestbø2017-04-181-2/+16
| | | | | | | | | 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: Ia733105c5b6f28e22af511ced5271e45782da12b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGraphicsBlurEffect: Fix for high DPI scalingFriedemann Kleint2017-04-181-0/+5
| | | | | | | | | Preserve the device pixel ratio in the various helper functions and when drawing. Task-number: QTBUG-60026 Change-Id: Ieac9360b00044b6aedd0d3e1ad6e3b16d436f20f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-1812-1/+71
|\ | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| * Fix undefined behavior in QSharedPointer::create()5.8Ihor Dutchak2017-04-171-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize a deleter for a new object, created by QSharedPointer::create(), only after the object is actually constructed. [ChangeLog][QtCore][QSharedPointer] Fixed undefined behavior when creating an object with QSharedPointer::create() and its conscructor throws an exception. Task-number: QTBUG-49824 Change-Id: I07f77a78ff468d9b45b8ef133278e8cdd96a0647 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QMatrix4x4: fix aliasing problem in operator*=Marc Mutz2017-04-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | When multiplying a QMatrix4x4 by itself, we were clobbering the very matrix we read from. Employ read-caching to avoid this aliasing problem. [ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct result even if the RHS and LHS are the same object. Change-Id: I8534d56cfdd62c336577125127f05173fcec2873 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Restore compatibility with Qt 5.7.0 and 5.6.1Thiago Macieira2017-04-1210-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSysInfo::productType() returned "osx" for all versions of macOS, even 10.12. Change 3e2bde35786 was incorrect. [ChangeLog][Important Behavior Changes] QSysInfo::productType() and QFileSelector behavior on macOS was restored to match what Qt used to return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2, 5.7.1 and 5.8.0 is removed. [ChangeLog][Future Compatibility Notice] The identifiers that QSysInfo::productType() and QFileSelector will use to identify macOS systems will change in Qt 6.0 to match the Apple naming guidelines which will be current then. Task-number: QTBUG-59849 Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QMenu: Fix torn-off menu display crash issueDongmei Wang2017-04-141-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When tearing off either a non-scrollable multi-colume menu or a scrollable menu, displaying the torn-off menu crashes. The root cause is when the torn-off menu is created, the tear-off menu's style, margins and other attributes are not set to it. The patch is to ensure the torn-off menu has the same attributes as the tear-off menu does and set the torn-off menu with a correct menu size. Task-number: QTBUG-24815 Change-Id: Icea45f149ea8792671af4a62e62cad6ee01a1f95 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QMenu: Fix margins related display issuesDongmei Wang2017-04-141-1/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the contents margins and the menu paddings are not considered for calculating the menu size, the positions and the size of tear-off bar, scrollers and the positions of the menu items when scrolling the menu, which results in the following problems when valid contents margins and/or menu paddings are set: - The tear off area is displayed in a wrong position. The mouse events are not handled correctly in the tear off area. For example, when you click in the tear off area, the menu should be torn off but nothing happens - For a multi-column menu, the menu width is not calculated correctly - For a scrollable menu, - the menu width is not calculated correctly - the menu items are not displayed in correct positions - the scrollers are not displayed in correct positions - menu items are displayed on the area of borders and margins when scrolling the menu - the last menu item is not displayed above the bottom of the content area when scrolling the menu to the end. The changes are to fix the problems above. Change-Id: I7931e1088dff0029f2d4825e2aa34b4e32fdccd9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QVariant: implement QByteArray ↔ QUuid conversionv5.9.0-beta2Marc Mutz2017-04-142-1/+17
| | | | | | | | | | | | | | | | | | | | Seems like an obvious omission. [ChangeLog][QtCore][QVariant] Can now convert QUuid to and from QByteArray, not just QString. Change-Id: Ib56ae86ca0c27adaf1e095b6b85e64fe64ea8d18 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-121-0/+1
|\| | | | | | | Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
| * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: Ic92eee98f691ebb1e0212498c1ae13ede74bca93 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Preserve last modification timestamps of installed filesSimon Hausmann2017-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | On non-windows platforms, we use the "-p" parameter of install(1) to preserve the last modification timestamps of files. On Windows the use of copy does not preserve them. As a cross-platform solution, this patch introduces a simple built-in install command in qmake to copy files. Task-number: QTBUG-59004 Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Skip testing of QOpenGlConfig on platforms that don't support itSami Nurmenniemi2017-04-121-0/+7
| | | | | | | | | | | | Task-number: QTBUG-59966 Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix tst_toolsupport on 32-bit arm platformSami Nurmenniemi2017-04-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | On 32-bit arm platform, qint64 gets aligned differently than on 32-bit x86. First difference between the platforms on QFilePrivate member offset happens in QFileDevicePrivate::cachedSize: - On 32-bit x86 it's offset is 148 (4-aligned) - On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the remaining members are +4 compared to x86 - On 64-bit architectures the offsets are the same Change-Id: If110da27ea08504e78b167c0a21599420eaa9630 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_qhashfunctions: Test non-zero seeds tooThiago Macieira2017-04-111-44/+70
| | | | | | | | | | Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e927021a1a2e Reviewed-by: David Faure <david.faure@kdab.com>
* | QTextDocument: improve import of DIV tagsDavid Faure2017-04-101-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | <div>1<br/></div>2 was inserting two newlines between 1 and 2, while all tested web browsers only insert one newline - as long as there is nothing between the <br/> and the </div>. This was the cause for extra newlines being inserted in KMail when replying to HTML emails, such as those generated by gmail. Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix QDir::mkpath() when the path contains "symlink/../"Thiago Macieira2017-04-071-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to collapse a "symlink/.." segment because the parent directory of the symlink's target may not be the directory where the symlink itself is located. [ChangeLog][QtCore][QDir] Fixed a bug that caused QDir::mkpath() to create the wrong directory if the requested path contained a symbolic link and "../". Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e367730a1e24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | QDataStream: add operator<< and >> for std::nullptr_tThiago Macieira2017-04-071-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::nullptr_t is nullary: it accepts only one value, nullptr. So we don't need to read or write anything. This commit simply adds the two operators that allow generic code to operate on std::nullptr_t if required. This commit also adds the actual use to QMetaType::load/save, even though there's no change in behavior. [ChangeLog][QtCore][QDataStream] Added operator<< and operator>> overloads that take std::nullptr_t, to facilitate generic code. Change-Id: Iae839f6a131a4f0784bffffd14aa37e7f62d2740 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_qmessagehandler: fix qMessagePattern for armSami Nurmenniemi2017-04-071-2/+4
| | | | | | | | | | | | | | | | | | Backtrace logging tests were not passing for arm. Added compile option -funwind-tables to support backtrace on arm. Task-number: QTBUG-59966 Change-Id: I5e2443b1e3a644a239dab68db990e75ae8fade24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>