summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-2/+2
|\ | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Fix tst_QWidget::translucentWidget() on high DPI displaysMitch Curtis2017-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It was grabbing a QLabel without accounting for the size of the window in the case where the DPI is larger than 1: FAIL! : tst_QWidget::translucentWidget() Compared values are not the same Actual (actual.size()) : QSize(32x32) Expected (expected.size()): QSize(16x16) Change-Id: I4873f3c6364ee2696f5612d91e6c97c60b2cd915 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Move QGestureRecognizer test to widgets/kernelMarc Mutz2017-06-024-0/+347
| | | | | | | | | | | | | | | | | | | | | | It's the subdir where the implementation also lives. There's no src/widgets/gestures, either. Change the mac: into a darwin: scope in the .pro file, so Sanity Bot does not complain. Change-Id: I7608d6da05af4a1117db585798a87a20ae80717a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devFrederik Gladhorn2017-05-112-3/+1
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-102-3/+1
| |\| | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| | * Stabilize tst_QApplication::touchEventPropagationFrederik Gladhorn2017-05-102-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI metrics show that this test was flaky ~38 time in 3 days. The problem is old: after we get a surface, a window manager can still decide to re-position the window. The fix is to simply send the touch event in a position where it is sure to hit the window (usually the offset is the title bar height). The blacklisting seems to not have worked, I could reproduce the failure on a linux/xcb machine. Change-Id: I5229fe020ba75c984fd3b6c322ad00d769707573 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Make QWindow::setVisible() work for widgetsMorten Johan Sørvig2017-05-111-0/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget has its own setVisible() code that needs to be run in order to correctly transition widget visibility. It is desirable to be able to show and hide (native) widgets also from the QWindow side, for example from the platform plugin, or from generic QWindow handling code in QtGui. Add a new virtual QWindowPrivate::setVisible() and move the QWindow visibility implementation there. Subclasses can now override this function to add custom code. Make QWidgetPrivate::show/hide_sys() call the QWindowPrivate setVisible implementation instead of the QWindow setVisible public API. Change-Id: I082f174b100659e1221d5898b490f8a9f498abdf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-1/+13
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-071-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * Extend blacklisting of tst_QWidget to cover Ubuntu 16.04Tony Sarajärvi2017-04-031-0/+1
| | | | | | | | | | | | Task-number: QTBUG-46116 Change-Id: I64465758deb360dd5445a80398617c0297ba561a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-041-0/+1
|\| | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| * Extend blacklisting of parts of tst_QWidget to cover Ubuntu 16.04Tony Sarajärvi2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | tst_QWidget::updateWhileMinimized has been failing on Ubuntu 14.04 and was already blacklisted there. Now we extend it to cover Ubuntu 16.04. Task-number: QTBUG-46116 Change-Id: I6758657cca46bb4c76cddb0298f9b87b8a43655b Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-0/+28
|\| | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-271-0/+28
| |\ | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * Fix propagation of locale from widget to its childrenEdward Welbourne2017-03-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the condition in QWidgetPrivate::resolveLocale() to decide whether to propagate locale: make it match setLocale_helper()'s condition when deciding whether to propagate to descendants. This lead to a QDateTimeEdit's calendar popup not getting told what locale to use correctly, unless we setLocale() on it overtly, which then blocked propagation of locale changes to it unless QDateTimeEdit manually propagated the changes. Fix the documentation of WA_WindowPropagation to mention locale as also being propagated (which it was in several places, only neglecting this one in resolveLocale). [ChangeLog][QWidget][Qt::WA_WindowPropagation] Propagate locale consistently, along with font and palette, within the widget hierarchy. Previously, locale was propagated on ancestral setLocale(), but not on creation of the descendant. Task-number: QTBUG-59106 Change-Id: I92270f7789c8eda66a458274a658c84c7b0df754 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-202-9/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-7/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Properly use the "process" featureUlf Hermann2017-02-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Deprecate QString::nullMarc Mutz2017-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* | | Make QWindow's windowState a QFlags of the WindowStateOlivier Goffart2017-03-162-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reflects QWidget API, and restores some behavior from Qt4. Some WM can have several state at the same time. On Plasma for example, when a window is both maximized and minimized, the "maximized" checkbox is checked from the taskbar entry. The API of QPlatformWindow was changed to take a QFlag and the platform plugins were adapted. - On XCB: Always send the full state to the WM. And read the full state. - On Windows: The code was originally written with '&' in Qt4, and was changed to == when porting. Some adaptation had to be made so the states would be preserved. - On macOS: Only a single state can be set and is reported back for now, with the possibly to expand this in the future. - Other platforms: Just do as before with the effective state. Task-number: QTBUG-57882 Task-number: QTBUG-52616 Task-number: QTBUG-52555 Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | Fix DPI of QWidget with parent on a different screenOlivier Goffart2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a floating QWidget has a parent on a different screen, its DPI was still inherited from the parent instead of taken from the screen. The only reason we did was in case there is a customDpi set. (customDpi is a private thing that is only used in designer to change the appearance of the previewed widget) So instead of recursing into QWidget::metric for each ancestor, just use a for loop to find if one parent has a customDpi. If no customDpi is found, then return the DPI of the right screen. Task-number: QTBUG-58959 Task-number: QTBUG-48242 Change-Id: Ie6e9e48cdd10234994c0919ba3aea9b0cdb52494 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove remaining Carbon includes from QtCore, QtGui and QtWidgetsJake Petroules2017-03-071-1/+1
|/ / | | | | | | | | | | | | | | | | Carbon is deprecated and we should not rely on it at runtime or compile time. These headers were only included for a small collection of keyboard key constants which have now been hardcoded instead. Change-Id: Ia2eaa267584b63be8019be3bbf64cba897a985a8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QSizePolicy: inline toControlTypeFieldValue()Marc Mutz2017-02-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation now uses the relaxed-constexpr qCountTrailingZeroBits() function from QtAlgorithms, making the QSizePolicy(Policy, Policy, ControlType) constructor constexpr on C++14 compilers. The explicit check for DefaultType remains to keep the constructor C++11-constexpr when called with just (Policy, Policy). Extend the constExpr tests a bit. Change-Id: I59690f0921d9bdee08e3615d0d1f4a9b92870c32 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Make QPlatformSurface events work with QWindowContainerLaszlo Agocs2017-02-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embeddeding a QWindow via QWidget::createWindowContainer() fails to deliver the SurfaceAboutToBeDestroyed event. This breaks any OpenGL or Vulkan based QWindow that releases resources upon this event, and is particularly critical with Vulkan where the only way to do properly ordered swapchain - surface cleanup is via this event. In the non-embedded case close() eventually ends up in an explicit destroy() in QWindow. In the embedded case destroy() only gets called from ~QWindow. This then silently breaks since the subclass' reimplemented event() virtual is not getting called anymore. To remedy the problem, simply add an explicit destroy() to QWindowContainer. Task-number: QTBUG-55166 Change-Id: I1671e8f4d39f6c44e19eca7b9387f55fe3788294 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | add tst_QWidget::tabletTracking autotestShawn Rutledge2017-02-231-0/+106
| | | | | | | | | | | | | | | | Ensure that tablet moves are delivered iff tabletTracking is true. Task-number: QTBUG-26116 Change-Id: Iaa360e181f0c6484cfbde6fa5365f2f0dc77433a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QSizePolicy: make (Policy,Policy) ctor constexprMarc Mutz2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, that ctor also takes a ControlType argument (defaulted), and calls the non-constexpr, non-inline function setControlType(). In order to make at least the two-arg version constexpr, I added a use of the ternary operator to check for type == DefaultType, making all calls of the ctor that use type == DefaultType constexpr. For init'ing an aggregate type without ctor in the ctor-init-list, I needed to require uniform initialization, too. C++11-style constexpr cannot call void functions, so I needed to extract the transformation part of setControlType() into a new function that returns the result instead of storing it directly. Saves a surprising 2K in QtWidgets text size on GCC 4.9, AMD64 Linux stripped release builds. Change-Id: Ib4adf5fd6e54d5345dbfe1c298554278faf13c58 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-141-6/+9
|\| | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * QFormLayout: take the correct row in takeRow()Marc Mutz2017-02-081-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't even try to understand what the old code was trying to do; once you're told by a user that the code is wrong, you see that it is. Fixed by just using the row as passed to takeRow() instead of trying to do some storage-index calculations. The m_matrix indexing operator does it all for us. Added a test that checks that the expected field widget gets returned. Fixed expected test data that was wrong, and just checking that the implementation behaves as implemented, instead of as documented. Amends change 8fbae648db3bc51bafacfe1f88e40561d357e60a. [ChangeLog][QtWidget][QFormLayout] The functions takeRow() and removeRow(), new in 5.8.0, now take and remove the correct row. Task-number: QTBUG-58693 Task-number: QTBUG-15990 Change-Id: I7185ccbc6c03e2579741cad5c0c821d3ed165474 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QSizePolicy: add a transposed() methodMarc Mutz2017-01-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some situations, this allows for nicer code. It's also possible to make this constexpr in C++11, whereas the mutable transpose() would require C++14-style constexpr. The new function should also be faster, since it just swaps the member variables. Because of constexpr-function limitations, the way the return value is constructed needs to depend on the level of the compiler's C++11 support. This is not the only class that requires uniform init to provide a fully constexpr interface (QUuid and QBasicAtomic come to mind), so this should probably be generalized across Qt at some point. Added tests. [ChangeLog][QtWidgets][QSizePolicy] Added transposed() method. Change-Id: Ic1077a0d5a861e7c63bd1daeeb42b97c3a2f71ef Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | QSizePolicy: add some constexprMarc Mutz2017-01-282-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a basic test for constexpr expressions involving QSizePolicy. GCC < 4.8.0 has problems with initializing variant members in constexpr ctors: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922 Instead of revoking its Q_COMPILER_CONSTEXPR, which is a source-incompatible change, simply note the fact so we can selectively provide constexpr for QSizePolicy. Change-Id: Iba8e5a7cdf847d73e8e2b6bb6211fb3c9846aa0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| * Plug memleaks in tst_QStackedLayoutMarc Mutz2017-01-141-1/+1
| | | | | | | | | | | | | | QLayout::replaceWidget() doesn't delete the affected item, but returns it. Change-Id: Ibda96e4bf2432ad13ed2908c7d37547f46e29a37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Widgets: report focus object change to QtGui before sending widget eventsTor Arne Vestbø2017-01-101-1/+59
| | | | | | | | | | | | | | | | | | | | Updating the focus child means the focus object of the window has changed. We need to report this to QtGui immediately so that it can e.g. inform the input context of the new focus object, before widgets reacting to the focus events start calling update() on the input method. Change-Id: Ie3f7b835591e71519e3f384c2abdad53242c9736 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Long live QTest::addRow()!Marc Mutz2017-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new function does the same as newRow(), except that it has a less confusing name (in line with _add_Column()), and accepts printf-style arguments to avoid the need to newRow(qPrintable(QString::asprintf())), a common pattern in client code. It uses qvsnprintf() under the hoods, avoiding the need for the QString const char* round-trip. Port all in-tree users of newRow(qPrintable(QString::asnprintf())) to the new function. Change-Id: Icd5de9b7ea4f6759d98080ec30f5aecadb8bec39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | macOS: Fix unused function warning in tst_QWidgetTor Arne Vestbø2017-01-061-0/+2
| | | | | | | | | | Change-Id: I9c3b1c2216b15bb8da961a4e188040e32d269809 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-135-51/+57
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * tests/auto/widgets: use QCOMPARE(., nullptr)Marc Mutz2016-11-304-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | .. instead of manually casted 0s. QCOMPARE(., nullptr) was added for Qt 5.8. Make use of the new API. In tst_qwidget.cpp, as a drive-by, change qApp->focusWidget() -> QApplication::focusWidget() Change-Id: I1331b8916b026d48e01534d1ed0b3d72f3f3d50c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-241-18/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tools/configure/configureapp.cpp tools/configure/environment.cpp Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-231-18/+24
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249. Conflicts: header.BSD-NEW qmake/Makefile.win32 src/openglextensions/qopenglextensions.cpp src/openglextensions/qopenglextensions.h src/winmain/qtmain_win.cpp src/winmain/qtmain_winrt.cpp tools/configure/configureapp.cpp util/glgen/qopenglextensions.cpp.header util/glgen/qopenglextensions.h.header Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
| | | * tst_QFormLayout: Fix UB (invalid enum value) in several functionsMarc Mutz2016-11-221-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code coerced a -123 into a QFormLayout::ItemFlags, which, however, being an enum with enumeration values 0..2, only has valid numerical values 0..3. Fix by using 3 as the value to represent the invalid enum value, and store this in a constant so as not to distribute this magic number all around the test class. Change-Id: Ie5e93a69ef5a3acdde43030b022e0cce8aec484d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | Introduce QWindow::setFlag and QWidget::setWindowFlagDaniel Vrátil2016-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analogous to QWidget::setAttribute(), introduce an API to easily enable/disable a single window flag without having to resort to w.setFlags(w.flags() | Qt::NewFlag). Change-Id: Ib0f7254a34c8d884cdec181c41b99e5ef035d954 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-024-25/+65
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS. Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/sdk.prf src/angle/src/libEGL/libEGL.pro src/platformsupport/fontdatabases/fontdatabases.pro src/platformsupport/platformsupport.pro src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro tests/auto/widgets/widgets/qmenubar/BLACKLIST tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Task-number: QTBUG-56853 Change-Id: If58785210feee3550892fc7768cce90e75a2416c
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-014-22/+24
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-223-15/+18
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/qeglfshooks.cpp Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
| | | * Plug remaining leaks in tests/auto/widgets/kernelMarc Mutz2016-10-213-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual: - delete return values of QLayout::takeAt(), replaceWidget() - delete styles - delete top-level widgets - delete actions Either by naked delete, QScopedPointer or allocation on the stack instead of the heap. This fixes the remaining errors in GCC 6.1 Linux ASan runs of tests/auto/widgets/kernel. Change-Id: I8cc217be114b2e0edf34ad8d60dbf722f900bb7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-131-7/+6
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also bump minimum required Qt version for Android: Ministro updates. Conflicts: src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java src/plugins/platforms/android/androidjnimain.cpp Change-Id: I966f249bebf92da37bfdeb995ad21b027eb03301
| | | * tst_QWidget: Fix UB (invalid member access) in ↵Marc Mutz2016-10-121-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EnterTestMainDialog::eventFilter() Found by UBSan: tst_qwidget.cpp:10207:29: runtime error: member access within address 0x6060000e8880 which does not point to an object of type 'EnterTestModalDialog' 0x6060000e8880: note: object is of type 'QWidget' eb 00 80 45 10 4b 32 ab 11 2b 00 00 80 df 08 00 60 61 00 00 c0 4c 32 ab 11 2b 00 00 00 00 be be ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QWidget' #0 0x6ca13f in EnterTestMainDialog::eventFilter(QObject*, QEvent*) tst_qwidget.cpp:10207 #1 0x2b11b8bc90c3 in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) qcoreapplication.cpp:1081 #2 0x2b11a3c49b4a in QApplicationPrivate::notify_helper(QObject*, QEvent*) qapplication.cpp:3716 #3 0x2b11a3c8ec72 in QApplication::notify(QObject*, QEvent*) qapplication.cpp:3704 #4 0x2b11b8bccd0f in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:988 #5 0x2b11aea5c34d in QCoreApplication::sendEvent(QObject*, QEvent*) qcoreapplication.h:231 #6 0x2b11aea5c34d in QGuiApplicationPrivate::_q_updateFocusObject(QObject*) qguiapplication.cpp:3690 #7 0x2b11aea61360 in QGuiApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) .moc/moc_qguiapplication.cpp:177 #8 0x2b11b8d1dc86 in QMetaObject::activate(QObject*, int, int, void**) qobject.cpp:3787 #9 0x2b11aea784a3 in QWindow::focusObjectChanged(QObject*) .moc/moc_qwindow.cpp:760 #10 0x2b11a3fb24f2 in QWidget::clearFocus() qwidget.cpp:6705 #11 0x2b11a3fc87b1 in QWidget::~QWidget() qwidget.cpp:1608 #12 0x2b11a526688c in QDialog::~QDialog() qdialog.cpp:352 #13 0x6c43e2 in EnterTestModalDialog::~EnterTestModalDialog() tst_qwidget.cpp:10160 #14 0x6c43e2 in EnterTestModalDialog::~EnterTestModalDialog() tst_qwidget.cpp:10160 #15 0x492be3 in EnterTestMainDialog::buttonPressed() tst_qwidget.cpp:10188 #16 0x492be3 in EnterTestMainDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) .moc/tst_qwidget.moc:2056 #17 0x2b11b8d1dc86 in QMetaObject::activate(QObject*, int, int, void**) qobject.cpp:3787 #18 0x2b11a45cb833 in QAbstractButton::clicked(bool) .moc/moc_qabstractbutton.cpp:307 #19 0x2b11a45cd54b in QAbstractButtonPrivate::emitClicked() qabstractbutton.cpp:411 #20 0x2b11a45df73a in QAbstractButtonPrivate::click() qabstractbutton.cpp:404 [...] #41 0x6bb2cf in tst_QWidget::taskQTBUG_27643_enterEvents() tst_qwidget.cpp:10249 [...] Fix by checking the event type first, and accessing modal->button only if it's QEvent::Enter. Change-Id: I2c7df3a1f43ecbfe14741b5861729078a91a32d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>