summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Add license headers to cmake filesLucie Gérard2022-08-0378-0/+234
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* eglfs: Fix screen cloning when atomic is enabledLaszlo Agocs2022-08-011-5/+6
| | | | | | | | | | | | The problem was introduced in the atomic code path only, the legacy one has always specified the correct crtc id. Amends 56149c0fbb19946050a3249acef4e86e511d3cd4. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ie3a99ec4bc24901e1303631097a395fde8dbe110 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Use the dead Mac path in QWasmEventTranslator::translateDeadKeyMikolaj Boc2022-08-012-3/+3
| | | | | | | | | The path for is_mac is unused. Use it by querying the platform from the new WASM plugin web platform API. Task-number: QTBUG-105213 Change-Id: I9a8922b5e9d215090dbdcc534c056c2cc068c009 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Windows: Implement dark mode palette and accent color supportVolker Hilsheimer2022-07-292-78/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the WinRT API to read the basic colors, and construct a usable palette from those. None of the Windows.UI.ViewManagement.UISettings APIs returns a full set of usable colors -UIElementColors returns the old system colors, or useless values. And UISettings::GetColorValue only gives access to a basic palette, where e.g. the background color is just black, which doesn't match what Windows itself uses. However, we know if we want to be dark or light, and can construct a palette from the basic colors. The most relevant color to read from the system is the accent color. In the course of doing that, refactor and clean up the code somewhat to standardize the handling, and remove hardcoded color values as much as possible. This is opt-in: unless the application is started with the QPA darkmode parameter set to 2, nothing changes. Pick-to: 6.4 Task-number: QTBUG-72028 Change-Id: If603bb34c8f7478a05aafef2552a67e1e3460d29 Reviewed-by: Marius Kittler <mariuskittler@gmx.de> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Revert "CUPS: Add support for accessible IPP printers"Volker Hilsheimer2022-07-281-5/+2
| | | | | | | | | | This reverts commit 2f5f276b4a2a19b9f2669b84f28ce8e970aaa39f, after which valid printers are no longer listed anymore. Fixes: QTBUG-105242 Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I6a388acff2a8033ad1052319edcf7e41a2f72c8f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Modernize QWasmCompositor::windowAtMikolaj Boc2022-07-281-15/+7
| | | | | | | | Use a well-known idiom for finding a matching window in the window stack (std::find_if) Change-Id: I677ef6ad8ee88bbd9eee1405be592ec2527ca3b9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Remove QWasmCompositedWindow as dead codeMikolaj Boc2022-07-282-71/+19
| | | | | | | | | | | No fields in QWasmCompositedWindow, apart from visible, are used for any computation. They were write-only. Remove the class entirely and create a hash of visibility state instead. Fixes for z-order will follow. Change-Id: Icb7ff1865d1f9a67c0fde43cfa331ca1242ebcaa Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Schannel: remove outdated commentMårten Nordheim2022-07-281-1/+0
| | | | | | | | | It is clearly not temporary anymore, nor is the reference to qsslsocket_winrt useful. Change-Id: If746959ddaf8ee564a62b4d168306c79aa466026 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Deliver non-client area mouse events to WASM windowsMikolaj Boc2022-07-275-26/+78
| | | | | | | | | | QWasmCompositor now delivers non-client area mouse events to windows as it should, which fixes a lot of issues with window manipulation. One of such issues is re-docking of dock widgets. Fixes: QTBUG-105092 Change-Id: I9de45b7e1b1a80b64387031eb0cc0b31a4be2571 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* MySQL plugin: fix escaping a QByteArrayChristian Ehrlicher2022-07-251-1/+1
| | | | | | | | | | | 1df974590f19dec7b632d000ab9408a4de6f117a introduced a regression which kills the escaping of a QByteArray because QString::fromUtf8() gets a wrong length from a QVarLengthArray. Pick-to: 6.4 Fixes: QTBUG-105078 Change-Id: Ic2f76c82c246e1e9eaf1d3f907d11fc345b5655e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Send parent_window handle to desktop portalDavid Redondo2022-07-251-3/+12
| | | | | | | | | | | | | Sending parent_window to the portal allows it/the window manager to better place portal dialogs in respect to the application window, for example on top of it instead of a random position. For this use the focusWindow() (if available) since the API in QDesktopServices does not take a QWindow parameter. The file dialog has an explicit parent that can be used. The introduced virtual is provided as a hook for the wayland platform that already includes a class that inherits from QGenericUnixServices. Change-Id: I5571f08d07e5a4e3ae32efd1f09e2727cec9e7c5 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Improve window dragging on WASMMikolaj Boc2022-07-2513-247/+510
| | | | | | | | | | | | | Window dragging has been considerably improved by replacing the mouse events by pointer events and placing a pointer lock on WASM canvas, so that off-browser window events are delivered to us. Translation of the drag origin has been limited to inside the canvas, so that a window cannot be dragged so far that it becomes offscreen and is unreachable. Change-Id: Id177c630a6466f04464a513371d6b97d3a098b6a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QCursor: add missing QT_DEPRECATED_VERSION_X_6_0 for deprecated methodsIvan Solovev2022-07-213-14/+14
| | | | | | | | | | | | | | | | | When the method is wrapped into if QT_DEPRECATED_SINCE(MAJ, MIN) we also need to add QT_DEPRECATED_VERSION_[X_]_MAJ_MIN macro right in front of the method declaraion, to actually trigger a deprecation warning. This patch does that for QCursor's deprecated methods, and fixes all related compilation warnings in QtBase. Task-number: QTBUG-104857 Pick-to: 6.4 6.3 6.2 Change-Id: Ic8d059e8c852d4b2dee55e7ea94f4fc7a402cdf4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix Wacom proximity on xcb againShawn Rutledge2022-07-201-6/+5
| | | | | | | | | | | | | | Amends 8e506fdd299d2fa18172209bea316f484e234e19 Also remove the lcQpaXInputEvents().isDebugEnabled() check to ensure that the qCDebug output is emitted. It was meant as an optimization, but skipping of printf-style qCDebugs when the logging category is disabled is efficient enough. Pick-to: 6.3 6.4 Fixes: QTBUG-104875 Change-Id: Id8dc710a8fdb596ddce70380a577205fc52df4cc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCommandLinkButton: Let the style set the text colorsVolker Hilsheimer2022-07-191-0/+5
| | | | | | | | | | | | Make the hack less hacky by letting the style polish the widget (it does already for the font) to set a dynamic property that the button can test. Use the available palette entires ButtonText and BrightText to set the dark blue and bright blue colors, rather than hardcoding them in the widget code. Pick-to: 6.4 Change-Id: Idfb3b7d18e456a9d14af4962cf723e12ff1c3370 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Windows: better handling of darkmode supportVolker Hilsheimer2022-07-193-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 43ef22045c6f4fbf76d5cfa4ca32160d919b9984 turned dark mode support on for both styling and window frames. However, the default palette and style support in Qt is too incomplete, resulting in unreadable UIs when using certain styles (e.g. fusion). Also the vista style is not supporting dark mode. If we don't turn on dark style support, then dark frame support doesn't look good either. However, many application developers have implement a dark theme themselves, and we should have a dark frame for those applications. So partially revert 43ef22045c6f4fbf76d5cfa4ca32160d919b9984 so that dark style support is disabled by default, and leave dark frame support on. However, only activate dark frames if the palette is dark, i.e. if the window background color in the default palette is darker than the text color (or if DarkModeStyle is explicitly turned on by running the application with -platform windows:darkmode=2). This way, dark-themed applications get a dark frame on dark Windows, and a light frame on light Windows; and light-themed applications (including default Qt applications) get a light frame all the time. Fixes: QTBUG-72028 Pick-to: 6.4 Change-Id: I61f1b1e43b2a4ba69848d5d8bec921c0790fe511 Reviewed-by: Marius Kittler <mariuskittler@gmx.de> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix losing grip on dragged window on WASMMikolaj Boc2022-07-161-1/+1
| | | | | | | | | | | | | | | | When a window is being dragged, we should not check for the target window's resizability in QWasmCompositor::processMouse as: 1) the target window under the cursor might be different from the dragged window when the pointer is moving quickly 2) we have checked that already when qualifying the window for dragging when handling EMSCRIPTEN_EVENT_MOUSEDOWN at line 1022 Therefore, the condition for target window's resizability has been removed. Change-Id: Ib999d213f1e0a770fa76324fc7bf44c6d4ab806a Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Refactor code focused around QWasmCompositor::processMouseMikolaj Boc2022-07-157-229/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring of the logic around QWasmCompositor::processMouse has been performed for readability and easier modification, in preparation for further fixes for event delivery and handling in windows. There should be no logic changes, just cleaner code. Change groups: Members of QWasmCompositor have been prefixed by m_ for easier discerning of stateful and stateless variables in functions. Variables renamed to more descriptive, e.g. window2->targetWindow, globalPoint->targetPointInScreenCoords. Magic numbers eliminated, e.g. mouseEvent->button == 0 is now button == Qt::MouseButton::LeftButton. Some common condition checks have been wrapped into single constants, e.g. !(htmlWindow->m_windowState & Qt::WindowFullScreen) && !(htmlWindow->m_windowState & Qt::WindowMaximized) == isTargetWindowResizable Some nested if-conditions were collapsed. Some unnecessary checks have been moved to outer if conditions (e.g. for draggedWindow in EMSCRIPTEN_EVENT_MOUSEMOVE, since the code would crash anyway because only some parts are guarded against it being nullptr). Consts introduced so that variables are only used for one purpose. Made QWasmEventTranslator::translateMouseButton constexpr Made QWasmWindow::isPointOnTitle behave correctly when the window has no title bar so that no flag probing is needed prior to calling it. Made QWasmCursor::setOverrideWasmCursor accept a const ref - having it accept pointer suggested it might dangle. Change-Id: I8910622fddad764ee86eb0260b5ad23c7ee7f97a Reviewed-by: David Skoland <david.skoland@qt.io>
* Revert "Windows QPA: Add MSWindowsNoRedirectionBitmap flag"Tor Arne Vestbø2022-07-141-4/+1
| | | | | | | | | | | | This reverts commit 417bb463526d3ec3d80d66b029c1064fde88391f. The API addition was premature, as it can potentially be handled by the platform plugin automatically, and if not, should possibly live in QSurfaceFormat instead. Change-Id: I5c7050ce9c50b6c6a93ddfa6d2e842db0b9eed0d Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* macOS: Distinguish between return and enter when inserting newlinesTor Arne Vestbø2022-07-141-3/+8
| | | | | | | | | | | | | | | | | | | | In most situations the originating key event contains the information we need, but during confirmation of input method composition the text of the event might be "~\r", in which case the logic we have on macOS for generating key events will interpret the key press as a tilde, and we end up inserting "~~" and fail to deliver the return key. We should probably treat NSEvents with characters > 1 as a special case and go via the virtual key map in QAppleKeyMapper, but for now we manually distinguish enter and return by looking at the modifiers. This works for enter key presses both via the key itself, and via Fn+Return. Fixes: QTBUG-104774 Fixes: QTBUG-103473 Pick-to: 6.2 6.3 6.4 Change-Id: I86d30b154867e8e2b6964967ede2bd0dadb83ef8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows QPA: Add MSWindowsNoRedirectionBitmap flagYuhang Zhao2022-07-141-1/+4
| | | | | | | | | | | | This flag will be useful for windows that only use 3D graphics API to do the rendering, such as Qt Quick applications. As a drive-by, fix a typo in the above line. Pick-to: 6.4 Change-Id: Ic6edcb7610055693734a5d5aff5e906991d4b911 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* QXcbConnection::xi2ReportTabletEvent(): get device, check capabilitiesShawn Rutledge2022-07-131-4/+7
| | | | | | | | | | | | | | In Qt 5, RotationStylus was a device type; in Qt 6, we have the Rotation capability flag instead. The event does not tell us whether rotation is valid or not, so to distinguish a valid zero value from a zero that means it's absent, we need to check device capabilities. Anyway it's better to get the QPointingDevice instance earlier and call the newer version of QWindowSystemInterface::handleTabletEvent(). Fixes: QTBUG-104877 Change-Id: I896c02727d586381489f79fd4ebea3451adfa403 Pick-to: 6.2 6.3 6.4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Turn on dark mode support by defaultVolker Hilsheimer2022-07-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation was already there, and handles theme changes at runtime as well. However, it was disabled unless the QPA parameter "darkmode" was set to either 1 (supporting only the frame) or 2 (the Windows theme also supports dark mode when reading the palette). With both Windows 10 and Windows 11 now having dark mode as a fully supported feature that is easily accessible to end-users, we should respect that setting by default. So change the default: support both dark window frames and palette, and let users turn this partially off by setting darkmode=1 or darkmode=0. This does not mean accent colors etc are fully supported by the Windows styles. [ChangeLog][QtGui][Windows] Dark mode, both for the window frames and for the palette, is now supported by default. It can be turned off (partially or entirely) by setting the QPA parameter "darkmode=0" (no dark mode support) or "darkmode=1" (darkmode support only for the window frames). Pick-to: 6.4 Fixes: QTBUG-72028 Change-Id: Ia55af101896c106cde21340b306aa81390e608a2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* CMake: Don't propagate openssl headers for the tls pluginAlexandru Croitor2022-07-111-3/+2
| | | | | | | | | | | | There's no reason to. It's not a Qt module, it's just a plugin and does not expose any public headers. Amends d754e43721e4f40a8dffa8b69ef883ca383a4a61 Pick-to: 6.4 Task-number: QTBUG-96283 Change-Id: Idf56c82025b81fd6614ef7e1efeb015e89c84f93 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* wasm: remove egl header includesMorten Sørvig2022-07-111-4/+0
| | | | | | | | Not in use any more. Change-Id: I4d4e7b5094544c042b5c500417427233d0b316f1 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA: Implement Selection UIA pattern for QTabBarAndré de la Rocha2022-07-083-23/+37
| | | | | | | | | | Adding Selection pattern for tab bars and SelectionItem pattern for tab items, which are required for accessibility compliance. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-104740 Change-Id: I0e3b1cfbf4838d8bc8b5bc2e2d7c9d372ac8b99d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Report the expanded/collapsed state of tree itemsAndré de la Rocha2022-07-081-1/+2
| | | | | | | | | | | Implement the ExpandCollapse UI Automation pattern for tree items, so that accessibility tools like MS Narrator are able to report the item state. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-103988 Change-Id: I1529bdb0104c6e29d8f28bc0bbb8a7fa4670c7ef Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Account for not finding child windows when calling ↵Tor Arne Vestbø2022-07-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | ChildWindowFromPointEx The main code path of findPlatformWindowHelper had a check to verify that the resulting child was not the parent HWND handle itself, but the code path for handling QTBUG-40555 was missing this check, resulting in infinite loops when the top level window was a transparent window. We add the same kind of check to this code path, where neither the hwnd out pointer or the result out pointer is updated. This is okey since we return false and don't expect the function to continue iterating based on an updated hwnd pointer. Ideally the iteration logic should be moved into findPlatformWindowHelper instead of having the outer loop outside of the function, but that's left for another day. Fixes: QTBUG-103571 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I9465253bca52bebf9137b24d7ce36646553d8d39 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QGtk3Theme: Respect xcb_xlib config optionIlya Fedin2022-07-072-0/+7
| | | | | | Pick-to: 6.4 6.3 6.2 Change-Id: I4b01a694e8a13a6f009296d8ccfa8f8eb21043e4 Reviewed-by: Liang Qi <liang.qi@qt.io>
* QGtk3Theme: Ensure gtk uses the same windowing system as QtIlya Fedin2022-07-071-0/+11
| | | | | | | Fixes: QTBUG-69354 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I254c5bf98bc3b2cc2577159e475a2105438bb96b Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make WrapOpenSSLHeaders an optional dependency of the OpenSSL pluginJoerg Bornemann2022-07-061-8/+6
| | | | | | | | | | | | | | | | | | | | | | When configuring Qt statically with OpenSSL support on macOS, configuring a user project would fail, because WrapOpenSSLHeaders could not be found. Configuration fails, because we don't record OPENSSL_ROOT_DIR anywhere, and WrapOpenSSLHeaders is a required dependency of the OpenSSL plugin. Make the WrapOpenSSLHeaders dependency optional like WrapVulkanHeaders for QtGui. Note that when Qt is statically configured with -openssl-linked on macOS, configuration of user projects will still fail like described above. Pick-to: 6.4 Fixes: QTBUG-96283 Change-Id: I0893e18767387ea849c7e5661f5421b71e3f64ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QGtk3Theme: Use GDK X11-specific API only built with X11Ilya Fedin2022-07-062-2/+14
| | | | | | | | | And respect xlib config option Pick-to: 6.4 6.3 6.2 Change-Id: I596097259ed008357e739c3cfe41ab2fc4e18db7 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
* wasm: begin work on accessibility backendMorten Sørvig2022-07-066-2/+323
| | | | | | | | | | | Implement a11y support by adding html elements of the appropriate type and/or with the appropriate ARIA attribute behind the canvas. Also add a simple manual-test. Change-Id: I2898fb038c1d326135a1341cdee323bc964420bb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Enable access to QWindowsScreen from QScreenPiotr Srebrny2022-07-061-1/+3
| | | | | | | | | This patch adds access to the QWindowsScreen interface from QScreen with the aim to provide the native handle of QScreen. This handle will be used in QtMultmedia to find DXGI interfaces related to that screen. Change-Id: I93f066b3f0d4d70331aeedab36bb0db111a34556 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: delete unused requestUpdate() code pathMorten Sørvig2022-07-061-13/+1
| | | | | | | | | | Commit 5359d4 made it so that the window will always have a valid compositor pointer, which means that we don't have to keep the "no-compositor" fallback code path around. Change-Id: Id226e272937a7d488b27ea08dbc575fd9a039ac6 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* Make EGL use Qt X connection without xcb_xlib with EGL_EXT_platform_xcbIlya Fedin2022-07-052-12/+13
| | | | | | | | This allows to create EGL context without involving Xlib. This extension was created a year ago and is present in Mesa since 21.0 Change-Id: I7cb0aece1e67b4db59d453cbcfbd317bb5d9c777 Reviewed-by: Liang Qi <liang.qi@qt.io>
* iOS plugin: Add support for wheel eventsDoris Verria2022-07-051-0/+81
| | | | | | | | Use UIPanGestureRecognizer to handle mouse and trackpad scroll. Task-number: QTBUG-99795 Change-Id: I5db7fabf55b6f2e6f7ba90a0b90ecb08734e2329 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Android A11Y: Fix deadlock in QtAndroidAccessibility::runInObjectContext()Mike Achtelik2022-07-051-1/+7
| | | | | | | | | | | | | | | | | | | On android the event loop is normally blocked, when the application is suspended, e.g. when it enters the background or when the screen is locked (see android.app.background_running). This leads to a problem when we try to process events after this happens, e.g. when android sends us an ACTION_CLEAR_ACCESSIBILITY_FOCUS event after the event loop is suspended. While handling it we eventually call QtAndroidAccessibility::runInObjectContext() which tries to do a blocking call on the object context, however, with the event loop being suspended we run into a deadlock which leads to an ANR. So we need to make sure to never make a blocking call while the event loop is suspended. Task-number: QTBUG-102594 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I33f0440a3da84fb4bdae5ab0fc10d514c73f23ad Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Windows: Fix OpenGL window's screenYuhang Zhao2022-07-061-4/+9
| | | | | | | | | | | | The "GpuDescription::detect().gpuSuitableScreen" is a device name like "\\.\DISPLAY1", not a user-friendly name. Amends commit qtbase/75f22702933bad4f0da2b63a94ea183021771e4c Pick-to: 6.4 Change-Id: I525ecd026f3ee3bc467834449ae023ebfa1138c1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Ignore deprecation for kOnSystemDisk icon domainTor Arne Vestbø2022-07-051-1/+1
| | | | | | | | There's no good replacement yet, so for now ignore the deprecation. Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I56928b73c47b677e3fdafd35cc5ae558e5285314 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: enable sql/sqlite for non threaded buildsLorn Potter2022-07-051-0/+5
| | | | | | | | | [ChangeLog][QtSql][Wasm] Enable sqlite for non threaded builds Pick-to: 6.4 Fixes: QTBUG-70505 Change-Id: I7cb6f52c81a6e8a60249f7bcaa8ee29f109f7b84 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Cocoa: deal with unexpected tablet events without proximityShawn Rutledge2022-07-011-6/+10
| | | | | | | | | | | | | | If the user has a Wacom stylus in proximity of the tablet already (perhaps left it lying on the tablet) and starts a Qt application, we don't get to see a proximity enter event, so a lot of device information is missing; nevertheless, creating a stop-gap device (with ID 0, type Unknown) makes it possible to get basic QTabletEvents with pressure, until the next time the stylus leaves and comes back into proximity. Pick-to: 6.4 Fixes: QTBUG-65559 Change-Id: Ibacbdb78461c0b62d4040c80d210a1b06074e952 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Send touch events asynchronously to avoid deadlocking UIKit event loopTor Arne Vestbø2022-07-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | Although CFRunLoop is documented to support nesting, the UIKit event delivery machinery is not prepared to handle nested event loops. If the user starts a nested event loop in response to e.g. a button press/release, it will deadlock the entire UIKit event machinery, stopping processing of both screen updates (CATransactions) as well as other events. This became an issue on iPhone hardware device in iOS 15, but can not be reproduces on iPads or in the simulator. To be on the safe side, we deliver all touch events asynchronously, even if that means the application code will always be one step behind the event delivered by the operating system. Fixes: QTBUG-98651 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Id0a9fa60b7bb7aa98606d46257e99eac144a1080 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Create a promise wrapper for C++ and port existing usesMikolaj Boc2022-06-301-98/+11
| | | | | | | | | | | | | | | Currently, to use a promise from C++ we either have to use an ASM block (which does not work well with dynamic linking) or declare exports in the EMSCRIPTEN_BINDINGS block, which is cumbersome and cannot be chained. This solution makes it easy to use js promises by introducing the WebPromiseManager which dispatches callbacks to appropriate callers when available. This is a preliminary patch for FileSystem support, which will heavily use async APIs. Task-number: QTBUG-99611 Change-Id: I368a8f173027eaa883a9ca18d0ea6a3e99b86071 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows: Don't rely on top level QWindow to scale children on DPI changeTor Arne Vestbø2022-06-301-13/+9
| | | | | | | | | | | | | | | | | The native size of a QWindow on Windows is the logical size of the window times the window's device pixel ratio. We manage this relationship for top level windows via the WM_GETDPISCALEDSIZE message, and during WM_DPICHANGED we then applied the same scale to child windows. This is problematic in the case where a child window does not have a QWindow parent, so instead of scaling all children when the parent gets a WM_DPICHANGED message, we scale each individual child in the child's WM_DPICHANGED_AFTERPARENT message. Task-number: QTBUG-103383 Pick-to: 6.4 Change-Id: Ia0845aa19a3bb97b7bc9e7d9554ac02b95ca65a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Fix the offset of the EditPopupMenuPekka Gehör2022-06-291-3/+14
| | | | | | | | | | Fix the offset of the EditPopupMenu on application window. Issue caused by a5bb7b3ca510c301baf84e1dd46d5aeeb4986eb2 Fixes: QTBUG-71900 Pick-to: 6.2 6.3 6.4 Change-Id: Ib95e1544fe91c273bc5317bd338a50a74fb1090a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* xcb: update xkb_state mask as much as possibleLiang Qi2022-06-281-2/+2
| | | | | | | | | | | | | | | Though we can get xcb_xkb_state_notify_event_t for the change, but it looks like not enough, especially when a new usb barcode scanner was used, it should be a slave keyboard, and Qt only uses core_device_id for now. It should be enough to update xkb_state mask when we get key event. See also https://xkbcommon.org/doc/current/md_doc_quick_guide.html . Fixes: QTBUG-95933 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ie1e82c19edd777630c7f9057a3b2b8b7cad59e38 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a way to declare _exported_ logging categoriesGiuseppe D'Angelo2022-06-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a library declares a logging category that needs to be used by clients (e.g. via inline methods, macros, etc.), then the logging category function generated by Q_DECLARE_LOGGING_CATEGORY has to be exported. We've seen this problem with Q_NAMESPACE, Q_GADGET, etc.: these macros also declare functions or objects that in some cases need to be exported. And precisely like Q_NAMESPACE, Q_GADGET, etc., people end up relying on the implementation details of Q_DECLARE_LOGGING_CATEGORY (specifically, what does it expand to) in order to place the export directives in the right place. Introduce a more robust solution and apply it around qtbase. Cleanup some minor code as a drive-by (remove `extern` and useless semicolons). [ChangeLog][QtCore][QLoggingCategory] Added the Q_DECLARE_EXPORTED_LOGGING_CATEGORY macro, in order to allow dynamic libraries to declare a logging category that can be then used by client code. Change-Id: I18f40cc937cfe8277b8d62ebc824c27a0773de04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix typo in codeDuan Ting2022-06-231-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I75f4b14f3eded035a0c904d8a7174cb6f5b7d9ef Reviewed-by: Wang Bo <wangbo@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: do not allow blocked windows to be resizedLorn Potter2022-06-221-5/+10
| | | | | | | Fixes: QTBUG-102869 Pick-to: 6.3 6.4 Change-Id: I69a4afbb67618dce7bcc499208e7e608e9adf212 Reviewed-by: David Skoland <david.skoland@qt.io>