summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix remaining qdoc warmings for Vulkan stuffMartin Smith2018-01-184-5/+6
| | | | | | | | | | | Several uses of #if QT_CONFIG(vulkan) were modified to for classes QVulkanFunctions and QVulkanDeviceFunctions was added to qplatformvulkaninstance.h, because the include file that contains them doesn't exist when vulkan isn't there. Change-Id: I392202ab5fe9bb4c558a991870e6ebf79254aec0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Introduce QIcon::fallbackSearchPaths()Alexander Volkov2018-01-152-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... that will be used if an icon can't be found in the current theme. The Icon Theme Specification https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html states that unthemed icons must be searched in the base directories, i.e. /usr/share/icons, ... But in practice unthemed icons are installed into /usr/share/pixmaps and this dir is not used as a base dir for icon themes. So it's better to explicitly specify fallback dirs to avoid needless access to the filesystem. Also some KDE application install their own unthemed icons (into /usr/share/<appname>/pics), that can't be found by QIconLoader. With this change it would be possible for them to specify dirs with unthemed icons and thus be displayed correctly in non-KDE environments. [ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that will be used to find icons missing in the current icon theme. Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e Task-number: QTBUG-33123 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* doc: Add QTouchEvent qualifier to uses of QTouchPointMartin Smith2018-01-121-3/+3
| | | | | | | | | QTouchPoint is declared inside QTouchEvent, so \fn commands for functions in QTouchPoint must use QTouchEvent::QTouchPoint:: as the qualifier. Change-Id: I1dffe9f43f9f8bddbaa8fab9f77cf17802cf8b26 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-112-15/+18
|\ | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-091-0/+1
| |\ | | | | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| | * Avoid providing bad pixelDeltas on X11Allan Sandfeld Jensen2018-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With libinput we now get a hardcoded resolution that is unrelated to the hardware. So avoid using that as a real pixel delta and document pixel deltas as being driver specific and unreliable on X11. Task-number: QTBUG-59261 Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Make QPalette::setBrush() check before detachingGabriel de Dietrich2018-01-041-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the same brush on the same group and role should not detach nor alter the result of QPalette::isCopyOf(). Task-number: QTBUG-56743 Change-Id: Ic2d0dd757d703b01e8c5d835a8c124b3317653f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QGuiApplication: Add fontChanged signalKai Uwe Broulik2018-01-112-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need to install an event filter on qApp just for this. A similar thing was done with setPalette to reduce the number of event filters in e.g. SystemPalette and Quick Controls. [ChangeLog][QtGui][QGuiApplication] Added fontChanged signal Change-Id: Ifa843aa42b91ac63ab17c3b064ac0e764aac77d3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-041-2/+1
|\| | | | | | | | | | | Change-Id: I644cd82b0d952b7d139e0228bf5017f147db77e7
| * | QtGui/Windows: Fix restoring of changed cursor in restoreOverrideCursor()Friedemann Kleint2018-01-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unconditionally apply window cursors restoreOverrideCursor() also for platforms with override cursor capability in case a cursor was changed while the override cursor was active. Amends b05d1c2ebfebf0f427a92668c0a7b177d0952012. Task-number: QTBUG-65001 Change-Id: I7fd38a27dcf045f2fb48a16abb484342feaab5df Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-0214-5/+121
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-3012-3/+103
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Teach QPlatformWindow about safe area margins and implement for iOSTor Arne Vestbø2017-12-138-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. QWidget will incorporate the safe area margins into its contents margins, so that they are are never smaller than the safe area margins. This can be disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget attribute, which is set by default. QLayouts will automatically use the contents area of a widget for their layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This can be used, along with a contents margin of 0 on the actual layout, to allow e.g. a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area. [ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the device into account when computing layouts for QtWidgets. Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Report modifiers correctly in mouse events with evdev and libinputLaszlo Agocs2017-12-123-0/+49
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-60694 Change-Id: I7b1625e5f31e49cd2ab18a83bbd0f65f9b58088d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * Do not allow drag events when window is blocked by modal windowFriedemann Kleint2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for QWindowPrivate::blockedByModalWindow in QGuiApplicationPrivate::processDrag(). Task-number: QTBUG-46287 Change-Id: I8f43de8389f34458f9e10b37b94806b47a50d40a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * iOS: Harden logic for when it's safe to use the graphics hardwareTor Arne Vestbø2017-12-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To fix QTBUG-52493 we tied the exposed state of a window to the application being in the foreground. This has the result of a visible flash of black between hiding the launch screen and showing the first frame of the application, as the application is still waiting for UIApplicationStateActive to begin rendering, which happens after iOS hides the launch screen. According to the iOS OpenGL ES Programming Guide, it should be safe to render GL in UIApplicationStateInactive as well, and even in UIApplicationStateBackground, as long as the rendering finishes before the UIApplicationDidEnterBackgroundNotification returns. To ensure that we catch any bugs in this area, checks have been added that verify that no rendering happens while in the background state. Task-number: QTBUG-63229 Task-number: QTBUG-52493 Task-number: QTBUG-55205 Change-Id: Ib42bedbeddd7479ab0fb5e5b7de9f5805658e111 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QtGui/Windows: Fix wait cursors remaining activeFriedemann Kleint2017-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QWindowPrivate::applyCursor(), do not apply override cursors when the platform supports QPlatformCursor::OverrideCursor. Complements b05d1c2ebfebf0f427a92668c0a7b177d0952012. Task-number: QTBUG-65001 Change-Id: Ie84cc30ad99b22e037aae829a2ce847ec4bf900f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | Merge remote-tracking branch 'origin/5.10.0' into 5.10Liang Qi2017-12-081-2/+16
| |\ \ | | | | | | | | | | | | Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
| | * \ Merge 5.10 into 5.10.0Oswald Buddenhagen2017-11-203-2/+7
| | |\ \ | | | | | | | | | | | | | | | Change-Id: Ibfbaa8ef89cf45b87a2c65f1da4a708e5464f259
| | * | | Adjust screen scale factor for certain screen configurationsVictor-Andrei Variu2017-11-171-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pixel density reported by the screen is sometimes not precise enough, so recalculate it: divide px (physical pixels) by dp (device-independent pixels) for both width and height, and then use the average if it is different from the one initially reported by the screen Task-number: QTBUG-62191 Change-Id: Ia2f485c7ce8849db6e7c1d2ac08f5e008aea2ff8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | Add support for FileChooser flatpak portalJan Grulich2017-12-161-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for FileChooser Flatpak portal. To support them we just do specific DBus calls, which are then caught and forwarded by xdg-desktop- portal daemon/service. This is needed for Qt applications running in sandbox. [ChangeLog][Platform Specific Changes][Linux] Added support for flatpak portals. Flatpak is a software utility for software deployment and package management. It provides a sandbox environment in which users can run applications in isolation from the rest of the system. To communicate with the system flatpak uses portals, which are designed to be a bridge between sandboxed applications and desktop/system running on user's computer. Flatpak runs this service (called xdg-desktop-portal) automatically. It exports the portals via DBus and they are visible by default to all applications running under Flatpak. Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | QDrag: Allow setting cursor for IgnoreActionMorten Johan Sørvig2017-12-151-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is especially useful on macOS where the default ignore cursor is the pointer cursor. Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017 Task-number: QTBUG-26724 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | | Rework the "failed to find or load QPA plugin" message a bitSergio Martins2017-12-151-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one of the most frequent problems users ask for help with, and they don't even know if the plugin was found but not loaded or simply not found. Qt knows what happened, so communicate it to the user. Change-Id: I6003ed4ab3d147a5d159b2002004e53c251cb512 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Fix persistence of custom colors palette in QColorDialogSerge Lysenko2017-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QColorDialog does not save custom colors after application relaunching, if those colors were changed with drag'n'drop Task-number: QTBUG-64500 Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | | Improve QTabletEvent::rotation documentationShawn Rutledge2017-12-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - There was a typo - It has not been limited to the 4D mouse for some time now - The Apple Pencil now supports rotation too Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | | doc: Document remaining anonymous enumsMartin Smith2017-12-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds qdoc comments for the remaining nameless enum types. Change-Id: I4da8b67883c8020323437cf74c938d3655d8c384 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | doc: Don't let qdoc see some defines that cause troubleMartin Smith2017-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update surrounds some #defines with #ifndef Q_CLANG_QDOC because they define some names that conflict with formal parameter names. Otherwise, clang starts replacing formal parameter names with $27 etc, when qdoc runs, and that causes trouble for qdoc. The change also replaces one use of Q_QDOC with Q_CLANG_QDOC. Change-Id: I6e93bf1e0d30d7590280b6f18f0e694556050685 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-302-2/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | refs/staging/dev
| * | | | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-302-2/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| | * | | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-232-2/+3
| | |\ \ \ \ | | | |_|/ / | | |/| | / | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | | * | qpa: Teach handleApplicationStateChanged about sync/async deliveryTor Arne Vestbø2017-11-202-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using QWindowSystemInterface::SynchronousDelivery reduces the chance that we are flushing other events before delivering the application state change. Those other events may conclude that the application is still active, while in reality it is not, and do bad things. Change-Id: I738c162fac22d2cd18de1e080bcd2cda78ec3f77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | macOS: Fix handling of multiple ampersands in menu itemsAndre de la Rocha2017-11-301-2/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the text of a QAction in a menu item contained a sequence of multiple ampersand characters, only one of them would be removed, which is inconsistent with the way this situation is handled on Windows, where every other ampersand is removed, which is also the way other widgets such as tabs, buttons, etc. are handled on macOS and other platforms. Task-number: QTBUG-63361 Change-Id: Ibd9a520afa37b3387f3b951a94a3c275742e7ad3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-233-3/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-093-2/+7
| |\| | | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * Fix QHighDpi::fromNativeLocalExposedRegion rounding errorsBłażej Szczygieł2017-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ceiling width/height fails to take into account rects that do no have their top left position on an exact point boundary. Example: QRect(0,0 20x20) and QRect(1,1 20x20) with scale 2.0 would give the same result of QRect(0,0 10x10). The correct rects are QRect(0,0 10x10) and QRect(0,0 11x11), so that we are sure to repaint all pixels within the exposed region. Before 5138fada0b9c, rects were also rounded incorrectly. The old method would give the result of QRect(0,0 11x11) in both cases, causing the exposed region to be larger than a window. Amends 5138fada0b9ce3968b23ec11df5f0d4e67544c43 Task-number: QTBUG-63943 Change-Id: I9f3dddf649bdc506c23bce1b6704860d61481459 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Enable glyph cache workaround for GC2000 as wellLaszlo Agocs2017-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glyph cache resize is clearly doing something that is not actually legal with OpenGL ES. Until this gets investigated properly, add the Vivante GC2000 (found in the commonly used i.MX6 quad) to the list since reports show that the issue occurs there as well. Task-number: QTBUG-49490 Change-Id: Ia890346d8dbb1691bc113e2ef522713ba6709393 Reviewed-by: Louis Kröger <louis.kroeger@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix dragging inside a modal window when a QShapedPixmapWindow is usedAndy Shaw2017-10-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced with a3d59c7c7f675b0a4e128efeb781aa1c2f7db4c0 which caused dragging to fail within a modal dialog on the XCB platform. By adding an exception for the QShapedPixmapWindow, which is the window used for the drag, we can allow that to continue to work whilst blocking to the other newly created windows. Task-number: QTBUG-63846 Change-Id: I7c7f365f30fcf5f04f50dc1a7fff7a09e6e5ed6c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QWindowPrivate::globalPosition(): Take embedded windows into accountFriedemann Kleint2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformWindow::mapToGlobal() should also be used in case a window is embedded. Task-number: QTBUG-64116 Change-Id: I1fbdf3d185659d0faea13a593db901e36ab27d8d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Fix spelling issues in qhighdpiscaling.cppTor Arne Vestbø2017-11-131-3/+3
| | | | | | | | | | | | | | | Change-Id: I4ca5a2e79ff88a664505273d2a9f38b1b499076c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-061-4/+4
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| | * | Fix GCC -Wfloat-conversion warnings (available since GCC 4.9)Thiago Macieira2017-10-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning used to be part of -Wconversion, but that generates too more noise than we're willing to fix now (like conversion from qint64 to int). The float conversion does trigger for conversion from double to float, as shown in all the QVectorND uses of float, but more importantly, it triggers on passing floats to ints. Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | mouse handling: fix issue when mixing QTest::mouse* APIsGatis Paeglis2017-11-051-6/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that become apparent after switching qtestlib to use enhanced mouse event (a37785ec7638e7485112b87dd7e767881fecc114). With the old code path, where QGuiApplication was deducing event type it would deduce mouse release event even when there wasn't one. The new code path doesn't do that, which revealed an obscure problem when mixing QTest::mouse* APIs (where QWindow overload goes through QWindowSystemInterface API and QWidget overload goes through QApplication::notify() and sets mouse_buttons from there). What happened in this specific test case "./tst_qtreeview selection statusTip" was: // tst_QTreeView::selection sets mouse_buttons = Qt::LeftButton from QApplication::notify QTest::mousePress(widget, Qt::LeftButton, ..) // tst_QTreeView::statusTip QTest::mouseMove(window, ) The old code path sees that position and state has changed, creates a fake mouse event, which gets deduced as mouse release even if there wasn't one. And by luck this happened to set mouse_buttons=Qt::NoButton. So when we use mouse_buttons later to create QMouseEvent everything works as expected. With the enhanced mouse we don't clear the pressed button from mouse_buttons (set in tst_QTreeView::selection) as this is done only from press/release events, then pass it to QMouseEvent and later because of that QApplicationPrivate:: pickMouseReceiver() returns nullptr. The fix here is to use e->buttons when constructing QMouseEvent, instead of relying on mouse_buttons which gets changed from various places and has other issues that can not be solved without invalidating the current documentation of QGuiApplication::mouseButtons() (e.g QTBUG-33161). Tests and any Qt code in general should avoid using the fragile QGuiApplication::mouseButtons() API. This patch does not affect the old code path (it continues working as before) and fixes the issue described above for the enhanced mouse API. The enhanced mouse API actually is better in a way that it does not get affected by button state from test functions that run earlier, as opposed to the old code path where every subsequent test function uses mouse_buttons in whatever state it was left by the test functions that run earlier. Not relying on mouse_buttons when creating QMouseEvent helped also to discover other logic error. This caused an in incorrect button state for a mouse move event that is generated for a release event that simultaneously changes a mouse position. Task-number: QTBUG-64043 Change-Id: I6ad8e49d8437ab0858180c2d0d45694f3b3c2d60 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-242-4/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-231-0/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | * QTabletEvent: Add doc note about Windows driversFriedemann Kleint2017-10-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent drivers no longer contain wintab32.dll, point out a version that still has it. Change-Id: I4125a0af3c11ab739f8006b91f58899aeed54458 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Fix implementation of spell check underline stylesDmitry Shachnev2017-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextCharFormat documentation said that the used style is based on QStyle::SH_SpellCheckUnderlineStyle style hint, however in fact the implementation (drawTextItemDecoration in qpainter.cpp) uses themeHint(QPlatformTheme::SpellCheckUnderlineStyle) instead since Qt 5 (see commit 1f9ae50457a3750f). Make the documentation match that behavior, and update QPlatformTheme to use the correct default value. Also, switch Cocoa theme to use DotLine, as that is what native macOS applications use. Change-Id: I2a6bb3da6c7b0686dca87ed2c251b6abc006123c Task-number: QTBUG-50499 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | QNativeGestureEvent: Fix qdoc warningFriedemann Kleint2017-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the parameter back to 'device', fixing: src/gui/kernel/qevent.cpp:2776: warning: Undocumented parameter 'dev' in QNativeGestureEvent::QNativeGestureEvent() Amends 36af37c99c13244cac54313d38af183ef40133f5. Change-Id: I2a3f016dd6a5dda784dc851a052cb5aa1841a472 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-161-1/+1
| |\| | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | * Fix typo in QKeyEvent docsFlorian Bruhin2017-10-101-1/+1
| | | | | | | | | | | | | | | Change-Id: I926fc94ae039f03c507149a6d3fc66f4584201e2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>