summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* wasm: move CTRL <-> META comment into right placeMorten Sørvig2022-05-242-2/+3
| | | | | | Change-Id: I9f95542fd6a0326985744503a71e36448961d6fc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: Improve wheel event handlingMorten Sørvig2022-05-241-17/+14
| | | | | | | | | | | | | | | | | | | | | | | Always invert scroll deltas. This is what the code did before, expect for on non-Safari macOS. There is no need any "smart" code here: correct deltas are provided by the native API regardless of macOS scroll direction setting. Reading webkitDirectionInvertedFromDevice is still useful for certain use cases, such as 3D scene zooming or spinbox value change, where upwards motion on the trackpad should always correspond to "increment" regardless of scroll direction. Propagate this to Qt using one of the handleWheelEvent() overloads Finally, we were sending pixel deltas as angle deltas; fix by sending pixel deltas as well, but keep existing angle delta behavior for compatibility. Change-Id: I7a7104c30da057fefc0377816e551a9e7e2fa0e7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: remove debug codeMorten Sørvig2022-05-241-8/+0
| | | | | | | Accidentally added with commit d4905016. Change-Id: Ie896dc79218f5778be552114d9e896fea8c80ed8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: use correct geometry when drawing window decorationsMorten Sørvig2022-05-241-3/+3
| | | | | | | | | | | | | | We were drawing window decorations at an incorrect location in cases where the QScreen was not at (0,0) (i.e. at an offset on the web page). Window content was placed correctly. Correct canvas geometry can be fond by offsetting window geometry by the negative screen position. Implement this for drawWindowDecorations(), and also simplify the existing code in drawWindowContent(). Change-Id: I1347d325a58dae5e2bb950b93902123f64199ee8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: update m_normalGeometry on setGeometry()Morten Sørvig2022-05-241-0/+2
| | | | | | | | | If we don't do this then applyWindowState() will apply the original window geometry from QWasmWindow::initialize(). Change-Id: I4a0fb7aa7984ba21c64364e0bf00d70513232d5d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: David Skoland <david.skoland@qt.io>
* xcb: create fake screen when XRandR 1.2 and later unavailableLiang Qi2022-05-202-0/+25
| | | | | | | | | Keep the old behavior from 6.0 to 6.2. Fixes: QTBUG-102637 Pick-to: 6.3 Change-Id: I2e596c7d5161a3dc7a8493358e272a481aee5308 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: only set primary for monitor on primary X screenLiang Qi2022-05-203-22/+36
| | | | | | | | | | | | | It's possible to have multiple X screens, and a primary monitor on each X screen. We should only use one on primary X screen as primary QScreen. The reference of QXcbScreen pointer should be used correctly. Fixes: QTBUG-102758 Pick-to: 6.3 Change-Id: I1eafd509c8c109606967a4abe9ad7e9d8c0dd464 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Delete touch points without target windowsTang Haixiang2022-05-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | When XCB_INPUT_TOUCH_BEGIN closes a popup, we then receive XCB_INPUT_TOUCH_END, and cannot find a target window (because it's destroyed). If we don't deliver it, we need to at least clear the stored point from QPointingDevicePrivate::activePoints. Then when we deliver the next touch press, m_fakeMouseSourcePointId also needs to be reset. It's now even more paramount that autotests (and real-world touchscreens) must never omit any active touchpoint from a touch event. If a point doesn't move, it must be included in the QTouchEvent, with Stationary state. If not, QGuiApp::processTouchEvent() could generate multiple TouchBegin events in a row, which gets other bits of logic confused, here and there. Fixes: QTBUG-94557 Fixes: QTBUG-98519 Fixes: QTBUG-102751 Fixes: QTBUG-103706 Pick-to: 6.2 6.3 5.15 Change-Id: Ia95e410a2bb8bc7784aa5d296fac2b89e53a9f55 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* De-pessimize QTlsBackendOpenSSL::clearErrorQueue()Marc Mutz2022-05-191-2/+2
| | | | | | | | | | | We don't need to format the error messages into a QString just to clear the error queue. Just looping over q_ERR_get_error() does the trick, too, and isn't less readable. Pick-to: 6.3 Change-Id: Idc42f8c4ae4374d952cb357fca6c0fca0e04d086 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTlsBackendOpenSSL: don't allocate memory for a QString appendeeMarc Mutz2022-05-171-1/+1
| | | | | | | | Use the QLatin1String overload of QString::append(). Pick-to: 6.3 Change-Id: Id8ddfd72199cfb627c2d6648ce3011979f92094e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Return specific types for frequently used Java objectsVolker Hilsheimer2022-05-172-6/+7
| | | | | | | | | | | | | | | | | | This allows us to specialize JNI type signature templates for e.g. the context object, which in Java signatures is "android/content/Context". Introduce a Q_DECLARE_JNI_TYPE macro that takes care of the plumbing. The types declared this way live in the QtJniTypes namespace, and transparently convert from and to jobject. Since jobject is a typedef to _jobject* we cannot create a subclass. Use a "Object" superclass that we can provide a QJniObject constructor for so that we don't require the QJniObject declaration to be able to use the macro. The APIs in the QNativeInterface namespace doesn't provide source or binary compatibility guarantees, so we can change the return types. Change-Id: I4cf9fa734ec9a5550b6fddeb14ef0ffd72663f29 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Windows QPA: Fix text input with Input Method EditorsAndré de la Rocha2022-05-161-15/+1
| | | | | | | | | | | | | | | Removes a workaround that was added to force the Windows On-Screen Keyboard to automatically appear on Windows tablets, since it is no longer needed in currently supported Windows releases and was interfering with text input using Input Method Editors. Also remove logic for programmatically disabling the OSK, since it is no longer needed here as well, and is already supported in the UI Automation code elsewhere in the Windows QPA. Pick-to: 6.2 6.3 Fixes: QTBUG-98003 Change-Id: I6c4781852a5e9f96330d54a24ee3893dcd43a28c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Make QScreen::name() more user-friendly, take 2Yuhang Zhao2022-05-162-13/+45
| | | | | | | | | | | | | | | | | | | | | | | | The first attempt introduced in e9fd1c6aab28f had an unwanted side-effect which makes the screen name non-unique and made the screen manager think multiple different monitors with the same name is one same monitor. This behavior is of course wrong and unwanted but it was missed due to there's no unit test for this property and I was not familiar enough with QPA stuff. As a result the change was reverted in 851dc581cf9a76. However, the original change is still a good improvement, so we bring it back, but fixed the side-effect mentioned above, by letting the screen manager compare the device name instead of monitor name. If multiple monitors have the same name, a numeric suffix will be appended to the monitor name to let people still be able to distinguish between them. Change-Id: Ic03105d0825abbb3d21cb51d1da3ab2cbb4ca913 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-16864-32584/+1840
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Correctly read and write CF_DIB bmp dataViktor Arvidsson2022-05-161-0/+12
| | | | | | | | | | | | | | | | | | | | When decoding CF_DIB data through the bmp handler we have to do some assumptions on where the pixel data starts since there's no file header to get the offset value from. We have to do this because theres some optional data after the info header that needs to be skipped over in some cases. These optional color mask values are now also written when putting a CF_DIB into the clipboard for maximum compatibility with other apps on Windows. This fixes the issue where pasted dibs would be offset by 3 pixels on Windows. Fixes: QTBUG-100351 Pick-to: 6.2 6.3 Change-Id: Icafaf82e0aa3476794b671c638455402a0d5206f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Android A11Y: handle LocationChanged event only for focused elementIvan Solovev2022-05-165-7/+8
| | | | | | | | | | | | | | | | | | LocationChanged event unconditionally triggered invalidateVirtualViewId call. That call results in TYPE_WINDOW_CONTENT_CHANGED Android event, which causes a lot of background processing. That is not correct, because LocationChanged event is generated by every accessible element, not only the one that has A11Y focus. This patch checks event->uniqueId(), and processes only events that come from the focused accessible element. Done-with: Mike Achtelik <mike.achtelik@gmail.com> Task-number: QTBUG-102594 Pick-to: 6.3 6.2 5.15 Change-Id: I6b941733c9d215fed5ee5a7aeeb5be234add9ebe Reviewed-by: Mike Achtelik <mike.achtelik@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* XCB: fix leaked QXcbScrollingDevicePrivateLiang Qi2022-05-132-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | ==1585319== 1,112 (720 direct, 392 indirect) bytes in 2 blocks are definitely lost in loss record 110 of 123 ==1585319== at 0x483EF2F: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==1585319== by 0x7D01D6C: QXcbConnection::xi2SetupSlavePointerDevice(void*, bool, QPointingDevice*)::{lambda()#1}::operator()() const (qxcbconnection_xi2.cpp:262) ==1585319== by 0x7D025C2: QXcbConnection::xi2SetupSlavePointerDevice(void*, bool, QPointingDevice*) (qxcbconnection_xi2.cpp:316) ==1585319== by 0x7D03D2D: QXcbConnection::xi2SetupDevices() (qxcbconnection_xi2.cpp:499) ==1585319== by 0x7CE81A3: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:105) ==1585319== by 0x7D27BEA: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:199) ==1585319== by 0x7C9D282: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:56) ==1585319== by 0x4B516DE: QPlatformIntegration* qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin, QList<QString> const&, int&, char**&>(QFactoryLoader const*, QString const&, QList<QString> const&, int&, char**&) (qfactoryloader_p.h:108) ==1585319== by 0x4B512A9: QPlatformIntegrationFactory::create(QString const&, QList<QString> const&, int&, char**, QString const&) (qplatformintegrationfactory.cpp:71) ==1585319== by 0x4B074EC: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1209) ==1585319== by 0x4B0A646: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1491) ==1585319== by 0x4B0A7C9: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1508) ==1585319== by 0x568853F: QCoreApplicationPrivate::init() (qcoreapplication.cpp:847) ==1585319== by 0x4B0A89F: QGuiApplicationPrivate::init() (qguiapplication.cpp:1532) ==1585319== by 0x4B05D16: QGuiApplication::QGuiApplication(int&, char**, int) (qguiapplication.cpp:653) ==1585319== by 0x451613: main (tst_qmetatype.cpp:2141) Fixes: QTBUG-95468 Pick-to: 6.3 6.2 Change-Id: I7e0b82c2d2fe464082d8fffd1696c0122c3b35b7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qtloader.js: remove "getProcAddress" error filteringMorten Sørvig2022-05-131-6/+0
| | | | | | | | | Emscripten no longer prints an error for each getProcAddress lookup failure and this code can be removed. Change-Id: I082f420772677196c8eb82c49546825c750377ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* qtloader.js: forward stdErr to console.warn()Morten Sørvig2022-05-131-1/+1
| | | | | | | | | This is the correct mapping, and as a bonus the Chrome browser provides a stack trace on all output from console.warn(). Change-Id: I4a1b95475679d6b54a0690f51c23683514fe7985 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: fix specialHtmlTargets codeMorten Sørvig2022-05-121-3/+2
| | | | | | | | Remove .as_handle() call, which was left over from the previous EM_ASM-based code; see 0ec75f4b9. Change-Id: I220304074f4d17e706726dab086c0330edc9ef25 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Revert "MySQL: pedantism: create and destroy the MYSQL_TIME type"Thiago Macieira2022-05-121-7/+3
| | | | | | | | | | This reverts commit 6feb28918924d80c94b6f435bc3bc981855d59d6. It causes a crash when field.myField is null. Fixes: QTBUG-102489 Pick-to: 6.3 Change-Id: I7e305799c8594ebab255fffd16ee1a41cac8d387 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* wasm: remove window from requestUpdate queue on removeWindow()Morten Sørvig2022-05-121-0/+1
| | | | | | | | | | Don't deliver update requests to windows which have been deleted or are not on screen. Change-Id: Ia2972e8dbef46eaf91a45a84962353917d436da6 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: always call destroy() before deleting a screenMorten Sørvig2022-05-123-7/+6
| | | | | | | | | | | | | | | | | | | QWasmCompositor currently has the requirement that destroying it requires freeing a GL texture, which requires a valid GL context, which requires a valid screen, in order to get to the native context on the canvas. For this reason QWasmScreen has a destroy() function which is called before deleting the QScreen and QPlatformScreen. Make sure we call destroy() also when deleting all screens in the QWasmIntegration destructor. Move the common logic into a new deleteScreen() function which replaces destroy(). Change-Id: I628f13c868808db539effff9b29ecbefac23abc9 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: David Skoland <david.skoland@qt.io>
* QIOSTextResponder: recreate responder upon resetRichard Moe Gustavsen2022-05-101-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple introduced UITextInteraction in iOS 13, which caused issues with our text handling, and resulted in e00d888daefb. This, again, seems to be the reason why UIKit in some cases simply removes the input delegate from our text responder. This typically happens after a QPlatformInputContext::reset(), and then when the next character is typed on the input panel (and hence, leaves no informative stack trace). The result of removing the input delegate, which is the interface that let's Qt communicate IM changes back to UIKit, leads Qt and the UIKit out of IM sync. E.g for a japanese keyboard, after a QPlatformInputContext::reset(), the Qt input field would remove the marked text, but UIKit would still show japanese characters based on what used to be marked text. To work around this issue, this patch will therefore recreate the text responder when Qt tells us to reset. This will cause the first responder to change, which will apparently also reset the UIKit IM state. Fixes: QTBUG-102960 Pick-to: 6.3 6.2 5.15 Change-Id: I00901e980874fae819cc7d89a68fa34ae44808c2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Send screen change before geometry changeMorten Sørvig2022-05-101-3/+3
| | | | | | | | | | | | | | | | | | Fix bug where the device independent QWindow size was set incorrectly, due to usage of incorrect screen and scale factor. This could happen when a window's screen was set to QGuiApplication::primaryScreen() as a fallback, before QWindowsWindow::initialize() would determine the correct screen. By sending the screen change first we make sure that that QWindowSystemInterface::handleGeeometryChange() uses the correct screen for the window. Change-Id: I5520ae67a4db60903d38db856fc314c75a3c0219 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* wasm: add support for drag into browser windowLorn Potter2022-05-107-2/+349
| | | | | | | | | Drag and drop into the browser will work. Drag and drop out of the browser will not. Fixes: QTBUG-102242 Change-Id: Id9981ab6f9514535e1409bec18068790833a67a6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA: Fix crash in some rare casesYuhang Zhao2022-05-101-1/+2
| | | | | | | | | | | | | | For the WM_SETTINGCHANGE message, lParam sometimes may be NULL [1] and that will lead to crash without extra safe guard. Amends commit qtbase/1ed449e168af133184633d174fd7339a13d1d595 [1] https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-settingchange Change-Id: Ibd1e94b4c1d7882db0719c31a66a5fcc9299c3bd Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix window states and transitions in wasmDavid Skoland2022-05-062-27/+53
| | | | | | | | | | | | | | | | | Window states and their transitions do not currently work correctly in wasm (eg. showFullScreen -> showNormal). In order to fix this, we need to conform to Qt's way of handling windows and their geometry, which involves deferring much of the actual geometry changes to when it actually becomes visible, or else the QWidget code interferes with what we're trying to do. Change-Id: I8c7da0be76760363e444dc5dc676036e70863f6e Fixes: QTBUG-102190 Pick-to: 6.3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Forward hover-events for embedded windowsStefan Wastl2022-05-061-4/+4
| | | | | | | | | | | | If a QWindow is embedded into a native view it's effectively the root window, similar to a top level QWindow, and we need to forward hover events on behalf of itself and all child windows. Fixes: QTBUG-103084 Pick-to: 6.3 Change-Id: I1e94b9447fb561c1b02db87738de235c5d12b3a4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: <stefan.wastl@native-instruments.de>
* Revert "xcb: stablilize xkb state when keymap updated"Liang Qi2022-05-063-22/+5
| | | | | | | | | | | | | | | | | | | | | This reverts commit 27c25fc909c19ddc4750f36d26b7c500db9eb0ab. Currently Qt only supports core device of keyboard, not every real keyboard. Create a new xkb state during xcb_xkb_new_keyboard_notify_event_t, it will lose the correct state before the event, for example, when using the second or later layout than the first one. The new xkb state will use the first layout. It's difficult to sync the xkb states. Fixes: QTBUG-102493 Fixes: QTBUG-102640 Task-number: QTBUG-95933 Pick-to: 6.3 6.2 5.15 Change-Id: Iaa5369ff9f5495e194577dcbb8f78303158c9a73 Reviewed-by: Lu YaNing <luyaning@uniontech.com> Reviewed-by: Zhang Hao <543985125@qq.com> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
* xcb: Remove unused codesJiDe Zhang2022-05-061-1/+0
| | | | | | | | | Removed the "QByteArray ba = connection()->atomName(monitorInfo->name);" from QXcbScreen::setMonitor. Pick-to: 6.3 Change-Id: I3b613510669ce9fa6f5e1a4c2491bffe4887ff88 Reviewed-by: Liang Qi <liang.qi@qt.io>
* wasm: destroy compositor and screen in orderMorten Sørvig2022-05-061-2/+5
| | | | | | | | | | | | | | The QWasmCompositor destructor deregisters event handlers, which means it needs to look up the the canvas element, which again means that this needs to happen before we clear the canvas from specialHTMLTargets. Also, calling destroy() is not needed since the QWasmCompositor destructor makes this call. Change-Id: I3004b94d0459c28642d3bd8bf9fe794c9b658477 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* plugins: image formats - fix odr violationTim Blechmann2022-05-061-0/+4
| | | | | | | | | | | | | | | | | | | | When linking Qt statically, the image fomats are not separated into different DSOs. when linking them into the same target, gcc warns about an ODR violation between icohandler and bmphandler: ``` /usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:69:8: warning: type ‘struct BMP_INFOHDR’ violates the C++ One Definition Rule [-Wodr] /usr/src/debug/qtbase/6.3.0-r0/git/src/plugins/imageformats/ico/qicohandler.cpp:98: note: a different type is defined in another translation unit /usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:70:13: note: the first difference of corresponding definitions is field ‘biSize’ /usr/src/debug/qtbase/6.3.0-r0/git/src/plugins/imageformats/ico/qicohandler.cpp:87: note: a field of same name but different type is defined in another translation unit /usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:69:8: note: type ‘qint32’ should match type ‘struct quint32_le’ ``` we therefore wrap the `BMP_INFOHDR` into an anonymous namespace Change-Id: I0e6ee66dd09ebda0c3e399738b5c172a57beb8f4 Pick-to: 5.15 6.2 6.3 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Revert "Windows QPA: Remove dependency on swprintf_s() pulled in via ↵Kai Köhne2022-05-061-20/+1
| | | | | | | | | | | | | | | | | _com_error::ErrorMessage()." This reverts commit 043529c9dc609f3dc4bc6c79b7bc4d33ca3a3ba3, that was introduced to keep compatibility with Windows XP. This is not necessary anymore, as support for Windows XP got dropped. The now removed code also had an issue in the format of the fifth argument of FormatMessage, that is supposed to be a pointer to a pointer for FORMAT_MESSAGE_ALLOCATE_BUFFER. Pick-to: 6.2 6.3 Change-Id: Ib75b6a53a778801388d71388701340d3b79dacce Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
* includemocs (updated script)Marc Mutz2022-05-0514-0/+24
| | | | | | | | | The updated script found some more. Task-number: QTBUG-102886 Pick-to: 6.3 6.2 5.15 Change-Id: Ic8062e8a441c4d1a3718598a21f7f2e050a17cae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QXcbNativeInterface: remove unused field m_sysTraySelectionAtomMarc Mutz2022-05-051-2/+0
| | | | | | | | | | | | | | Says Clang: qxcbnativeinterface.h:141:16: error: private field 'm_sysTraySelectionAtom' is not used [-Werror,-Wunused-private-field] xcb_atom_t m_sysTraySelectionAtom = XCB_ATOM_NONE; ^ Detected by includemocs. Pick-to: 6.3 6.2 5.15 Change-Id: Ie08c2b268b508ed87e63010fc22311ab6c8d0e40 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Windows: Fix pop-up windows being incorrectly moved to primary displayAndré de la Rocha2022-05-051-1/+1
| | | | | | | | | | | | Amends a previous workaround used with AMD graphic adapters, which under some circumstances could incorrectly move pop-up windows and cause issues with menus. Fixes: QTBUG-97533 Pick-to: 6.2 6.3 Change-Id: Icc83198913b0e78ae3d7c0679e46f8b46b7015bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark mouseEvent in wasm compositor as unusedDavid Skoland2022-05-041-0/+1
| | | | | | | | If this is not there, compiling fails for all-warnings-are-errors, which seems to be enabled by default. Change-Id: Id4cafaa635be201b649012ce8fc75f7cb5fb88a3 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Plugins: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-05-0420-34/+34
| | | | | | | Task-number: QTBUG-98434 Change-Id: If64c294033c114ae46dfc327c40da7f3c7a598f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-0478-258/+411
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Namespace a few missing Objective-C categories and their methodsMichael Spork2022-05-031-0/+4
| | | | | | | Fixes: QTBUG-100059 Pick-to: 6.2 6.3 Change-Id: I7579c9ee027de6a133a8b5d95d8e56829e089dab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Plugins: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-05-0218-31/+32
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Id76add7e86b6dfb89f758a9efb0644067f0f44de Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Macstyle: fix the text color on the disabled buttonTimur Pocheptsov2022-05-021-1/+1
| | | | | | | | | | | Forcing it to black make button look enabled, when it's not true. Baseline test already covers this scenario (but probably took wrong snapshot). Pick-to: 6.3 6.2 Fixes: QTBUG-102782 Change-Id: Ifa9041fbf5bf56a7a560e2d1af291c3db2b134f8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Tie QCocoaWindowManager lifetime to QCocoaIntegrationTor Arne Vestbø2022-05-024-17/+12
| | | | | | | | | | | | To avoid any static initialization fiasco when Qt is being used in a plugin. Fixes: QTBUG-101150 Pick-to: 6.2 6.3 Change-Id: I68fa03f982d0c07e4b725ed5f4a1f738e0220438 Reviewed-by: <stefan.wastl@native-instruments.de> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove noop calls to QPlatformInputContext base classTor Arne Vestbø2022-04-294-10/+0
| | | | | | | | | | | | | | Like most QPlatformFoo base classes the default implementations are empty, or have default behavior that should be completely replaced by subclasses. By making it consistent across all the platform plugins when we call base class methods, we avoid confusion of whether a base class call is needed or not. Change-Id: Idd8e4a6fa0e24a1dffd21b63471c9b1c2348691f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Remove un-needed auto-release pools in QCocoaInputContextTor Arne Vestbø2022-04-291-2/+0
| | | | | | | | | These functions do not push much pressure on memory to warrant separate pool, and are otherwise called as part of the normal runloop which has its own pool. Change-Id: If84a899edc4e8cefbf58ecb55d46848ccd69b33b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkManagerNetworkInformationPlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 Task-number: QTBUG-102886 Change-Id: I625ac4cd59bee6a0a21d6a09c1fc72f726c3c41f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTuioTouchPlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I9d7dca22fed668af1a3f5bfe6c9c2c6b17784254 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QGtk3ThemePlugin: includemocsMarc Mutz2022-04-292-0/+4
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I1e023a23a95088effbbcd830eff627fbc4a3c12a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QXdgDesktopPortalThemePlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I564107743e093d880d7d201f45e44207055ad7cf Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>