summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Fix crashes when using screen reader with Q(Plain)TextEditFriedemann Kleint2021-01-121-2/+6
| | | | | | | | | Make sure the search start with valid values. Pick-to: 6.0 5.15 Task-number: QTBUG-89354 Change-Id: I5b5100db89c62f23748b5c88e9188cfe3811e6e8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QSql/QSqlite: return extended error codes by defaultChristian Ehrlicher2021-01-111-0/+4
| | | | | | | | | | | | | SQlite allows to return fine-granulated error codes but this behavior is not enabled by default (due to backwards compatibility concerns). Enable them for the SQLite driver by default but provide an option to disable them when needed. [ChangeLog][QtSql][QSQLITE] The plugin now returns the extended error codes by default. Change-Id: I59cec9aea46eb03f1e7ca02903d769c003a1ae30 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for ↵Morten Johan Sørvig2021-01-111-3/+2
| | | | | | | | | | | | | | | | | | | full update only" This reverts commit a81dfb32d6f9e7a407567511c20b59e537f6a063. Paint immediately on WM_PAINT in all cases in order to avoid flicker on resize. The cases mentioned in commit a81dfb should no longer apply: - QTBUG-38327: QGLWidget is not supported in Qt 6. - QTBUG-39842: Fixed by using ExcludeUserInputEvents. Fixes: QTBUG-89688 Change-Id: If82cf7703d6663982769048e86a7060223730ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Bump versionPaul Wicking2021-01-111-1/+1
| | | | | | | | | CMake edition. Also update default compiled version. Task-number: QTQAINFRA-4126 Change-Id: Ia6f535f553e73bd6b00e2e20752f4961af21ede5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Sql ODBC driver: add direct support for float and short datatypeChristian Ehrlicher2021-01-101-4/+49
| | | | | | | | | | | | | This patch adds native support for SQL_REAL (float) and SQL_SMALLINT (short). Previously those datatypes were mapped to double and integer. [ChangeLog][QtSql] The ODBC driver now properly maps QMetaType::Float to real sql datatype and QMetaType::Short to smallint Fixes: QTBUG-8963 Fixes: QTBUG-57279 Change-Id: Ifec4c609734dbe6165c1ebdadb461c2aae47ba78 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Send Qt::Key_MediaTogglePlayPause for VK_MEDIA_PLAY_PAUSEAllan Sandfeld Jensen2021-01-081-1/+2
| | | | | | | | | | Speculative fix to get the right keys in WebEngine Pick-to: 6.0 5.15 Fixes: QTBUG-89915 Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix missing QScreen change updatesFriedemann Kleint2021-01-083-29/+2
| | | | | | | | | | Remove the logic compressing WM_DISPLAYCHANGE signals by the WParam/LParam since it also triggers when the geometry is changed by rearranging screens. Fixes: QTBUG-79442 Change-Id: I00042c9e687bdb67fc17d6c507818b79a7aee0a2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0787-2325/+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>
* Windows QPA: Lookup DISPLAYCONFIG data for monitorsAllan Sandfeld Jensen2021-01-071-2/+94
| | | | | | | Gives more accurate orientation and refresh-rate. Change-Id: I90b0b7563efc35c9bace07ccb3996350a957e8e5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Clean up code that handle clipboard image conversion on WindowsCamille Viot2021-01-061-126/+14
| | | | | | | | | | | | | | This commit remove old legacy code that try to deal with clipboard image conversion in the qwindowsmime class. It now uses qbmphandler under the hood which is much more complete. It also add a small fix for the conversion of BI_RGB clipboard image with an explicit alpha layer (which Firefox use on Windows). Change-Id: Iae026378831799dc676e1aba7d5bd6a0d1c01e7f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add a platform capability indicating support for QRhi-based renderingLaszlo Agocs2021-01-045-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add a dedicated QWindow surface type for D3DLaszlo Agocs2021-01-042-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Fix error and print summary for standalone building sqldriversLi Xinwei2021-01-041-0/+7
| | | | | | | | | | | qt_plugins target is needed by qt_internal_add_plugin function, but when standalone building sqldrivers, this target does not exist, which causes configure error. So we need to add this target manually. Fixes: QTBUG-89714 Pick-to: 6.0 Change-Id: Ia7d613faabb82399c2f3e5771aab24302b3c8f56 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* xcb: document QXcbEventQueue::PeekOption enumGatis Paeglis2021-01-012-8/+23
| | | | | | | | And renamed PeekRemove* to PeekConsumed to document better that nodes are not removed when peeking. Change-Id: I7349f57fcfc3287d1a1309a31ee7f481f8d18755 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* fix potential mem leak on connection lostMatthias Möller2020-12-301-15/+12
| | | | | | | | | | | | | | | The PostgreSQL driver can change it's connection status after the first established connection. In this case, the function "isOpen()" returns false and the "close()" function would not free all resources. With this fix, the "close()" function always frees any allocated resource independent of the connection status. Fixes: QTBUG-88984 Pick-to: 6.0 5.15 5.12 Change-Id: I7c9add6a183bf46a8573952ab39f8cb1f728c00c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* eglfs: Enable building the fbdev-based Mali backendLaszlo Agocs2020-12-282-1/+27
| | | | | | | | | The configure tests are all in place for CMake as well, and this one has no special library depdendencies. Generate the CMakeLists and remove the special case. Change-Id: I55817045f9e259515fb3aad33d1446d9413111d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Handle XCB_INPUT_DEVICE_TYPE_MASTER_POINTER properlyPaul Olav Tvete2020-12-252-4/+9
| | | | | | | | Make sure we use the new QXcbScrollingDevice class for the "core pointer" as well. Change-Id: I97575e8125cbb2aa280662aa675e61021c21ea59 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Adjust the format of code blocks in handleScreenChange functionLu Zhen2020-12-251-1/+1
| | | | | Change-Id: I5da777e2196c005d6d5402c254a9452c3a888036 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix out-of-bounds writePaul Olav Tvete2020-12-233-24/+33
| | | | | | | | | | | | | Change ac210c73e4 introduced the requirement that all input devices with Scroll capability must have a QXcbScrollingDevicePrivate as their d_ptr. However, this was not enforced, and would fail for the "Virtual core pointer". To fix this, always use qobject_cast to verify that the device is of the correct type. Change-Id: I4a6b1d4d79308eb04e9f52dda00294fffe377bdf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* offscreen: always create a valid QPlatformIntegrationMorten Johan Sørvig2020-12-211-2/+3
| | | | | | | | | | | | | Commit f4a66e5c accidentally made it so that the offscreen plugin would produce a null QPlatformIntegration on X11 if QT_QPA_OFFSCREEN_NO_GLX is set. Restore previous logic where the generic QOffscreenIntegration is created if the X11 code path did not create an object. Change-Id: Ic71fb04bbd824f4121480dbaf8fa0571ebb39f42 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* sqlite: Replace NULL by nullptrFriedemann Kleint2020-12-211-6/+7
| | | | | Change-Id: I8e845ae093a68d2d7ecf0e358a2316a54d0f2144 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* sqlite: Fix MSVC integer conversion warningsFriedemann Kleint2020-12-211-6/+11
| | | | | Change-Id: I58ab6a8d7787abce5b0f73562eb53f40e39c8186 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make QPushButton on macOS use QFocusFrame to fix alignment problemsDoris Verria2020-12-211-33/+93
| | | | | | | | | | | | | | Alignment problems occur for pushbuttons because they appear smaller then their actual widget geometry, which is used for their alignment in layouts. To fix, shift the pushbutton's rect to the left, adjust SE_PushButtonLayoutItem accordingly and use QFocusFrame to render the focus frame ring outside the widget's paintable area. Fixes: QTBUG-89133 Fixes: QTBUG-81452 Pick-to: 5.15 6.0 Change-Id: Iee885a4fb3674d966e5ff3b5c04a0845521b2d72 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: KEYCODE_MEDIA_PLAY_PAUSE translated rightPiotr Mikolajczyk2020-12-211-1/+1
| | | | | | | | | | KEYCODE_MEDIA_PLAY_PAUSE was incorrectly translated to Qt.Key_MediaPlay. This patch changes it to Qt.Key_MediaTogglePlayPause. Fixes: QTBUG-66448 Pick-to: 5.15 5.12 6.0 Change-Id: Icd2747857bc479228bfdffcd8ab8fdef7b79e918 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* xcb: fix thread synchronization in QXcbEventQueue::waitForNewEvents() againIgor Kushnir2020-12-183-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends a41701904e880f58e19b352ade1931d6cd1a7112 If peeking into the event queue looking for a clipboard event fails, QXcbClipboard::waitForClipboardEvent() calls queue->peek for the second time to "process other clipboard events, since someone is probably requesting data from us". QXcbEventQueue::peek() in turn calls QXcbEventQueue::flushBufferedEvents(). This second flushing can acquire a waited-for clipboard event. The issue was that the code in waitForNewEvents() ignored this possibility and assumed that there were no clipboard events before or at its current m_flushedTail. If there were no more events on the X11 connection after tailBeforeFlush, the waitForNewEvents() in waitForClipboardEvent() blocked execution for 5 seconds and eventually timed out. The fix is to remember QXcbEventQueue::m_flushedTail just after looking for and not finding a clipboard event in the queue. And then wait for more events via QWaitCondition in waitForNewEvents() only if there were no more events after the remembered m_flushedTail. Fixes: QTBUG-75319 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I4919c5b9b9227b3a8a29a11e7094f97960b3a121 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Android: Fix for accessibility potential crashPiotr Mikolajczyk2020-12-181-1/+1
| | | | | | | | | When accessibility was not active it was possible to force its update, causing a null pointer exception in java. Pick-to: 6.0 5.15 Change-Id: I60f65612d6e9f712ba3c591ffcc6803f06f09efb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Fix 'static' conditionsJoerg Bornemann2020-12-171-1/+2
| | | | | | | | | The pro2cmake script doesn't handle static scopes correctly, and the generated "CONDITION static" must read "CONDITION NOT QT_BUILD_SHARED_LIBS". Change-Id: Ic5a5763e9fd5f5d04fb4c12227cbe85fac17b826 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Android: Pass pending state to ResumePauseListenerBartlomiej Moskal2020-12-171-1/+6
| | | | | | | | | | | | | | | | | | | It can happen that updateApplicationState() is called before m_androidPlatformIntegration is set. In such case, new applicationState will be remembered and propagated later. Before this change, pending application state was passed only to QWindowSystemInterface. ResumePauseListeners that are subscribed for changes to ApplicationActive/ApplicationInactive state also should be informed about new application state. Fixes: QTBUG-84737 Pick-to: 6.0 5.15 Change-Id: I67e79860b340ee5de2d13d148a222e9f1c942b93 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* xcb: report wheel events from the correct device instanceShawn Rutledge2020-12-156-91/+235
| | | | | | | | | | | | | | | | | 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>
* xcb: Fix available geometry after rotationAlexander Volkov2020-12-132-5/+10
| | | | | | | | | | | | | | QXcbVirtualDesktop::m_workArea is not updated after screen rotation if _NET_WORKAREA is not updated, e.g. when a window manager is not running. Use width of -1 for m_workArea to indicate that _NET_WORKAREA is not set and thus there is no need to find its intersection with screens' geometries. Pick-to: 5.15 6.0 Change-Id: Ic1f3ec23576ed8407a76cc2b9f84a145c67b1d4b Reviewed-by: Liang Qi <liang.qi@qt.io>
* OCI: Fix the compilation of the pluginAndy Shaw2020-12-131-5/+6
| | | | | | Pick-to: 6.0 Change-Id: I9637bab6cc217d4fd9692f6745b4f14db6ffb259 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QHeaderView: respect the font role while calculating the elided textChristian Ehrlicher2020-12-101-1/+4
| | | | | | | | | | | | | Amends 4d943846128118e1b9932a17ce6f977a0f4127a5: - The macOS style must now elide the text by it's own since it is no longer done by QHeaderView - Add documentation of QStyleOptionHeader::textElideMode - Remove unused variables from QHeaderView::initStyleOptionForIndex() Task-number: QTBUG-86426 Change-Id: I98fc6771c0cd56d6002390125ffbab1269f6dd39 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Fix crash when showing parent-less platform menusTor Arne Vestbø2020-12-091-2/+2
| | | | | | | Pick-to: 6.0 Pick-to: 5.15 Change-Id: I80f02da1621e4088eb040bb16a4db3867b6ad4d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Remove warning about KVO observers on QNSWindow/QNSPanelTor Arne Vestbø2020-12-091-5/+0
| | | | | | | | | | | | | | | | | | NSTitleBarView in Big Sur will observe the window it is in, but makes sure to remove these observers in viewWillMoveToWindow, as it should. To avoid spamming user logs with this warning we remove it. It was dubious what cases it would have caught anyways, as anyone trying to KVO observe properties Z of a child object Y of X.Y would need to track whether X changes its Y between adding and removing the observer. There are no guarantees that Y is stable, and this applies to an NSView's window property as well. Pick-to: 6.0 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I27a0d04625f96c4c5d382c39ac068721ce1e8f9d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Qml accessibility fixesPiotr Mikolajczyk2020-12-085-13/+87
| | | | | | | | | | | | | | | | | | - Accessibility focus can follow the position of the widget (for example when swiping on a scrollview) - controls are clickable directly after appearing on the screen after scroll (previously you had to click somewhere else on the screen, and after that you could focus the newly appeared control) - checkbox and switch react correctly on click action - fixed combobox behavior with accessibility enabled Task-number: QTBUG-79611 Pick-to: 6.0 5.15 Change-Id: If36914ab0165f33593e68fd7ecf168693f8538a7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* wasm/js: fix invalid restartCount referenceAvindra Goolcharan2020-12-081-1/+1
| | | | | | | | | | | | The `restartCount` variable on line 245 is mutating global scope. The PR makes it consistent with the rest ob the code (`self.restartCount`). It was observed when importing the qtloader in a typical Webpack/Babel build environment. Change-Id: I338285f4f6bcb80df0c16d80cc3ebfec944a8be7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix highdpi conversion of QTabletEvent coordinates on xcbShawn Rutledge2020-12-081-4/+2
| | | | | | | | | | | | | | | Amends 1535fc9fb9ddbfce1680979c0634b4fdf8d75fca : when high-dpi scaling is enabled, there was an offset from the cursor position to the event position, because QWindow::mapFromGlobal() works in device-independent pixels, but we are using actual screen pixels here. Pick-to: 6.0 Pick-to: 5.15 Pick-to: 5.12 Task-number: QTBUG-77826 Change-Id: Ic8743b9e5c4041065f530ed1d9d6c49337b0207a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Always allow interacting with popup windows during modal sessionTor Arne Vestbø2020-12-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f4889e63c7b changed the worksWhenModal logic for QNSWindow to be based on the transient parent relationship of the child window to the modal session window, to fix many issues where windows that should be blocked were not. Unfortunately, some window types do not maintain a transient parent relationship (e.g. QCompleter, which is itself just a QObject), or are not common for users to create with a QWidget parent (such as a context QMenu). This change restores part of the special-casing that was removed in f4889e, so that all popup windows are always allowed to be interacted with during modal sessions. This includes popup windows that were opened as part of a parent modal session, which would normally be fully blocked, but we assume that popup windows are intermittent enough that this will not be a problem. For now we leave out the other two special casings from f4889e, namely tool windows and dialogs. The former should in most cases be created with a parent window, while the latter definitely should. Fixes: QTBUG-88188 Fixes: QTBUG-88985 Fixes: QTBUG-87849 Fixes: QTBUG-86845 Pick-to: 6.0 Pick-to: 5.15 Change-Id: I005a402b21e8dc16c3b18bcd7e67d12b94a66f44 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Re-generate project files in srcJoerg Bornemann2020-11-306-7/+25
| | | | | | Pick-to: 6.0 Change-Id: I1f5f822d68129490f1a7c495f718aead0b520ca9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMacStyle - remove vertical adjustment for inactive tabTimur Pocheptsov2020-11-301-2/+0
| | | | | | | | | | While it worked as expected with beta, with final release this thing looks wrong again, especially in the dark mode. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I6857344de897e0f39d9d8e66431635dbe2f4d077 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Let QXcbConnection::getTimestamp properly exit when X server quitsSheng Mao2020-11-301-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | QXcbConnection::getTimestamp uses dummy events to get timestamp from X server. However, in some cases, X server shuts down while client tries to get timestamp. In this case, QXcbConnection::getTimestamp keeps getting null event and thus falls into indefinite loop. This fix checks if xcb connection is still valid and use a special xcb_timestamp_t value, CurrentTime (0L), as returned value. CurrentTime should not be generated by X server and if getTimestamp returns this value, it means an "exception" case is triggered. This fix is introduced because in kwin_x11 (KDE project), X server can exit on logout. kwin_x11 should handle disconnection from X server. But the indefinite loop prevents kwin_x11 to process disconnection event and therefore kwin_x11 cannot quit properly. Fixes: QTBUG-88435 Pick-to: 5.12 5.15 6.0 Change-Id: Iaf7ef3f8a35fa8389d22a608e3c49041bf90e1b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-307-10/+10
| | | | | | | | | | | | | | 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>
* Windows QPA: Pass device for synthesized touch/tablet eventsFriedemann Kleint2020-11-274-12/+41
| | | | | | | | | | | 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>
* Reduce the scope of variables in exec() and fetchNext()Zou Ya2020-11-262-7/+3
| | | | | | | | | | | | The scope of the variable 'currBind' can be reduced if the variable 'r' is not 0. So declare the variable when the variable 'r' is 0. The local variable 'i' shadows outer variable in fetchNext(), so move it to the front of switch. Don't declare 'res' until we need and initialize it. Change-Id: Idfb220b96cfbcd4088fd7858ed9392d0a3e10aea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add font function to OffscreenTheme to run unit tests with offscreenAndreas Buhr2020-11-241-0/+14
| | | | | | | | | | | Two unit tests fail at the moment with the offscreen theme because the font function of the offscreen theme does not return a monospace font when asked for a monospace font. This patch fixes it. Change-Id: Id682c75e2a94b246cffe97b342b1b562bac82a68 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Reduce the scope of variables in bindInValues()Huang Jie2020-11-241-4/+3
| | | | | | | | | The scope of the variables 'bind', 'field', 'i' can be reduced if the variable 'meta' is a null pointer. So declare the variables when the variable 'meta' is valid. Change-Id: I599406c034168dd73799c69dfb9c5e676861cdf2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* wasm: fix resizing of qwidget windowsLorn Potter2020-11-232-1/+36
| | | | | | | | | This also fixes the cursor changing during resize mode Fixes: QTBUG-85361 Pick-to: 5.15 Change-Id: Ic85a5c31a8a2dc4265a84f16fd5fcdc231062c6d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix mouse double clickLorn Potter2020-11-232-6/+21
| | | | | | | | | | Two issues here, timestamp value was getting smashed, and MouseButtonDblClick was not getting sent. Fixes: QTBUG-85712 Pick-to: 5.15 Change-Id: I912e968f1eb0fb9c6f4cf8548b114e23d182396e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* CMake: Fix build of plugins/styles/mac using PCHCristian Adam2020-11-201-0/+7
| | | | | | | | | | | | | | If a target inherits precompile headers from a different target that has more languages enabled (CXX, OBJCXX), the target will depend on PCH artifacts for a language that is not actually present. Ammends d9d137c8f39b8aa77b28b12fcb6f1642ca650291 Fixes: QTBUG-88609 Pick-to: 6.0.0 6.0 Change-Id: I9735317e634b62732df0fce84fe7cf229cfdea1b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Propagate device-pixel-ratio of system tray iconTor Arne Vestbø2020-11-201-0/+1
| | | | | | | | | | | | | | | | | When preparing a system tray icon on a system with a retina screen, we end up creating a full-height icon of height 44. If there's also a 1x screen available, macOS will scale down this image for us when presenting the icon on the 1 screen, but the downscale will fail to preserve the aspect ratio of the original image on Big Sur. Telling macOS which device-pixel-ratio the image has seems to fix this, and is the right thing to do in any case. Pick-to: 5.15 Pick-to: 5.12 Fixes: QTBUG-88600 Change-Id: Ic31def94d073da1b256bbfcaf5905f92c169f43d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>