summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove QSqlTableModel::setQuery(const QSqlQuery &)Ivan Solovev2022-08-103-15/+11
| | | | | | | | | | | | | | | | | | | | | ... and simply use the public methods of the base class instead. We can't completely remove it, so we just add it to removed_api.cpp By removing the setQuery() method in the QSqlTableModel class, we open up name lookup to the base class, where the const ref overload was already deprecated in 14f9f00fdb2dc428610c08e3d9d03e38e9602166, and the proper replacements were provided. [ChangeLog][QtSql][QSqlTableModel] The setQuery(const QSqlQuery &) method is removed, because QSqlQuery cannot be copied correctly. Use the public setQuery() overloads of the base QSqlQueryModel class instead. They allow passing of QSqlQuery by rvalue ref, or creation of the query by specifying query string and database object. Task-number: QTBUG-105048 Change-Id: I6f47067af6b4769578d4de9dbdbbbc7504ddf4ad Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Make QSqlQueryModel::query() return a reference to the const QSqlQueryIvan Solovev2022-08-103-5/+17
| | | | | | | | | | | | | | | Returning QSqlQuery instance by value does not make much sense, because it cannot be copied correctly. Also, its copy constructor and copy-assignment operators are deprecated from Qt 6.2. [ChangeLog][Potentially Source-Incompatible Changes][QSqlQueryModel] QSqlQueryModel::query() now returns a reference to the const QSqlQuery object associated with the model. Task-number: QTBUG-105048 Change-Id: I04a2aa377b17d770d2a9855040f8c730190484d8 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtSql: establish removed_api.cpp for upcoming QT_SQL_REMOVED_SINCEIvan Solovev2022-08-102-0/+27
| | | | | | | Pick-to: 6.4 Change-Id: I6614ed13deee733e0cc53b3d8bb6514b2c000a9b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSqlQueryModel: guard the definition of deprecated methodIvan Solovev2022-08-101-1/+2
| | | | | | | | | | | | | ... to prevent compilation errors when built with QT_DISABLE_DEPRECATED_BEFORE >= 0x060200 This commit amends 14f9f00fdb2dc428610c08e3d9d03e38e9602166 Task-number: QTBUG-105048 Pick-to: 6.4 6.3 6.2 Change-Id: I33c586508353ccb4c0af3f5da0cdaf9abe9f590e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Deliver correct key code on key release on WASMMikolaj Boc2022-08-103-76/+69
| | | | | | | | | | | Changed the behavior in which key events are delivered to targets. Before the change, in case of a EMSCRIPTEN_EVENT_KEYUP event, the key code and text were not filled in correctly as they should. This resulted in wrong behavior when event targets expected these codes being available. Fixes: QTBUG-105213 Change-Id: Ie66b5d6d395d08af655fcb00f1f616ad43d6bea4 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Doc: Remove repetition of word in textPaul Wicking2022-08-101-3/+3
| | | | | | | | | | | While dropping the extra "does", rewrite as "doesn't" as common contractions are preferable in particular in negations. Reflow the remainder of the paragraph. Fixes: QTBUG-105517 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I1ad2d5ca753cb1d3a38cf96bdd6e52d2af80151b Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Remove redundant define for QT_LARGEFILE_SUPPORTSona Kurazyan2022-08-101-4/+0
| | | | | | | | It's unconditionally set in qconfig.h by configure.cmake. Pick-to: 6.4 6.3 6.2 Change-Id: If10b5a34111856f4c279a1cf7bfc4ea3a995ef2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Generate forward headers for Q{,Const, NonConst}OverloadSona Kurazyan2022-08-101-1/+0
| | | | | | | | These headers were generated before extracting qoverload.h. This amends ff8de321e22b1e91f7fc04ffe54609b045f23835. Change-Id: I8f0e8dc3725f9776b8f6dc96782c97b0b5566b9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSqlQuery: Do not use deleted constructor in docsFabian Kosmale2022-08-101-2/+2
| | | | | | | | | | QVariant(QMetaType::Type) is deleted since Qt 5 (sic!). Suggest usage of the constructor taking a meta-type instead. Pick-to: 6.2 6.3 6.4 Change-Id: I50949dac9dfc35c80108debdeabc791afe0998b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Refactor QWasmEventTranslator for added readabilityMikolaj Boc2022-08-103-127/+83
| | | | | | | | | | | | | | | | | | | | | | | | Change listing: - change names of abbreviated structures/variables (e.g. KeyTbl -> WebToQtKeyCodeMappings) - add constants for commonly used magic strings ("Dead", StringTerminator) - use common idioms for common tasks (find_if, std::optional) - use binary search as facilitated by the sorted array instead of a full search - this optimizes the code at no cost - remove dead code (double translateEmscriptKey in QWasmEventTranslator::getKey, remove sticky dead key support as it was write-only, remove the dead setIsMac and g_usePlatformMacSpecifics, remove the dead getWindowAt). - cull the public interface on QWasmEventTranslator as some functions are only used internally (translateEmscriptKey) - simplify / shorten functions by short-circuiting - modernize definitions (= default) - auto-format the changes using clang-format The file is now much easier to read and understand. Change-Id: I5ea2bdafd9b9abc009feeb5516ddd87fb0ca212e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* vulkan: Port to VK_EXT_debug_utilsLaszlo Agocs2022-08-109-114/+293
| | | | | | | Fixes: QTBUG-89762 Change-Id: Ie32043578968cbeda7c7f87990b98c10f5d06ff8 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* rhi: vulkan: Log instance extensionsLaszlo Agocs2022-08-101-3/+8
| | | | | Change-Id: I7968268c1c536a0ebcdea00f2f6ab7f5b008be18 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vk: d3d: Zero init most structs normallyLaszlo Agocs2022-08-102-239/+121
| | | | | | | | No need for the memset here. = {} works too, these are all C structs in practice. Change-Id: I44e407d38ef8808412cfef232db7e325a44ce9d1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Adjust API version based on the physical deviceLaszlo Agocs2022-08-102-11/+20
| | | | | | Change-Id: I453d0dc12dbe86cf2153888f84b72c748ef47296 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Enable all core features on the deviceLaszlo Agocs2022-08-102-4/+41
| | | | | | | | | | | | | | ...except robustness. Have the appropriate compile and runtime checks. This way we still compile with any older (1.0, 1.1, 1.2) headers, and can function at runtime with a plain 1.0 implementation. With Vulkan 1.2+ we can start filling out the additional, version-specific (1.1, 1.2, 1.3) feature structs. Task-number: QTBUG-105158 Change-Id: I0ba87f0f467bc11782e9203ff11f1ce494aaaf63 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove assertion from ownMethodIndex that breaks testsSami Shalayel2022-08-101-4/+3
| | | | | | | | | | | | | | | | | | | | ownMethodIndex works for all kind of methods, also for constructors. Therefore, remove the assertion there (that checks for non constructors) and add a test in qtbase so it does not happen again. The test broken by the assertion is in qtdeclarative: tst_QJSEngine::newQMetaObject(). Also rename QMetaMethodPrivate::ownConstructorIndex() to ownConstructorMethodIndex() as the previous naming implied that ownMethodIndex() could not be used for constructors. amends b73ab954dffffc462b6f6efe5a2dd97efeab0038 Task-number: QTBUG-105360 Change-Id: I0244993ed79bee055645b5443f5d02e1c089a6c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Documentation: Fix "Using Model Indexes" in Model View Programming guide to workFriedemann Kleint2022-08-092-29/+40
| | | | | | | | | | | | | The code introduced by 54d5ca0c2766e915c960fa437cee6c20a324c1a7 did not work since the variables parentIndex/numRows were local to the lambda and the outer code would not wait. Move the widgets population into the lambda to fix this. Modernize the remaining code a bit. Pick-to: 6.4 6.3 6.2 Change-Id: I2a09878987df9edb9ff04f0ac4ad82af1a8b52c8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add missing characters with diacritics to the WASM mapping tableMikolaj Boc2022-08-091-1/+4
| | | | | | | | | | There are three characters with diacritics that have been missing from the mapping table+ I acute, I grave and Y acute. Added those to the mapping table in QWasmEventTranslator. Pick-to: 6.4 Change-Id: Iab53e79b84cee39e4a050b05b9eff54f3ad64f6c Reviewed-by: David Skoland <david.skoland@qt.io>
* Add pragmas to the header files that needs to be skipped by syncqtAlexey Edelev2022-08-093-0/+15
| | | | | | | | | | | | | Add the qt_sync_skip_header_check and qt_sync_stop_processing pragmas to: qtbase/src/corelib/global/qsystemdetection.h qtbase/src/corelib/global/qprocessordetection.h qtbase/src/corelib/global/qcompilerdetection.h to avoid checking by synqt. These files were previously blacklisted in syncqt.profile. Change-Id: I268a3063e7eafb9a78e9e8d1cb67cd2def490b35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Support big resources in qt_add_resourcesJoerg Bornemann2022-08-092-93/+228
| | | | | | | | | | [ChangeLog][CMake] The target-based variant of qt6_add_resource gained the option BIG_RESOURCES. This can be used instead of qt6_add_big_resources, which is not target-based. Fixes: QTBUG-100268 Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* RHI: Reduce redundant MTLDepthStencilState changesAndy Nichols2022-08-091-1/+7
| | | | | | | | | | The metal profiler reports many redundant state changes of MTLDepthStencilState which can be reduced by checking if the current depthStencilState is the same as already set before setting it again. Pick-to: 6.4 Change-Id: Ie14f0491ad2cb1c3ce13c1cf3992d06561fbb826 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QCommonStyle: use logging categoriesTimur Pocheptsov2022-08-091-4/+8
| | | | | | | | | Use qCWarning instead of qWarning, to give users more control over debug output if needed. Fixes: QTBUG-105332 Change-Id: I830dd160f75eb9885d80b80336bfb27da676e4bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Document the .base modifier for qmake resourcesJoerg Bornemann2022-08-091-0/+9
| | | | | | Pick-to: 6.4 Change-Id: If8484e9bcf0aa7f0f59102b7b0120defdcd7b3fb Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtNetwork: Modernize JNI usageMårten Nordheim2022-08-091-8/+7
| | | | | | | | Fixes: QTBUG-104188 Change-Id: Iba14fbe23a44df6cb5f2f82b33339606165d1ce5 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* NetworkInformation/Android: Delete member only used for validity checkMårten Nordheim2022-08-092-10/+9
| | | | | | | | | | | | And instead base the isValid function on the success of registering callbacks. The registerReceiver call has no way to report failures so I assume it always succeeds. Task-number: QTBUG-104188 Change-Id: I2b002f791d03f2ebc72fe5cfa215f8f8a1dabdf8 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* NetworkInformation/Android: Convert enum to integer in java sideMårten Nordheim2022-08-092-15/+9
| | | | | | | | | Saving some jni boundary crossing Task-number: QTBUG-104188 Change-Id: I03f49d24848b4107a7e74b620be5e90eca2d4bdc Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* NetworkInformation/Android: Modernize with new JNI functionalityMårten Nordheim2022-08-092-32/+27
| | | | | | | | Task-number: QTBUG-104188 Change-Id: Ib8fcf9b914de5deeb0f811be59a0d1b06e413f29 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Doc: Drop parentheses around \since commandPaul Wicking2022-08-091-2/+2
| | | | | | | | | | | The closing parenthesis ends up in the output. As the fix to QDoc is rather involved, clean up the docs to fix the symptom. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-105339 Change-Id: I35a1e7615125781d950649213c08e5760b0235e7 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Fix QT6_CALL_NEW_OVERLOAD_TAILIvan Solovev2022-08-091-1/+1
| | | | | | | | | | | There was a typo in the used macro name. This commit amends 0a3ff697380555538a0d035b768ddf10f772b55a Pick-to: 6.4 Change-Id: I6b8cb1e3872cb96780af26bfaf722d83d17ba4fe Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusMetaObjectGenerator: replace a few more intThiago Macieira2022-08-081-7/+7
| | | | | | | | | | | | The meta object is actually uint, even though we end up treating it as int elsewhere. I've also replaced one flags use with quint32. That leaves int in this file for meta type IDs only. Replacing them with QMetaTypeInterface pointers is left as an exercise for the reader. Task-number: QTBUG-103548 Change-Id: Ie4bb662dcb274440ab8bfffd17096e0f85e4ea5a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QDBusMetaObjectGenerator: use qsizetype for counting thingsThiago Macieira2022-08-081-26/+28
| | | | | | | | | | | | | | | Even though the meta object format stores 32-bit integers, which means we can't have anywhere near 2 billion properties, methods, method parameters, etc. This suppresses the warning that we may be trying to allocate a negative amount of data in qdbusmetaobject.cpp:438:60: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] Task-number: QTBUG-105388 Task-number: QTBUG-103548 Pick-to: 6.2 6.3 6.4 Change-Id: Ie4bb662dcb274440ab8bfffd17096df93614be8e Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QGraphicsScene::render: fix int/qsizetype mismatchThiago Macieira2022-08-081-3/+3
| | | | | | | | | | | Also suppresses the warning that we may be trying to allocate -1 items in call to new[]. Task-number: QTBUG-105388 Task-number: QTBUG-105471 Pick-to: 6.2 6.3 6.4 Change-Id: Ie4bb662dcb274440ab8bfffd17096d3606354647 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add pragma qt_no_master_include to the qvulkanfunctions header fileAlexey Edelev2022-08-081-0/+4
| | | | | | | | This is required to make the header file self-contained from the syncqt procedure point of view. Change-Id: Ic32e12bc914c62b907bbc75909d9b4e26994d696 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve QDoubleValidator's docsEdward Welbourne2022-08-081-14/+28
| | | | | | | | | | | | | | | | | | Mention that the C locale is an exception on group separators. Rewrite a "It is thus recommended to use" - which is garblage induced by addiction to passive voice ("We recommend use of ..." would be better) - to actually say what needs to be said. Actually say what the standard and scientific notations are, explain which parts are locale-dependent, \sa some relevant QLocale docs (from which the other relevant docs are easily reached). Rephrase the explanations for validate()'s returns. Address validity of the string before constraints on the value it wouldn't represent if it weren't valid. Change-Id: I5e677f00e5146a44eea5b08c5e0146cd235b95b1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Don't skip QDoubleConverter's digit-count check for non-whole boundEdward Welbourne2022-08-081-1/+5
| | | | | | | | | | | | | | | | Using convertDoubleTo() to get a whole number, from which to determine the number of digits we're allowed before the fractional part, fails if the double isn't a whole number, which lead to the skip being checked. Use qFloor() of the double (as this should have as many digits as the double had before its decimal point, which is what we care about; qCeil() might round up to a power of ten). This amends commit ff6d2cb0d5779d81e89d94d65c8d164602fa2567 Fixes: QTBUG-105341 Pick-to: 6.4 6.3 6.2 Change-Id: I4e0105d4602682c59e9830ec9a37556c96db884e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: ensure we close inputpanel after clearing focusobjectRichard Moe Gustavsen2022-08-081-0/+9
| | | | | | | | | | | | | | | | Change 7f72622c0f caused a regression where the input panel would not close automatically when the focus object was cleared. The reason is that it's apparently not enough to just release the first responder, we also need to explicitly tell it to release it's first responder status. Before the failing patch, we did this from within update(). This patch will instead/in addition do an extra check from inside reset(). Fixes: QTBUG-105323 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I00bdd44fe54db69f44232226291e3c5715935749 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNetworkInformation: Add missing \since markerMårten Nordheim2022-08-081-0/+1
| | | | | | | | | | | The new name was introduced in 6.4, but the documentation stayed the same since it was initially written. Amends 8367be8ede233245f1c11ed1291c02afcdb0750e Pick-to: 6.4 Change-Id: Idb27b551760f0d0cb41220be18a4d87e5875baae Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Freetype: Fix underline thickness for bitmap fontsEskil Abrahamsen Blomfeldt2022-08-081-1/+1
| | | | | | | | | | | | | | For non-scalable fonts, we calculate the underline thickness based on the font size. To make the lines slightly thicker for bold fonts, we also multiply a fraction of the weight of the font into it. In Qt 6, however, the weight scale was multiplied by 10, but the formula was not updated, hence all underlines for bitmap fonts would be 10x too thick. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-105010 Change-Id: I108baed495048783b14afca6bd4c67dc83816c17 Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
* Only manually expose the wasm window on raise/lower if it is visibleMikolaj Boc2022-08-081-2/+4
| | | | | | | | | | | If the window is manually exposed and the window is invisible, the result is blocking the visual sync and repainting of the window, which makes the window 'dead' from user perspective until they click/activate it, which again sends an expose event to the window, restoring its updates. Fixes: QTBUG-105363 Change-Id: Iaa42f3ffeca179b8e6da19c9c02a6f01458ca66a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* qputenv: port to QByteArrayViewMarc Mutz2022-08-064-13/+27
| | | | | | | | | | | | | | | | | | | | The vast majority of in-tree users pass simple and short C string literals as the value. By porting to QByteArrayView, we document that we'll accept non-NUL-terminated data, and do the NUL-termination internally, using SSO'ed std::string, saving memory allocations in the common case of short strings. I didn't bother to check which direction std::string takes for nullptrs these days (there was a change accepted in that area for C++20 or 23), so play it safe and protect against them. Follow-up to Task-number: QTBUG-105302 Change-Id: I2369acc62f1d5cbc26135396cfe0602d8c75300c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Declare logging category exported in tst_QDockWidgetAxel Spoerl2022-08-051-1/+1
| | | | | | | | | | | | The logging category lcQpaDockWidgets was explicitly declared in tst_QDockWidget. That failed to complile on static builds. This patch replaces the explicit declaration with Q_DECLARE_EXPORTED_LOGGING_CATEGORY(lcQpaDockWidgets, Q_WIDGETS_EXPORT) Pick-to: 6.4 6.3 6.2 Change-Id: I1cad0e672313be84297eeddf992f6cafe9a35977 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMetaType: don't create a registry just to query its emptiness [2/2]Marc Mutz2022-08-051-2/+2
| | | | | | | | | | The previous commit, b0e4d53b637e6c34457d14ed3f0be705098bf2f5, missed this one. Same rationale as back then. Pick-to: 6.4 6.3 Change-Id: Ibad4c130e0d61c64808275fa7b97b58ebd479acc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: make all atomic operations explicitMarc Mutz2022-08-051-3/+4
| | | | | | | | | | In one case, optimize away an unnecessary extra load. Pick-to: 6.4 Task-number: QTBUG-103834 Change-Id: Iabbf58a09627dd2fd7a40c713a878d74cb522d60 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qputenv: defend against non-NUL-terminated QByteArray valuesMarc Mutz2022-08-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | The old code assumed that a QByteArray's data() is always NUL-terminated. Due to the conflation of owners and non-owners in QByteArray (but also in case we ever get efficient substringing), this is not always the case, e.g. QByteArray::fromRawData() does not ensure NUL-termination. From QString::utf16(), we learn that the condition to check for is QArrayData::isMutable(). After working around the fact that QByteArray::data_ptr() doesn't exist for const QBAs and that empty QBAs always refer to QByteArray::empty_, which is !isMutable(), we can detect this situation and re-allocate without introducing new API. This is the fix for Qt ≤ 6.4. For Qt 6.5, we'll port the function to QByteArrayView. Pick-to: 6.4 6.3 6.2 5.15 Fixes: QTBUG-105302 Change-Id: I3416535ab09d601e0e87b2767f2c024ba1217e64 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Check m_platformWindow before processing key event after shortcutTimur Pocheptsov2022-08-051-1/+1
| | | | | | | | | | | Processing shortcut events may result in the window being deleted, so we need to check if m_platformWindow is still valid before continuing with the key press event. Pick-to: 6.4 6.3 6.2 5.15 Fixes: QTBUG-105160 Change-Id: I9cd362873b19c078a4fced3ac3c815d70bfc7fbe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Fix return type of QLEInteger/QBEInteger post-in/decrement opsJoerg Bornemann2022-08-051-4/+4
| | | | | | | | | Those operators return a value, not a reference. Fixes: QTBUG-104940 Pick-to: 5.15 6.2 6.3 6.4 Change-Id: I117892f12d20c6bf32a12f37c1bdfec1817614c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: gl: Unify end/finish behaviorLaszlo Agocs2022-08-051-0/+12
| | | | | | | | | | | | | | | Issue a glFlush in endOffscreenFrame. This matches endFrame which flushes either implicitly (swapBuffers) or explicitly with SkipPresent (glFlush). This will then benefit producer-consumer setups where a context renders into a texture using begin/endOffscreenFrame and then the texture is consumed in another context. In addition, make finish() issue a glFinish(). Pick-to: 6.4 Change-Id: I0a3115255ad2ac82b730e26d1ca7e88377c5a28c Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* macOS: Don't ifdef out code to resolve display name that might be usedTor Arne Vestbø2022-08-051-2/+0
| | | | | | | | The call to displayName is not guarded by the same ifdef. Pick-to: 6.2 6.3 6.4 Change-Id: I169777130ec316a2d2f837621280acb061072501 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* eglfs: Fix crash when painting the mouse cursor in a multiscreen setupDominik Holland2022-08-051-5/+5
| | | | | | | | | | | | | | | | Always make sure to initialize the OpenGL functions. Instead of relying on the shaderprogram initialization, which is bound to the current context, check for the d_ptr and initialize when not already done. With this fix QEglFSCursor::draw works regardless of which context is current and checking for that is not needed anymore in paintOnScreen. This is important as the basic render loop only uses one context for painting on all screens, while the threaded render loop uses multiple contexts. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I4ac2f5184c2fce27421e92efe1b7f635c71c0e92 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove unneeded @available check for macOS <= 10.14 and iOS <= 13Tor Arne Vestbø2022-08-059-157/+93
| | | | | | | | All versions down to Qt 6.2 require macOS 10.14 or iOS 13. Pick-to: 6.2 6.3 6.4 Change-Id: I5048921ea5a149346a0fa84228227d9156004675 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>