summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into ↵v5.15.13-lts-lgpl5.15Tarja Sundqvist2024-01-04155-5875/+15648
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: Ie9df84af22570d601db002e391a1a0d97e7cd9e1
| * QVarLengthArray: fix UBs in emplace()/insert() ([basic.life], broken class ↵Marc Mutz2023-02-191-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invariant) There are two problems in emplace_impl() (the same code exists as rvalue insert() since 5.10): First, the old code updated size() at the end of the function. However, if, after constructing the new end element, one of the subsequent move-assignments fail (throws), then the class invariant that size() be the number of alive elements in the container is broken, with the immediate consequence that the QVLA dtor would not destroy this element, but surely other unpleasantness (UB) that the C++ lifetime rules decide to throw our way. Similarly, in the trivially-relocatable case, the memmove() starts the life-time of the new end object, so if the following placement new fails, we're in the same situation. The latter case is worse, though, since here we leave *b in some weird zombie state: the memmove() effectively ended its lifetime in the sense that one mustn't call the destructor on the source object after trivial relocation, but C++ doesn't agree and QVLA's dtor will happily call b->~T() as part of its cleanup. The other ugly thing is that we're using placement new into an object that C++ says is still alive. QString is trivially relocatable, but not trivially copyable, so we can't end a QString's lifetime by placement-new'ing a new QString instance into it without first having ended the old object's lifetime. The fix for both of these is, fortunately, the same: It's a rotate!™ By using emplace_back() + std::rotate(), we always place the new object in a spot that didn't contain an alive object (in the C++ sense) before, we always update the size() right after doing so, maintaining that invariant, and we then rotate() it into place, which doesn't leave zombie objects around. std::rotate() is such a fundamental algorithm that we should trust the STL implementors to have optimized it well: https://stackoverflow.com/questions/21160875/why-is-stdrotate-so-fast We know we can do better only for trivially-relocatable, but non-trivially-copyable types (ex: QString), so in order to not lose the memmove() optimization, we now fall back to std::rotate on raw memory for that case. Amends dd58ddd5d97f0663d5fafb7e81bff4fc7db13ba7. Manual conflict resolutions: - no q20::construct_at() in 6.4 - no QVLAStorage/Base/QVarLengthArray split in 6.2 - no emplace_back() in 6.2 (use append(rv) instead) - no emplace() in 6.2 (the same code here implements insert(rv)) - qsizetype (Qt 6) → int (Qt 5) - no constexpr-if in C++11 Change-Id: Iacce4488ca649502861e0ed4e084c9fad38cab47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e24df8bc726d12e80f3f1d14834f9305586fcc98) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Android: use test QFileInfo fileName() instead of completeBaseName()Assam Boudjelthia2023-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | using fileName is more correct in this case. Task-number: QTBUG-98974 Change-Id: I7c547bfc1c2321d4817dc087d3e962dbc2a0b7fd Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit df47d7d1ff2ac45ab5c6cdade89e5e1857f12479) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix few QFileInfo and QDir callsAssam Boudjelthia2023-02-143-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return the file engine impl of QFileInfo::completeBaseName() and QDir::absolutePath() and QFileInfo::fileName() (based on QAbstractFileEngine::BaseName) if the file engine impl is valid. Amends f77668ffec48d8aaad7c74069c6f3e770a305ae1. Task-number: QTBUG-98974 Change-Id: I28a8c75a6f25e30012b0791c12dbde51bfe8f62c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 249d613a60aa6a1347ebc1c29902049247b93324) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * QAbstractItemView: don't access invalid indexes on copy-keyVolker Hilsheimer2023-02-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pressing the copy key the view tried to access the model's data for the currentIndex() without checking whether the index is valid. This resulted in debug output to the console, and might break models that didn't check incoming indexes for validity (or asserted validity). Fix this by checking whether the currentIndex() is valid before reading the model's data for that index. Fixes: QTBUG-106569 Change-Id: Ide75fbdfdbd1451ab6d48f07b22136553c5b2468 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 3a0c33da3d913431391c5b7f4f0e93ea9d2221dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * savegame ex.: fix include order [2/2]: game.hMarc Mutz2023-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes should be ordered from most specific to most general. This means that project-specific includes always come before Qt includes. This example didn't follow that guideline. Fix. Amends 88e8094f18e6581f2b652eb3d82f514ecf687046. Manual conflict resolutions: - <QList> vs. Qt 5 <QVector> Task-number: QTBUG-108857 Change-Id: Iafdae9dd8e70ff99882c4344a023a21d15fa3c54 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit ac6e8b3b21c2ae25e7a4fe483b604ea6ddecd3ff)
| * savegame ex.: use NSDMI, =default the default ctorMarc Mutz2023-02-132-6/+4
| | | | | | | | | | | | | | | | | | | | Modernizes the code. Task-number: QTBUG-108857 Change-Id: I6ddf1de3699506ffc0fc4b1034ab48defafcf174 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 35b94f8b4349581c548b7aac2e858750072efa19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * savegame ex.: fix include orderMarc Mutz2023-02-132-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Includes should be ordered from most specific to most general. This means that project-specific includes always come before Qt includes. This example didn't follow that guideline. Fix. Task-number: QTBUG-108857 Change-Id: I42727ff8bdef5336368cde349cbcb8d10bb6289f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 88e8094f18e6581f2b652eb3d82f514ecf687046) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * savegame ex.: fix extra ';' after Q_GADGETMarc Mutz2023-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes compiler warnings. Amends 1ff52e478bab33f3aaba5ec185295411a0e6867d. Task-number: QTBUG-108857 Change-Id: Id8b81c67e55baf490aabd0483b5800b3e61965ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 06a9b85f8fec8d039aa0e63cea0e16037611bf79) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * tst_qvarlengtharray: fix MyBase trackers for swap()Marc Mutz2023-02-131-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't begin to understand the semantics of the trackers here, but whatever they are, they break with the fallback std::swap() 3-moves implementation and lose track of alive objects, so provide an ADL swap that does the right thing. Amends dd58ddd5d97f0663d5fafb7e81bff4fc7db13ba7 (I think). Change-Id: I1cd49c95dca2d103a26c2c7ac0a896929135a6c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 49fca96d88c308bc22cd898a8d202228d185654e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist filesTor Arne Vestbø2023-02-135-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently don't have any machinery for qmake or CMake to map translations declared via TRANSLATIONS += or qt_add_translations to the Info.plist CFBundleLocalizations key. This results in macOS and iOS falling back to the development region, CFBundleDevelopmentRegion, as the only supported localization of the app, which is in most cases set to 'en'. Unfortunately this doesn't work well with the behavior of iOS 11+ and macOS 10.13+ where the OS will set the locale of the app to the best match between the app's supported localizations and the user's preferred language. https://developer.apple.com/library/archive/qa/qa1828/ Since we only support a single localization, the development region, the locale always ends up as 'en_<REGION>', which after QTBUG-104930 is also reflected in the QLocale's uiLanguages(), resulting in the QTranslator machinery always picking English translation for the app. As long as we don't explicitly declare CFBundleLocalizations we need to opt out of the system's behavior of finding the best match between the app's declared localizations and the user's preferences, which we can do via the CFBundleAllowMixedLocalizations key. Fixes: QTBUG-63324 Pick-to: 6.4 Change-Id: If7586d342148cbbb1d2a152cef039aad4448b13c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 4709c938dba72b69a91b584bfe34010fec9e2d43)
| * qmake: Add CFBundleDevelopmentRegion to iOS Info.plistTor Arne Vestbø2023-02-131-0/+2
| | | | | | | | | | | | | | Manual adaptation of 2ca83a1fc9a60eda8046d2f1059ef4a09b0b4b6e. Change-Id: I4e5d908ce43578f7f765004deddcd850f2ef785d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Update bundled libjpeg-turbo to version 2.1.5Eirik Aavitsland2023-02-1321-86/+165
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.5 Task-number: QTBUG-110336 Change-Id: Ifc08ad7f1a3c5b3e66b11e5a51d523b091288790 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 94efcf9be4c5e46dff463806e278fcee90ff4d53) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Revert "Copy only files that belongs to QML module"Alexey Edelev2023-02-081-43/+16
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f0f27b20b61c65e94c098cdd4f027dfb7f31a44c. Reason for revert: This breaks Quick style plugin loading QTBUG-110433 Task-number: QTBUG-36637 Task-number: QTBUG-97834 Task-number: QTBUG-110433 Change-Id: I11fda4cbbb70e988543d380b911cb9f97e688adc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * savegame ex.: make Level ctor explicitMarc Mutz2023-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | A QString is not a full representation of a Level, so the Level(QString) ctor should be explicit. Task-number: QTBUG-108857 Change-Id: I24b705139e61c4aaf59cb0aad3b536013e0d07df Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit fa55d46e1f09ddf45dbe5700d4637b003363c559) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * macOS: Skip deployment target runtime check when detecting compat versionTor Arne Vestbø2023-02-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the main executable is built with a pre-macOS 11 SDK, the macOS kernel and system libraries will enable a compatibility mode for reporting the system version, reporting 10.16 instead of 11/12/13 etc. This happens at at such a low level that even manually reading the version from /System/Library/CoreServices/SystemVersion.plist is intercepted. Working around this by temporarily setting the SYSTEM_VERSION_COMPAT environment variable is unfortunately not possible, as it's only read on process creation/initialization. The same goes for the kern.system_version_compat sysctl, as once it's set it can not be changed back to its original value, and it's not clear whether this sysctl should even be touched. As long as we have no reliable way of reading the actual current operating system version, we need to bail out of the deployment target verification, to avoid false negatives where a plugin or library, built with a deployment target of say 11.0, is loaded into an application built with a pre-11.0 SDK, but running on macOS 11+. Change-Id: I9c757a276726175c5dda694ffc1b88f1681d00fb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit bac93ce5eba10ae1e5d165b464a7a9e3b4dd6561) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Apple: Use 'en' instead of 'English' as development regionTor Arne Vestbø2023-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is consistent with what $(DEVELOPMENT_LANGUAGE) reports, as well as the Apple Locales Programming Guide which states that "Locale names such as “English”, “French”, and “Japanese” are deprecated in OS X and are supported solely for backward compatibility." Change-Id: I99779d678ef9d4ea90249572f2f977e9b4df6c62 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit d84ddf5905ce9f68612519b72cdd077077bd0419) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * qmake: Add CFBundleDevelopmentRegion to the macOS Info.plistTor Arne Vestbø2023-02-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aligns with what our CMake Info.plist has for macOS, what we do for both qmake and CMake on iOS, and what Xcode generates for new projects. The value is hard-coded to English instead of using $(DEVELOPMENT_LANGUAGE) as the file will be used by both the Makefile and Xcode generator, and only the latter does variable replacements for $(FOO). Task-number: QTBUG-63324 Change-Id: I87e1cb14b14a9746b3603016c2ac69c252d37ff6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d4b0e0d02eeb46b400ac726115d840dd05c74c51) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QXcbConnection::getTimestamp: do not return stale timestampRoland Pallai2023-02-033-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is `PropertyNotify` event generated by `xcb_delete_property()` at return could be reported as an actual timestamp at next call due to a missing `state` filter. Because `PropertyNotify` is generated even if an unchanged property value is set we can get rid of this delete event easily. This issue causes observable problems in kwin_x11 (KDE project) too. Fixes: QTBUG-56595 Change-Id: Ice6cfa934e3769d86e9f7264e369dc5918c8542a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> (cherry picked from commit 03ac8c7397b9f070a8ef5f33b4675411293b0723) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Update comments in QQuaternion::getEulerAnglesInho Lee2023-02-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | A comment from the patch 6ffc8d8eb6c44fbd51e37770e7013c4610ead96d is a little ambiguous. This patch is just to give information about the modification. Task-number: QTBUG-72103 Change-Id: I6bfc3ae926c118de0d969a4b44f438c24f8d4f72 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 8f9049ddbcedbc1f623acb7bfcd2b31c286f4583)
| * QtGui/math3d: Fix QQuaternion::getEulerAngles for GimbalLock casesYuya Nishihara2023-02-032-39/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is heavily inspired by the patch written by Inho Lee <inho.lee@qt.io>, which says "There is a precision problem in the previous algorithm when checking pitch value. (In the case that the rotation on the X-axis makes Gimbal lock.)" In order to work around the precision problem, this patch does: 1. switch to the algorithm described in the inline comment to make the story simple. 2. forcibly normalize the {x, y, z, w} components to eliminate fractional errors. 3. set threshold to avoid hidden division by cos(pitch) =~ 0. From my testing which compares dot product of the original quaternion and the one recreated from Euler angles, calculation within float range seems okay. (abs(normalize(q_orig) * normalize(q_roundtrip)) >= 0.99999) Many thanks to Inho Lee for the original patch and discussion about rounding errors. Fixes: QTBUG-72103 Change-Id: I8995e4affe603111ff2303a0dfcbdb0b1ae03f10 Reviewed-by: Yuya Nishihara <yuya@tcha.org> Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 6ffc8d8eb6c44fbd51e37770e7013c4610ead96d) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Pass short time format to GetTimeFormat from GetLocaleInfoIlya Fedin2023-02-032-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TIME_NOSECONDS doesn't really switch to short time format, just removes the seconds from long time format. On picking to 5.15, getLocaleInfo() is templated to return QString, not QVariant, so drop its return's toString() in the new code. Also rename a later local variable to avoid shadowing format (and, incidentally, match dev so as to avoid conflicts there on any later patches). Fixes: QTBUG-110627 Change-Id: Ie799958f3942c657f00bc8196588258661ddc1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 763884cfb7be0cadd353cfa3b9b760d521851718) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Mate Barany <mate.barany@qt.io>
| * Android: fix height calculationSamuel Mira2023-02-031-74/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application height calculation relied on the Display.getMetrics to obtain the size of the current app window. It works properly on stock android and Samsung devices, but not on some Huawei and it's unknown on other vendors. This patch changes the way the height and weight are calculated by using the provided values. Task-number: QTBUG-107604 Task-number: QTBUG-109268 Task-number: QTBUG-97503 Task-number: QTBUG-107923 Task-number: QTBUG-109351 Task-number: QTBUG-110501 Change-Id: I0b0d1a0e4688f10530054afd26e34f55a92ea2da Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 48ebd4e318d5fb2d7ffe4b8215cd16cf5638215e) Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
| * SQL/ODBC: fix some users of toSQLTCHAR() to not assume identical UTF-8/16/32 ↵Marc Mutz2023-02-031-70/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string lengths We already fixed the implementation of toSQLTCHAR() in 66767eea46bea0f19f8ae5ad6ebc641d86867701 to not assume that a UTF-8 or UTF-32-encoded string has the same number of code points as the equivalent UTF-16 string, but it turns out that users of the function, as well as other code, also failed to account for this. This patch fixes callers of toSQLTCHAR() to use const auto encoded = toSQLTCHAR(s); ~~~ use encoded.data(), encoded.size() ~~~ (except we can't make `encoded` const, because the SQL API isn't const-correct and takes void* instead of const void*) instead of the anti-pattern ~~~ use toSQLTCHAR(s).data(), s.size() ~~~ As a drive-by: - Extract Method qt_string_SQLSetConnectAttr() - skipping an unneeded .utf16() call (a NUL-terminated string is not required for calling toSQLTCHAR()) - de-duplicate some code in exec() - and make a comment there slightly more informative - replace - NULL with nullptr - size() == 0 with isEmpty() - C-style with constructor-style casts Manual conflict resolutions: - _L1 vs. QLatin1String - u'x' vs. QLatin1Char('x') - qsizetype vs. int Change-Id: I3696381d0a93af8861ce2b7915f212d9e5e9a243 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 46af1fe49f7f419dc1b3231de9860e2da0ea48f8) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * ODBC SQL driver: fix conversion of QByteArray to QVLA<SQLTCHAR>Marc Mutz2023-02-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QByteArray is assumed to contain an SQLTCHAR string (so, either UTF-8, UTF-16 or UTF-32-encoded). Only in the UTF-8 case would the size of the byte array be the same as the size of the SQLTCHAR string in codepoints, yet the size in bytes is what the code passed to the QVLA<SQLTCHAR> append() call, causing it to read past the QByteArray buffer in the UTF-16 and UTF-32 cases. Fix by properly calculating the string size from the size-in-bytes and then memcpy()ing into the QVLA. We use memcpy() and not QVLA::append(T*, n) because the QByteArray buffer need not be aligned on an alignof(SQLTCHAR) boundary (certainly not since it gained the prepend "optimization"). Manual conflict resolutions: - dealt with 32-bit-ness of container size_type vs. Qt 6's 64-bit Change-Id: If3838c3dee89e6aca65541242642315b8e1fa6b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4c445ef0bae8b36ec4a742552f0ebd81a1a90723) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Docs:Android: Add docs notes about support for content UrisNicholas Bennett2023-02-015-0/+59
| | | | | | | | | | | | | | | | | | | | | | Add some details about the support of Qt apis (QFile, QDir, QFileInfo) for Android content uris. Fixes: QTBUG-99664 Task-number: QTBUG-98974 Change-Id: I4b884623702ccad116d47049e34ccddfe21f83ca Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit a0ca5f433fdc45e97e461ece2d9839eebd3c7ea0)
| * QODBC: correctly fill cache when index() is calledChristian Ehrlicher2023-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | QODBCResult::isNull() incorrectly checked for the validity of the internal row cache which lead to wrong results when the requested column was not yet cached. Change-Id: Ic7dcc2117e6f05b63c83f21c6a84ba7e0bda2b2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 91374bb6322cf09525e99698c8fae7688c227d74) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix ignored name filter in QFileDialog::getOpenFileContent()Sze Howe Koh2023-01-311-1/+1
| | | | | | | | | | | | | | | | Fixes: QTBUG-104948 Change-Id: I83a565bfe604472fcdeb8757464e0e350da5d766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 709ca8212ec2b8c4bd2d7acea04e5a70fcec3c2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * GTK3 theme: simplify codeYuhang Zhao2023-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | There's no need to first convert to QString and then convert back to QByteArray. Change-Id: Idedcf3143f44c640a9259f16e364dfe76ecf4c0d Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit e86a5f5f8b184562b5cde0da8882a2d8ebce84d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QToolButton: Elide text when constraints prevent from showing whole textChristian Ehrlicher2023-01-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | Follow-up of b2a282d7c7b8f49819bbc86ed705980438ecb04b - elide the text also when the QToolButton has no icon (=text only) Fixes: QTBUG-64132 Change-Id: If4d3758452f37df411931a6628846988a3418d8e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 021906f6c985b838461d28c7f121d4c3bc7e6499) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix ContextInfo example crashing on AndroidJani Korteniemi2023-01-311-0/+2
| | | | | | | | | | | | | | | | Disabled desktop OpenGL renderer on android Task-number: QTBUG-91627 Change-Id: I61ec7cc768d46c368dc0187714bd0bd085257a67 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * forkfd/linux: add support for LoongArchWANG Xuerui2023-01-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | This architecture is not CLONE_BACKWARDS in any way. Matching OpenDCDiag PR: https://github.com/opendcdiag/opendcdiag/pull/169 Change-Id: Ibceccfd20d270b30302a936885d12e4c55cdd833 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0ab51dcc3c0cca0d84822f3871d98ffa46b6b2e4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * ibus: check object validity before honoring `inputMethodAccepted()`Phan Quang Minh2023-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `inputMethodAccepted()` always return false if there is no current focus object. This means QIBusPlatformInputContext will fail to send the necessary `FocusOut` request to the input context, causing IBus to not send the appropriate content type information to the panel service when the application regains focus and issue a `FocusIn` request. This results in issues like https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5346, which can happen when a Qt application is in foreground as the IBus daemon fails to propagate the content type information to GNOME Shell, which acts as the panel service on GNOME systems. Fix this by checking for the validity of `object` before honoring the result of `inputMethodAccepted()`. Change-Id: I6b79ffc7c5f03ffc05527c29e52a0859f3594bfa Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 95b4cfb1af9aefe3ff3aa151804f464388329c63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * ODBC SQL driver: deal with different sizes of SQLTCHAR correctlyMarc Mutz2023-01-261-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither the UTF-32, nor the UTF-8 recoding of a UTF-16 string is necessarily of the same length as the input. The UTF-32 version may be shorter, if surrogate pairs were encountered. The UTF-8 version will be longer whenever the string contains non-US-ASCII characters. Split toSQLTCHAR() into three functions, templated on sizeof(SQLTCHAR), and use QVLA's range-append instead of manual memcpy()s. This patch specifically doesn't use constexpr-if, as that's not available until C++17, which Qt 5 doesn't require. Change-Id: I0bfcb66eb321598908ef00ac34c888fdbccf9316 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 66767eea46bea0f19f8ae5ad6ebc641d86867701) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Doc: Update copyright yearTopi Reinio2023-01-244-4/+4
| | | | | | | | | | | | Task-number: QTBUG-110271 Change-Id: I82236e81a1fc7d0adfd21a0c876eef298701067e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Android: pass EXTRA_INITIAL_URI to native FileDialogAssam Boudjelthia2023-01-232-6/+28
| | | | | | | | | | | | | | | | | | | | | | Allow setting the initial directory where the file dialog will be opened. Change-Id: I1395b367c74d28fb2890ac53a90456c3ac4c1b05 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 609e14724edfd8d8cef23c5f30ad7812a359ed8d) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * Doc: Only list qt core classes in qt core io groupAndreas Eliasson2023-01-234-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | The group page for Qt core classes related to I/O include classes from other modules. Remove these classes from the group; it may confuse the reader. Fixes: QTBUG-110020 Change-Id: If7df85523ce6b3aa09605bd89d9899ce308d2671 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 76ecff6aebb35f4e39439aab8d18d828c3c8a1fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QFileSystemEngine: URL encode path in trash info, use relative pathJonas Kvinge2023-01-211-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the specifications, the path in .trashinfo should be URL encoded. The path can be relative when possible, otherwise changing the mountpoint will break restoring files from trash. But don't do that for root (/) and home. For more info, see.: https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html Change-Id: Id8271a893a007f4cb5c10611f2b1bc71c1ff4860 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 314a4d121f55a7a6cd8335c9953d105574efab76) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * [doc] Warn users about data races regarding qt_ntfs_permission_lookupMate Barany2023-01-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | qt_ntfs_permission_lookup is a non-atomic global variable that is prone to data races. Make a remark about this in the documentation. Task-number: QTBUG-105804 Change-Id: If7c64f3ab7d2c3b1487fe56204a4e66c420b0604 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 696ad54e5d76dd063cbb02d0c288fdece6ee75d0) Reviewed-by: Marc Mutz <marc.mutz@qt.io>
| * [doc] QSharedPointer: add some missing docsMarc Mutz2023-01-182-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added docs for - move-ctor, -assignment operator - move-construction and -assignment from QSP<X> - qHash() There's more stuff missing, but I declare 'twas enough qdoc wrangling for this round. The texts are taken from other smart pointer docs, esp. QESDP, so they're consistent. Manual conflict resolutions: - swap() wasn't marked as noexcept in qsharedpointer.h, but is in qsharedpointer_impl.h, so kept the Qt 6 version. Fixes: QTBUG-83134 Fixes: QTBUG-63700 Change-Id: Iff980d043e1635ed6cfdd3113c68bc23f3a0bad7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 5dc0f52e7047ca5927e6741fda554cb090184b71) Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Disable feature vkgen if vulkan was explicitly disabledJoerg Bornemann2023-01-181-0/+1
| | | | | | | | | | | | Fixes: QTBUG-110066 Change-Id: Id53071c71e40b1f1968075686144835c39eafd6d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
| * Android: handle move operation with content urisAssam Boudjelthia2023-01-172-19/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow moving content uris if the destination is provided a full content uri with a parent that's different from the source content uri (i.e. different folders). Note: since the underlaying Android APIs don't always know about the parent of a uri, we do some step to deduce that, but that's not always guaranteed to work. Task-number: QTBUG-98974 Change-Id: If21954e5963f4eb0b96c7ccd983943ea2cab5b24 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit c203ec2720b694fd877512da531a227e0f3310cb)
| * Android: handle rename() operation with content urisAssam Boudjelthia2023-01-173-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | Allow renaming content uris if the destination is provided as a direct fileName (i.e. not full content scheme path), and if the destination has the same trailing path (or parent) which means a rename in the same folder structure. Task-number: QTBUG-98974 Change-Id: Ibc4973366807dd5284c19912ab04ff90f2a573cb Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit c1fa5d602c541b06e3e2fc2d02f5d62060c84504)
| * Android: Add facilities to handle more content URIs operationsAssam Boudjelthia2023-01-176-261/+923
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DocumentFile and DocumentsContract to support more operations on content URIs, such as: * listing files and subdirectories with usable content uris * mkdir, rmdir * creating non-existing files under a tree uri * remove And since dealing with content URIs require some level of user interation, manual tests were added to cover what's been implemented. Note: parts of the code were from from BogDan Vatra <bogdan@kdab.com>. Task-number: QTBUG-98974 Task-number: QTBUG-104776 Change-Id: I3d64958ef26d0155210905b65daae2efa3db31c1 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit e5d591a0d09032d1870e47d1bf59c9069ea0a943)
| * Fix infinite loop when iterating content uri sub-files/dirsAssam Boudjelthia2023-01-174-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | make QAbstractFileEngineIterator::currentFilePath() virtual and implement it under AndroidContentFileEngine to return current fileName because content uris shouldn't be constructed manaully like normal file paths. Fixes: QTBUG-104776 Change-Id: I4643a73a3bd4019bedaa056c35468117bcec18dc Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit f3c998510d3a6c8fc468e449d66b0280119d0a8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Return the QFileInfo::baseName/QDir::dirName() from fileEngine implAssam Boudjelthia2023-01-162-2/+6
| | | | | | | | | | | | | | | | | | | | | | Get those values from the file engine instead, this is relevant especially on Android for content uris. Task-number: QTBUG-98974 Change-Id: I65fe4c59e5f1feed0dcf14cc8988b4a40d9d979e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f77668ffec48d8aaad7c74069c6f3e770a305ae1) Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * Fix deletion order also for QImageReader/Writer::setDevice()Eirik Aavitsland2023-01-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | Avoid dangling or incorrect device pointer during handler destruction. This was recently fixed in the destructors, fixed here also for the setDevice() functions. Change-Id: I85b64726cd88d2c8e63eee59d5b4f2ae488df61b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 5633cb69f68ca3d3b82476f9025d863f804e76c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * SQLite: Update SQLite to v3.40.1Andy Shaw2023-01-063-48/+151
| | | | | | | | | | | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated SQLite to v3.40.1 Change-Id: Ic17019f65083b24238025fe6ea6ee9872ac783fe Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit cac325fdc11a409473bd13a758de608eb3df1540) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix cache maybe invalid while the signal is actived from queueJannis Xiong2023-01-063-1/+8
| | | | | | | | | | | | | | | | | | | | with default QObject::connect signal may active from next message loop. invalide cache will hit while accessibility interface is called from windows. Invalide cache will lead to a crash Fixes: QTBUG-106653 Change-Id: I5359672bcd60ed6cfb2edf238645225164cb1b88 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 80f44954f6872afb5aa37e6737c3e1ac68ad3577) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix potential corruption with image format conversion on arm neonEirik Aavitsland2023-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For tiny scanline lengths, even the initial offset to align on 16 bytes may overflow. Fixes: QTBUG-109477 Change-Id: I198c6fa5a2551a951893515f905bb7cc35479608 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 7eccd7ac1c98e0c15c0b4a13d036a5ef46896d8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>