summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QPlugin: reorganize findPatternUnloaded and remove two bool variablesThiago Macieira2021-09-241-16/+9
| | | | | | | | The compiler ought to figure them out, but we can just help it. Change-Id: I42eb903a916645db9900fffd16a4981ac966f982 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Q{Elf,Mach}Parser: simplify the return codesThiago Macieira2021-09-246-73/+57
| | | | | | | | | | | | | | | | | The multi-state return code was a legacy of how Arvid wrote the ELF parser code back in the day, the fact that it scanned for two different types of plugins in Qt 4 and that the metadata could exist in different places. None of that matters nowadays: who cares if the file is a corrupt binary, not a valid binary, does not have the right architecture, or has no suitable section? It's not a plugin, period. The Qt 4 plugin mechanism was removed for Qt 5.0 in commit 7443895857fdaee132c8efc643e471f02b3d0fa4 ("Remove support for Qt 4 style plugins"). Change-Id: I42eb903a916645db9900fffd16a442d800399b98 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* macOS: Remove special cases in enter/leave event handlingVolker Hilsheimer2021-09-241-4/+2
| | | | | | | | | | The Cocoa QPA plugin no longer tracks popups, but dispatches enter/leave events when popups show and hide. So the special handling in tests and QWidgetWindow can go away now. Change-Id: Ib6ef00689de231996e5e57ecdd8fd0d4c861d68b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPlugin: don't use QFile::read() if map() fails on UnixThiago Macieira2021-09-241-2/+15
| | | | | | | | If we can't mmap(), then libdl won't be able to either. Pick-to: 6.2 Change-Id: I42eb903a916645db9900fffd16a492a1ac25903f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: send enter/leave when a window opens/closesVolker Hilsheimer2021-09-242-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Since macOS doesn't give us any event when a modal window opens, we need to do so ourselves explicitly so that the current mouse window gets a leave event when e.g. a popup opens, and an enter event when the popup closes again. The case for modal dialogs is partially handled by QGuiApplication already. Note: We cannot rely on the transientParent of the opening/closing window, as it's nullptr for QMenu windows even if the QMenu has a widget parent. Add a test for enter/leave events when a secondary window opens, covering both the dialog and the popup case. For the dialog case, we sometimes get two Enter events when the dailog closes, which we have to tolerate for now. To make the test pass on b2qt platforms, fix the offscreen plugin to explicitly send enter/leave events in the same way as Cocoa now does. Fixes: QTBUG-78970 Pick-to: 6.2 Change-Id: If45e43e625e8362c3502c740154f6a6a8962b9e9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Don't pretend like our backing store is a QRasterBackingStoreTor Arne Vestbø2021-09-242-2/+2
| | | | | | | | | | We're not using the internal m_image of QRasterBackingStore, nor its m_requestedSize, so inheriting it was just causing confusion when we ended up in QRasterBackingStore::scroll(), operating on those members. Pick-to: 6.2 5.15 5.12 Change-Id: I26561209c0a19777577724728f0ad62e07673577 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix compile error on AndroidLars Knoll2021-09-241-2/+0
| | | | | | | | | | Remove an unused and deprecated enum value that was giving compile errors due to a missing case statement when compiling locally with -developer-build. Pick-to: 6.2 Change-Id: Ieca2124beda122f603acfd1b5f5746284a8a1a6c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: fix error when signing bundlesAssam Boudjelthia2021-09-241-1/+1
| | | | | | | | | | | | | | The jarsigner command that was being used was malformed before the file path leading to wrong signing command. A sample of the malformed command part "-storepass password⍣/path/to/package", note the char after 'password'. So having auto produces a QStringBuilder that's returning the malformed char. Fixes: QTBUG-96838 Change-Id: I5477f6913a74d79ebaf029ef7f4e2745c9f7ced0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit f492790611fe15a4745c8ad0c97259f438c91b6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add docs for qt_extract_metatypes()Craig Scott2021-09-242-20/+85
| | | | | | | | | | | Also tidy up the inline TODO comments to reduce duplication and address some minor inconsistencies. Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: Ic0d27f3c0a356fd311bba95de967faaea05e0f0a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add docs for qt_set_finalizer_mode()Craig Scott2021-09-244-20/+116
| | | | | | | | | Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: Ie7b9282cfc6a27415db5e623a66317c9681c3991 Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "QProcess: do not emit aboutToClose() twice"Alex Trotsenko2021-09-241-0/+1
| | | | | | | | | | This reverts commit efb90f6e7ed3e8d4f7b6c0fb96012cb3a9a9d037. Reason for revert: behavior change for signal listeners Change-Id: Ibe3c5d496cd61a9fccab17a10cc9fda8334fc9d4 Reviewed-by: Björn Schäpers <qt-codereview@hazardy.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Register Wacom tablet devices on cocoaShawn Rutledge2021-09-231-90/+98
| | | | | | | | | | | After 6589f2ed0cf78c9b8a5bdffcdc458dc40a974c60 it's possible and expected that each platform plugin will register the input devices it discovers. Task-number: QTBUG-46412 Pick-to: 6.2 Change-Id: I76c9252bc14c5c8e6af3ecc9b26211f6f301103d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Update Microsoft's Documentation LinksLuca Di Sera2021-09-233-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | The documentation links on `msdn.microsoft.com` now redirect to `docs.microsoft.com`. While the redirection works, our script to catch broken links on dev-snapshots builds of the documentation doesn't handle redirection correctly, reporting it as broken. Both to appease the broken-links script and to avoid an unneccesary redirection, the links were modified to point to the equivalent address in the new domain. Furthermore, the link to the `Winsock 2 Socket Handle` was moved to be an `\externalpage` link, as it was used in two different places. Additionally, the `\externalpage` link titled `Dirext X SDK` was removed as it was not used in any part of the documentation. Task-number: QTBUG-96127 Pick-to: 6.2 6.2.0 Change-Id: I07f0ae8d610a7f8322b892a2fa37a5cc1769289e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* rhi: vk: Fix invalid index for unused attachmentsLaszlo Agocs2021-09-231-12/+14
| | | | | | Pick-to: 6.2 Change-Id: I8140de4eeb1a8a490fcffd10370c29a49d677fed Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* macOS: Handle window titlebar buttons independently from style maskTor Arne Vestbø2021-09-233-36/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style masks such as NSWindowStyleMask{Resizable,Miniaturizable} affect whether the window has a title bar button for the action, but also whether the window can be resized or minimized through other means, for example if the window border can be dragged to resize. By decoupling the visibility and enablement of the title bar buttons from the style mask we can individually control the buttons, and leave the style mask set to enable behaviors we always want. We were already doing this for the NSWindowZoomButton. Unfortunately AppKit not only checks NSWindowStyleMaskMiniaturizable during a call to miniaturize, but also whether the title bar button is enabled. To allow minimizing windows without the titlebar button we detect the situation and give AppKit a NSWindowMiniaturizeButton that we haven't disabled. The alternative would be to temporarily enable the NSWindowMiniaturizeButton during the minimize, but this results in the button flashing yellow for the duration of the animation. Task-number: QTBUG-65637 Task-number: QTBUG-46882 Task-number: QTBUG-64994 Task-number: QTBUG-71485 Change-Id: I2c1a9564d8b7516476aa018b2820670199124bc2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFileSystemWatcher: fix QWindowsFileSystemWatcherEngine crashesTim Jenssen2021-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | Since QHash in Qt6 does not guarantee stable iterators after an insert it crashed from time to time. - possible crash at the erase call if pit is invalid - possible crash at insert if pit is invalid QHash<QString, int> myHash; auto i = myHash.find("foo"); myHash.insert("foo", 789); i.value(); // possible crash myHash.erase(i); // possible crash Task-number: QTBUG-96790 Change-Id: Ia9b53d46b8d1fef81ab5a130c229bc9e936f6521 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e60951eef4f0ade944e2f93ffe2f44abfc76d97a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document QAbstractTestLogger's virtual method APIEdward Welbourne2021-09-231-3/+209
| | | | | | | | Provide the information an implementor needs in order to be able to implement an logging backend. Change-Id: I7bb522de57149dad843e01a8afa9f8891d011d29 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deprecate QTest::qWarn() and replace its last useEdward Welbourne2021-09-232-14/+10
| | | | | | | | The one place that actually called it with file and line number was internal to QtTest, so could call QtTestLog::warn(). Change-Id: I8be10fc81996cc3de4d2eea3ecedc59671ffe759 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace QTest::qWarn() with qWarning()Edward Welbourne2021-09-232-7/+7
| | | | | | | | | | | | | It's the recommended replacement when file and line aren't known, and simplifies the code in any case, thanks to taking format and varargs. It incidentally also enables tests to tell QtTest's custom message logger to anticipate its warnings, when they arise. Fixes: QTBUG-67702 Change-Id: I10c883f4dd0b69dca6e59e0dbd55ab318f1938f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Convert all QT_VERSION checks to compare against QT_VERSION_CHECK()Edward Welbourne2021-09-232-5/+6
| | | | | | | The result is generally more readable. Change-Id: I507f67954ecd38516de1b7a6f8244c233ee45ddf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove fatuously true or false QT_VERSION checksEdward Welbourne2021-09-232-41/+1
| | | | | | | | | QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add some debug warnings to the GL paint engine regarding stencilLaszlo Agocs2021-09-231-0/+8
| | | | | | | | | | | There is absolutely nothing we can do if the render target has no stencil buffer, but print at least a warning in debug builds to give a hint to the developer. Pick-to: 6.2 Task-number: QTBUG-96786 Change-Id: If7f84f28f9bc9b3dadd01d0816c8db4015a1db0b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QMessageBox: read geometry from the screen the message box belongs toRichard Moe Gustavsen2021-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The current implementation found a QScreen by using the position of the mouse in a call to QGuiApplication::screenAt(). From the documentation, this function is allowed to return nullptr if the position is outside the screen. From the stack track in the bug report, it seems very likely that the mentioned call returns nullptr. This is strengthen by the fact that the crash happens for messageboxes that are maximized, so that you need to click on the upper corner of the screen to close it. And then only when HiDPI scaling is in use at the same time. This patch will change the code to just use the screen that the widget is on instead. If no screen can be resolved, the call will default to primary screen. Fixes: QTBUG-96639 Pick-to: 6.2 Change-Id: I31f0301318b358be9619caa31cc831b9598d5f90 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Cocoa: Don't call makeKeyAndOrderFront for native app-modal dialogsDoris Verria2021-09-232-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | We show non-modal and Qt::WindowModal native dialogs as modeless panels by calling makeKeyAndOrderFront on the panel. When we exec() a dialog on the other hand, we start a modal event loop by calling runModalForWindow. This method will display the dialog and make it a key window before running the modal event loop. So we don't need to and shouldn't call makeKeyAndOrderFront explicitly before that. Doing so will make Cocoa lose the reference to the previous active window (as it maintains only one level of previous active window) and wrongly choose the main window as key after the dialog closes. Avoiding the call to showModelessPanel for Qt::ApplicationModal dialogs fixes it. Also, in order to display a modal when show() is called and app modality is set via setModality, display it as a modeless dialog as well. This keeps the same behavior we have currently, but it is still not the right way to handle it as we don't respect the modality set by the user. A clean-up of that logic to come in a follow-up commit. Fixes: QTBUG-42661 Pick-to: 5.15 6.1 6.2 Change-Id: I8f33e3866b191d775a64a5d9ec3dd65736114e62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Change NSTrackingArea to use NSTrackingActiveAlwaysRichard Moe Gustavsen2021-09-234-38/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation configured NSTrackingArea to be active while the application was active (NSTrackingActiveInActiveApp). But because of a bug in AppKit, the tracking area would sometimes stop being updated, with the result that no mouse events was being sent from AppKit. One way to trigger this bug would be to deactivate the app using cmd+tab (fast enough so that the task switcher is not showing), and reactivate it again using a mouse click. To work around this issue, this patch will instead configure the tracking area to always listen for tracking events, even when the application is inactive (NSTrackingActiveAlways). By doing so, we bypass the apparently broken behavior in AppKit related to activation. The downside is that we then also get tracking events while the application is inactive, which is against how Qt should work. So we therefore need to now check if the application is active before we forward any tracking events to QWSI. With NSTrackingActiveAlways we no longer get enter/leave events from AppKit when the application is activated/deactivated and the mouse stays on top of the application, so we now also need to handle this explicitly from the application delegate. Since we already need to keep track of which QWindow is under the mouse to be able to send out enter/leave from mouse moves, we use the same variable (s_windowUnderMouse) for this purpose as well. Because of QTBUG-35109, there was already a code path in QCocoaWindow that sent out an enter event when a window became key. This is no longer needed now that we send out enter/leave when the application is activated/deactivated. It's also questionable if sending an enter event based on a window's key status is correct, since we in Qt should also send out enter events for inactive windows. So we remove this code path since it interferes with (both the old and) the new implementation. Fixes: QTBUG-36926 Task-number: QTBUG-94447 Change-Id: I5c1105bc3102925c9c65964b4a7d1e02efd01735 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add private qAbort helper functionTor Arne Vestbø2021-09-223-25/+35
| | | | | | | Used from qt_message_fatal(), but is useful in other situations too. Change-Id: I3c0e438536d40271061c76d954c7878abfe37b8e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-222-3/+3
| | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* macOS: Fix logic for determining NSWindowStyleMaskTitled/BorderlessTor Arne Vestbø2021-09-221-11/+32
| | | | | | | | | | | | | | | | We were working under the assumption that the NSWindowStyleMaskBorderless style mask excluded all others, on account of having the value 0. But in practice this does not seem to be the case, and you can combine the mask with many of the other masks. The only mask that is mutually exclusive with the borderless mask is NSWindowStyleMaskTitled (with a value of 1). Clarify this be restructuring QCocoaWindow::windowStyleMask(). Task-number: QTBUG-71485 Change-Id: I4bbd603fd2373c11f76e84b72a2a60aa2356b032 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document qt_add_library() and update related docsCraig Scott2021-09-234-13/+186
| | | | | | | | | Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: Ib107110457380a2bb30876cf2c565f0c8e8c5e9c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add docs for qt_add_plugin()Craig Scott2021-09-233-9/+88
| | | | | | | | Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: Ifdc10c7714e91f6211a52bd5c46b3140485bbb43 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove spurious QTestResult::setCurrentTestData(nullptr);Edward Welbourne2021-09-221-1/+0
| | | | | | | | | Calls to QTestResult::setCurrentTestData() are handled via an RAII class, QTestDataSetter, that ensures this final call passing nullptr was redundant. Change-Id: I7788e3ce898e5628d5590ef9d34182f05e85fe50 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QThreadPrivate: Remove threadForIdFabian Kosmale2021-09-221-3/+0
| | | | | | | | | The thread build variant is not implemented; the no-thread one simply returns the current thread. As this has no utility at best and misleading at worst, remove those functions. Change-Id: I93ee45ae7d55e3a7ad1f03168b14149a5d4c9253 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add isValidUtf8() methods to QUtf8StringView and QByteArray{,View}Ievgenii Meshcheriakov2021-09-227-0/+50
| | | | | | | | | | | | | | | The new methods return true if the string contains valid UTF-8 encoded data, or false otherwise. [ChangeLog][QtCore][QByteArray] Added isValidUtf8() method. [ChangeLog][QtCore][QByteArrayView] Added isValidUtf8() method. [ChangeLog][QtCore][QUtf8StringView] Added isValidUtf8() method. Task-number: QTBUG-92021 Change-Id: I5d0cb613265d98b1f189c5f5cc09c1f7db302272 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkInformation: Request all supported feature when loading by nameMårten Nordheim2021-09-221-1/+1
| | | | | | | | | | | | | When we load by name we used to pass an empty QList to the backend as the list of requested features. That's not ideal if a backend were to selectively initialize components, so let's just pass the list of supported features. Not a problem in any current backend but it looks weird. Pick-to: 6.2 Change-Id: Ib022778b08d32e4057103a86bfdda9e17e6ebdaf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove redundant semi-colonsAllan Sandfeld Jensen2021-09-222-5/+5
| | | | | | | | Causes warnings with clang-cl Change-Id: I57395819debe07aecd045c5a8c747632e6c04fc1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocalSocket: reorder device closingAlex Trotsenko2021-09-212-2/+4
| | | | | | | | | | | To allow reading from a slot connected to the aboutToClose() signal, we should call QIODevice::close() just before closing the inner device. This patch amends 21f3ff65b8df777b5726a68b09bbee39f1a893ec. Pick-to: 6.2 Change-Id: Ic8cd00497e1bdf923b980c26e9ca874b77e82f89 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Fix loading certificates on Android with OpenSSLMårten Nordheim2021-09-211-2/+3
| | | | | | | | Fixes: QTBUG-96606 Change-Id: Ic2a55fa65c5dc3c057a4da25c218af5a9861410e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 504df6b135d4ac17aa2290e1aa943d216fb7ef55)
* macOS: Don't re-send key event through input method on focus object changeTor Arne Vestbø2021-09-211-9/+0
| | | | | | | | | | | | | | | | | | | | | | | In 0c2ca26cd9583092f3ade7b18bc2423336a6202b we started re-sending the key event through the input method when we detected a focus object change, to support the use-case of QAbstractItemView opening an editor and changing focus in response to the first QEvent::InputMethod event. Unfortunately this doesn't work as a general approach, because we don't know what the reason was for the change in focus object. For example, a client might respond to a Qt::Key_Return press by changing the focus to the next input element, and re-sending the key event would in that case insert a new-line in the new focus object -- counter to the expectations of the client. Since we can't know the reason for the changed focus object we can't assume re-sending the key event is safe. Task-number: QTBUG-54848 Fixes: QTBUG-96726 Pick-to: 6.2 6.2.0 Change-Id: Iea8b166385925cd1a05ef62d5cf763638d9f8a67 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QVariant::Private: select storage in get at compile timeFabian Kosmale2021-09-211-1/+1
| | | | | Change-Id: I82b0a7ec28400dac64ea785ba6766ca488e615aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: write less haphazardly to dataFabian Kosmale2021-09-211-2/+2
| | | | | | | | While the data subobject is at the same position in memory as the QVariant::Private, using d.data actually activates the union member. Change-Id: Ie6879b588c8e830ae8b34cfcd8e9ddff8b60b3a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qmetatype: Fix operator< detection for std::optionalFabian Kosmale2021-09-211-0/+2
| | | | | | | | | | Amends ca54b741d6edda24773137aacee229db31dd3585. operator< is not constrained in MSVC's standard library, either. Pick-to: 6.2 Fixes: QTBUG-96690 Change-Id: Ibcbb9e53a1f9e8b13786f6d8c01489c61d8d2d7f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cater for upstream changes in eglplatform.hLaszlo Agocs2021-09-212-1/+6
| | | | | | | | | | | | | EGL_NO_X11 has been replaced with USE_X11, thus breaking all existing code out there, including Qt: https://github.com/KhronosGroup/EGL-Registry/pull/130 Fix this by defining USE_X11 whenever we do not define EGL_NO_X11. Fixes: QTBUG-96392 Pick-to: 6.2 Change-Id: If8b68caa8c9022477d87169ca2e2a0121a9313e0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Improve version-related docs in qglobal.cppEdward Welbourne2021-09-212-23/+25
| | | | | | | | | | Give a more pragmatic illustration for QT_DEPRECATED_BEFORE. Make various minor tweaks to wording, use slightly less antique versions in examples. Make usage of "runtime" standard in qglobal.cpp, at least, since "run-time" seems to be less used generally. Change-Id: I1db4950d0d0e97903b1586d98ecba75576493b1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProperty: attempt to fix compilation with GCC 10Thiago Macieira2021-09-211-1/+1
| | | | | | | | | | | | Somehow it's not expanding properly in constexpr time. qproperty_p.h:554:30: error: \u2018(QItemSelectionModelPrivate::modelChanged != 0)\u2019 is not a constant expression if constexpr (Signal != nullptr) { ~~~~~~~^~~~~~~~~~ Fixes: QTBUG-96659 Change-Id: I3eb1bd30e0124f89a052fffd16a69d2eb4b45784 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QWindow respect minimumSize again on WindowsMorten Johan Sørvig2021-09-211-0/+2
| | | | | | | | | | Commit 6336b535 accidentally removed a call to applyToMinMaxInfo(). Add it back. Task-number: QTBUG-96441 Pick-to: 6.2.0 6.2 Change-Id: I26a5d121ed3b4cd9e49e3dd8b371abe71d9a482c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Repair broken link to the XDND protocolLuca Di Sera2021-09-211-1/+1
| | | | | | | | | | | | | | The documentation for QTGUI's `Drag and Drop` links to the XDND protocol, which is used to manage Drag and Drop on X11. The previous link seems to have been broken for a few years and was thus replaced with a link to XDND on Jhon Lindal's site, who is the author of the protocol. Task-number: QTBUG-96127 Pick-to: 6.2 6.2.0 Change-Id: Ia46b10c7461129491934eb74355f107f96e04383 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Refactor QWindowsPipeWriter::writeCompleted()Alex Trotsenko2021-09-211-5/+4
| | | | | Change-Id: Id44215d6a96e7841330181c94cc54b6b677a153d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Add docs for qt_allow_non_utf8_sources()Craig Scott2021-09-213-3/+55
| | | | | | | Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: Ie09785ced5b2bf8098ccff3467f32244f32f9195 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add docs for qt_disable_unicode_defines()Craig Scott2021-09-212-1/+53
| | | | | | | Task-number: QTBUG-95712 Pick-to: 6.2 6.2.0 Change-Id: I37a50d9e8a62c7d9c30014692d99ffe2eb9b90fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* 3rdparty: Fix forwards-compatibility bug in bundled xinput xcb modulePovilas Kanapickas2021-09-203-25/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | libxcb thinks that it knows about all device class types sent by the X server XInput extension. With the addition of touchpad gestures in XInput 2.4 and X server 21.1 this is no longer the case and libxcb fails horribly by thinking that the protocol was malformed. The X server currently has a workaround, but it would not address the following situation: - there are multiple modules within the same X client (e.g. part of the application uses Qt, another part talks to X server via another library) - both of the modules talk to XI - at least one module requests for XI 2.4 protocol support. The request for XI 2.4 disables the workaround on the X server and Qt side would crash horribly. This bug is being fixed upstream in these MRs: https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/23 https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/20 Change-Id: Idf345271340031152b512ef59f619313be5ec226 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>