summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Fix build without features.highdpiTasuku Suzuki2021-04-141-3/+11
| | | | | | | Add four template functions missing in stub. Change-Id: I7ca126f866a76efc26167340ff2e35a60775078b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix GLX on non-linux X11 systemsNiclas Rosenvik2021-04-112-3/+3
| | | | | | | | | | | | | Some parts of the GLX code is only enabled for Linux. This makes builds on other X11 supported platforms break when GLX is found. To fix this enable these parts of the code when Qt feature xcb-glx-plugin is enabled. xcb-glx-plugin has to be made public in order for QT_CONFIG(xcb_glx_plugin) to work correctly in these parts of the code. Change-Id: I6bf78b6a64787ed88c8e2fae40675244c9198c37 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Set QGuiApplicationPrivate variables after platform window is destroyedAndy Shaw2021-04-081-11/+11
| | | | | | | | | | | | | By setting these variables after the platform window has been destroyed, it will enable any platform specific code to handle changes in terms of focus and so on before the destruction of the window changes these directly. For example, this will prevent a problem with iOS where it keeps track of the current focus object as the signal indicating that the change to focus will still be emitted. This is before the variable is set to nullptr if there is no parent window. Change-Id: Ie540c10760d06dc62e163ccf6f6edea200b43bbf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Fix return type of QCursor::shape()Sze Howe Koh2021-04-021-3/+2
| | | | | | | | | QCursor::shape() returned an int in Qt 3 but returned Qt::CursorShape since Qt 4. Change-Id: I6da9da9bed35c09943a074e7e3a618bce7797ceb Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Account for multiple screens when computing QSizeGrip available geometryZhang Hao2021-03-242-1/+8
| | | | | | | | | | | | | In a multi-screen setup, when the window was resized on one of the screens, the resize was limited to the available geometry of the screen the window was on. Fix this by using the whole virtual geometry of all the screens as basis for the resize. Fixes: QTBUG-91714 Change-Id: I28dd241d73f6a68550af88e368f0dbdcb9ebf42b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove QWindowSystemInterface::handleGestureEventWithSequenceIdAndValue()Shawn Rutledge2021-03-232-13/+0
| | | | | | | | | This was added in fbfc8ffbf39e2e7a540d4d576ec61bea7db63416 but left unused in Qt 5; and we don't anticipate needing it now either. Change-Id: I3d1f1301c8896df04255ebef5bacb5c5027dc7ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Povilas Kanapickas <povilas@radix.lt>
* Merge "Round physical dpi when calculating scale factor"Morten Johan Sørvig2021-03-161-1/+1
|\
| * Round physical dpi when calculating scale factorMorten Johan Sørvig2021-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (For the QT_USE_PHYSICAL_DPI use case) The physical DPI is nominally computed from the physical screen size, however when QT_USE_PHYSICAL_DPI is set that size has typically been overridden with a fake size by the user, such that the resulting DPI calculation will yield some specific integer DPI. Round this DPI value in order to arrive at a nice scale factor, e.g. 144/96 = 1.5 instead of 144.01/96 = 1.5001 Change-Id: I665394e98a818b3a8f46408f3193cac4411f458d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Doc: Fix various documentation issuesTopi Reinio2021-03-161-0/+6
|/ | | | | | | | | | - Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Don’t store screen scale factors in GLOBAL_STATICMorten Johan Sørvig2021-03-152-8/+6
| | | | | | | | | | | | | Use a normal static variable, like the other high-dpi variables. Clear the stored factors in initHighDpiScaling(). This makes auto-testing possible where the application object is recreated for each test case and should start with a clean slate. Change-Id: I1831c856b5d7a2c522e62c7ed0657da771c3144f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Read high-dpi env. variables in initHighDpiScaling()Morten Johan Sørvig2021-03-152-97/+117
| | | | | | | | | | | | | | | | | | | Move all environment access to initHighDpiScaling(), which makes it so that all environment access happens at one point in time during QGuiApplication construction. Replace the “qt.scaling” logging category with “qt.highdpi”, and log each recognized env. variable. Further logging of DPI and computed scale factors will be introduced later on. This also enables auto-testing of the environment variable settings, since the auto-test can now control when the environment is read by (re-)creating the application object. Change-Id: I4e62a9c0050438357a58ace5b50fb7c5950c87ce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge "Support EGL protected content extension"Elvis Lee2021-03-092-1/+11
|\
| * Support EGL protected content extensionElvis Lee2021-03-092-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A protected context is required to allow the GPU to operate on protected resources, including protected surfaces and protected EGLImages. For example, GPU can post-process on protected content like DRM protected content so that complex, nonlinear video effects or mapping onto textures can be used. The surface format option may be relevant for DirectX and Vulkan in the future: https://microsoft.github.io/DirectX-Specs/d3d/ProtectedResources.html https://www.khronos.org/registry/vulkan/specs/1.1-khr-extensions/html/chap12.html#memory-protected-memory Change-Id: I2d155f0e68b830276690b4833b22a2bc452cdcad Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | wayland: Remove bogus warning about ignoring WAYLAND_DISPLAYEskil Abrahamsen Blomfeldt2021-03-091-7/+18
|/ | | | | | | | | | | | | | | | | | On Gnome, we will not default to Wayland at the moment, even if the desktop is run in Wayland mode. In this case, we warn users that they can still select Wayland manually using QT_QPA_PLATFORM. Problem was: We never checked if they had actually explicitly selected Wayland, so even in the cases where we would end up using that QPA plugin, people would still see the warning. This moves the check to the end of the platform selection algorithm, after we have collected all the information. Pick-to: 6.0 6.1 Change-Id: I0d734bd0782c5e58d6dc63f69b7d531a479ad942 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* High-DPI: Set the minimum scale factor to 1Morten Johan Sørvig2021-03-021-5/+3
| | | | | | | | | | | | | | | Avoid painting errors with dpr < 1, also for the PassThrough mode. This limits the minimum high-dpi scale factor to 1, for the code path which determines the scale factor based on screen DPI. Pick-to: 6.1 Task-number: QTBUG-89948 Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Assert that either both or neither pointer are nullptrVolker Hilsheimer2021-02-241-0/+2
| | | | | | | | | | Identical change to qmetatype.cpp Fixes static analyzer warning 0267bc9b3ba521cf8bf0a7fea8981ee5 Pick-to: 6.1 Change-Id: Id6219f5025d703dd43b1742a067aa934d6aacd8c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix handling of virtual/native pixels in QAndroidPlatformWindowAndreas Buhr2021-02-231-15/+22
| | | | | | | | | | | | f92e1953699b2529cc6ea2fd399fe4f2b887e83c made sure a new QAndroidPlatformWindow always has a geometry. However, it did not take into account HiDPI handling. This patch fixes it and introduces proper HiDPI handling. Pick-to: 5.15 6.0 6.1 Fixes: QTBUG-91161 Change-Id: Iddf31b7abfd0a1bada3b051ed4de3bf6c2897d8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QAbstractFileIconProvider: Use platform theme iconsFriedemann Kleint2021-02-211-0/+3
| | | | | | | | Add code paths to use platform theme icons should icon themes fail. Task-number: QTBUG-66177 Change-Id: I9554637f5230b1f57faaeef6b2c04cf082271edb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Initialize some uninitialized member variablesHe MingYang2021-02-201-7/+9
| | | | | Change-Id: Ia8e06850a2288f40906602adfbe40abb0faf8057 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix Wacom Art Pen detection on xcbShawn Rutledge2021-02-122-3/+8
| | | | | | Fixes: QTBUG-91102 Change-Id: I6cd7af26153457609c1fa8fb0a9e167939d592fc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QGuiApplication: use global position to create local position for synthetic ↵Richard Moe Gustavsen2021-02-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | mouse events When QWidgetWindow handles a QTouchEvent, it will call updateTouchPointsForWidget() for each widget it tries to deliver the touch event to. This will make sure that the point's position() is updated to be local to the widget being processed. The problem is that we never reset this overwriting of local positions in the event after we're done. So if we later try to synthesize a mouse event from it, the local position in the fake mouse event will be based on the local position inside a random widget, and not the original local position sent from QPA. Rather than trying to store all the original local positions inside the event before going through this delivery logic, and reset it afterwards, we base the local position of the synthesized mouse event on the (unmodified) global position instead. Fixes: QTBUG-90033 Change-Id: I1588351482de7cce9c06d102db3686ea8dd0c118 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Improve and expand QShortcutMap debug outputMitch Curtis2021-02-031-4/+8
| | | | | | | | | | - Replace vague symbols with descriptive words. - Use qScopeGuard() to ensure that removeShortcut prints the number of removed shortcuts for all execution paths. Change-Id: I4d36366445756b41b1dc40bbb1e987dce669a723 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make setSelectionOnFocusObject() take native pixelsMorten Sørvig2021-02-021-5/+9
| | | | | | | | | | | | Change the setSelectionOnFocusObject() to take geometry arguments in native pixels, in order to be consistent with other QPlatformInputContext API. Calling code which pass non-native geometry must be updated (in practice only the Android platform plugin). Change-Id: I1c61b8cf583afe607567d6056ca7ff23cc3de3f3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add geometry accessors to QPlatformInputContextMorten Johan Sørvig2021-02-012-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | Currently the platform plugins use the public QInputMethod API when querying geometry. However, QInputMethod returns geometry in device independent pixels, while the platform plugins require geometry in native pixels. Add new API to QPlatformInputContext which returns input geometry in the native window coordinate system: QRectF inputItemRectangle() QRectF inputItemClipRectangle() QRectF cursorRectangle() QRectF anchorRectangle() QRectF keyboardRectangle() These make the relevant QHighDpi calls internally, and such calls can then be moved out of the platform plugins. Disambiguate inputItemRectangle() in qandroidinputcontext.cpp by renaming it to screenInputItemRectangle(). Change-Id: I561745b64fb197d64e3dfddcf0751528bb8d0605 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't forward-declare non-Qt things with QT_FORWARD_DECLARE_*Mårten Nordheim2021-01-261-1/+1
| | | | | | | As it breaks in namespace builds Change-Id: I1a278330eeea6b2b89c8a57c0df828dff94ebf7a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QPlatformScreen::colorSpace()Allan Sandfeld Jensen2021-01-251-0/+2
| | | | | | | | Added for macOS and X11 screens Task-number: QTBUG-90535 Change-Id: Ifafe7a07ee2abc3c42cd12785db2d7329878375b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Handle keyboard events when using an external keyboardAndy Shaw2021-01-202-1/+43
| | | | | | | | | | | | | | | | | | This enables the two possible approaches for handling external keyboard events. While support still exists for before 13.4 then both approaches are needed. This ensures that all external keyboard events are handled as key events and passed on accordingly. Additionally, this accounts for possible shortcuts too, therefore a new function is added to QShortcutMap to aid that. As a result, code has now moved from QCocoaKeyMapper to be part of the gui/platforms/darwin part to make it easier to reuse this code elsewhere. Fixes: QTBUG-85727 Change-Id: I349af43468b03fd8dcb16adba02669974affe154 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinatesShawn Rutledge2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | QGuiApplicationPrivate::processMouseEvent() sends a QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled. A QPA TouchEvent always contains native touch points, which is why it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to translate the QMouseEvent's device-independent position back to the raw position that it would have had if it came from a real touchscreen. Therefore we must give that function touchpoints that are actually in native coordinates. It may be that some of this transformation could be avoided entirely, but here we prove that the existing way works correctly, by adding coordinate checking to the tst_QWindow::mouseToTouchTranslation() test. Pick-to: 6.0 Task-number: QTBUG-86165 Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-191/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add a platform capability indicating support for QRhi-based renderingLaszlo Agocs2021-01-042-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attempts to reconcile a minor difference between Qt 5 and Qt 6: Running Qt Quick applications with a platform plugin such as vnc, led to an automatic fallback to the 'software' backend based on the OpenGL capability reported from the platform plugin. In Qt 6.0 this logic is gone from Qt Quick, because we do not have, and wish not to have, individual flags for each and every 3D API on this level. Therefore in Qt 6.0 a Qt Quick application running with the vnc (or linuxfb, or minimal) platform needs an explicit selection of the software backend via QT_QUICK_BACKEND or QQuickWindow::setGraphicsApi(). To keep migration for users of such platform plugins easier, we can still reintroduce a Qt 5-like logic: by having a high level Is-QRhi-Supported type of flag, we can make Qt Quick query that, and trigger the fallback to the software backend when it is reported as false by the platform plugin. As this is the minority case and a conscious choice by platform plugins, the flag can be opt-out (i.e. true by the default hasCapability implementation). When it comes to the existing OpenGL flag, that needs to stay for compatibility reasons, but it is worth noting that the new flag semantically falls in the exact same category: it does not indicate things will really work at run time, but rather serves as an opt-out, "do not even try" type of declaration the platform plugin can make, which then allows modules like Qt Quick to make early, upfront decisions about which rendering paths/backends to take. Change-Id: I8d6fddeb82ca6eece7b7abc1a5b64ebe6d8af29d Task-number: QTBUG-89561 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* State in docs that the BufferQueueingOpenGL cap is deprecatedLaszlo Agocs2021-01-041-2/+2
| | | | | | | | | | There are no queries for this (somewhat dubious) flag in practice. Its usage in Qt Quick is gone since 2014 after 0129887195c7255f41515f72ceb213a38b98f72d. Change-Id: I4fd9cef2705ce13b79ff1dc40a6eda7ce2035e30 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add a dedicated QWindow surface type for D3DLaszlo Agocs2021-01-042-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though there is no D3D-specific logic in the windows platform plugin, meaning a QWindow with either OpenGLSurface or VulkanSurface (or anything really) is DXGI/D3D-compatible, it now looks like it is beneficial, and more future proof, if there is a dedicated surface type. As the linked report shows, there are OpenGL-specific workarounds accumulated in the platform plugin, while not being clear if these are relevant to non-OpenGL content, or if they are relevant at all still. (and some of these can be difficult/impossible to retest and verify in practice) When D3D-based windows use the same surface type, all these are active for those windows as well, while Vulkan-based windows have their own type and so some of these old workarounds are not active for those. To reduce confusion, having a dedicated surface type for D3D as well allows the logic to skip the old OpenGL workarounds, giving us (and users) a more clear overall behavior when it comes to OpenGL vs. Vulkan vs. D3D. The change is compatible with any existing code in other modules because any code that uses OpenGLSurface for D3D will continue to work, using the new type can be introduced incrementally. Task-number: QTBUG-89715 Change-Id: Ieba86a580bf5a3636730952184dc3a3ab7669b26 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update QPalette() documentation to not mention the application paletteTor Arne Vestbø2021-01-041-1/+4
| | | | | | | | | | | | | | | | | | It's an implementation detail that the default constructed palette happens to use the d-pointer of the application palette, and as a result has the same colors as the application palette if requested. The palette has an empty resolve mask, and hence all the colors in the palette are undefined. Users should not rely on QPalette() to represent the application palette when for example overriding a parent palette. Task-number: QTBUG-85226 Pick-to: 6.0 5.15 Change-Id: Ia6747887eef6e9a5f21b2002066608c433260de2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clarify QWindowPrivate::maybeQuitOnLastWindowClosedTor Arne Vestbø2020-12-171-3/+3
| | | | | | | | | | | | | We only need to check QGuiApplication::quitOnLastWindowClosed() at the point where we've actually concluded that the last window was closed. Checking for !q->parent() was redundant, as we were already exiting early when !q->isTopLevel(). Pick-to: 6.0 5.15 Change-Id: I934e186d707361b31d19692c04d2e17b7ba0f49e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* xcb: report wheel events from the correct device instanceShawn Rutledge2020-12-152-0/+21
| | | | | | | | | | | | | | | | | Until now, all wheel events came from one "core pointer". It's useful in Qt Quick to tell the devices apart, because some support smooth scrolling and some don't. Also remove the QHash storing legacy ScrollingDevice structs, and use a subclass of QPointingDevicePrivate instead. Task-number: QTBUG-46412 Task-number: QTBUG-72167 Task-number: QTBUG-69433 Change-Id: Ie6a3d8dd494f981e8706b9a66a1021dfb51baec4 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the deprecated m_logicalDpi declarationWeng Xuetian2020-12-081-1/+0
| | | | | Change-Id: I8d9d59f010874e5a45084afcf55640078d5eba24 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* doc: Remove dpiawareness command line argumentTor Arne Vestbø2020-12-041-2/+0
| | | | | | | | | We don't want to (officially) expose customizations like this to the user, now that high-DPI is always enabled and should work. Change-Id: I2f0bd7c625b565896b0766586f191ff5001eb60a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QInputDevice: Parent default keyboard to core app singletonFabian Kosmale2020-12-041-1/+1
| | | | | | | | | | | With this we can avoid leaking the QInputDevice which is created when the platform plugin does not provide any. The onwership is solved in a similar way as in the plugins, except that here we have no parent which really fits, so we use QCoreApplication::instance instead. Pick-to: 6.0 Change-Id: I77a212fb592ba3d5a42b2ecd486763e3b4d3410e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make qDebug output for QTabletEvent similar to that for QMouseEventShawn Rutledge2020-12-041-10/+7
| | | | | | | | | | | | | | | | | | Reuse operator<<(QPointingDevice*) and move the button state right after the event type. Now it's easier to follow when a QTabletEvent is not accepted and a mouse event is synthesized: qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering QTabletEvent(TabletPress LeftButton pos=100,100 z=3 xTilt=25 yTilt=35 pressure=0.5 dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2)) qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering QMouseEvent(MouseButtonPress LeftButton pos=100,100 scn=100,100 gbl=3739,1029 dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2)) Change-Id: If22f1c07d32f595d0444513b49635218c08a300d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QGuiApplicationPrivate::m_fakeTouchDeviceShawn Rutledge2020-12-031-1/+0
| | | | | | | It is no longer in use. Change-Id: I810a79c81fe49d855b31e992bf000166247791a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: plaster more and more [[nodiscard]]Giuseppe D'Angelo2020-12-031-2/+1
| | | | | | | The situation was quite inconsistent. Use the attribute more. Change-Id: If21817b4c2ea1148ad4ad80e7a50fab721a58b65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix links to Application ExampleVolker Hilsheimer2020-12-021-1/+1
| | | | | | | | | | The example was renamed in 6cb36d825d365988ea7a601218bdd3a329290469. Pick-to: 6.0 Change-Id: Ic9daac60002c9988dfeb5c7dcde74edb69388f37 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix documentation links to High DPI documentationAndreas Buhr2020-12-011-1/+1
| | | | | | | | | | | The documentation on High DPI was recently rewritten, renaming several sections. This patch fixes the links which were broken by this change. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I5e9417554270a6740986d7cec5e3433d043e5560 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-304-5/+5
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Update setHighDpiScaleFactorRoundingPolicy docsTor Arne Vestbø2020-11-271-6/+3
| | | | | | | | | | | The default is now passthrough. And let's not mention the environment variable overrides, as they are meant for internal testing. Pick-to: 6.0 Pick-to: 6.0.0 Change-Id: Ie2409e5411d4bdcdf041834cb5ca9e1215aa173a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA: Pass device for synthesized touch/tablet eventsFriedemann Kleint2020-11-272-0/+33
| | | | | | | | | | | Add the overloads for mouse events with device/without timestamp and pass the active tablet or touch device. Task-number: QTBUG-88678 Task-number: QTBUG-46412 Pick-to: 6.0 Change-Id: I8695b493540d0cbf50e9c72afe870a7633de3ab9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Output source in debug operator of QMouseEventFriedemann Kleint2020-11-251-0/+4
| | | | | | | | Task-number: QTBUG-88678 Task-number: QTBUG-46412 Pick-to: 6.0 Change-Id: If9282f5b845ef16ff7e7ce523f78e3b8adfbef90 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Return subclass type from overrides of QEvent::cloneVolker Hilsheimer2020-11-231-34/+34
| | | | | | | | | | C++ allows overrides to return a covariant type, so if calling code has already cast the callee down to the right type, don't require it to cast the returned clone down as well. Pick-to: 6.0 6.0.0 Change-Id: I802f00a3c78e03047046986d0ed0a479b47573b8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QGuiAppPriv: don't clear target and window for TouchCancelShawn Rutledge2020-11-211-2/+0
| | | | | | | | | | | | | It's nice not to leave garbage in QPointingDevicePrivate::activePoints between events; on the other hand, this garbage doesn't matter, because every press event sets the target and window independently, without caring what was stored there from before. But it was wrong to clear it before we've even delivered the TouchCancel event. Pick-to: 6.0 Pick-to: 6.0.0 Change-Id: I924039a7c7a8ed75f420d1837c63dc19d3cc98b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation warnings for Qt GUITopi Reinio2020-11-193-5/+4
| | | | | | | | | | | | | | | - Remove obsolete dependencies and references. - Restore previously deleted snippet code referenced in richtext.qdoc. - Add widgets snippets path to exampledirs; some classes were moved from QtWidgets to QtGUI and related \snippet commands were broken. - Mark internal functions under QNativeInterface::Private as \internal. Task-number: QTBUG-86295 Change-Id: I9c165c860c7191dac65972d702698a1745bff77f Reviewed-by: Paul Wicking <paul.wicking@qt.io>