Commit Graph

61916 Commits

Author SHA1 Message Date
Marc Mutz
e409d771d9 tst_QPixmapCache: check insert() reports failure
None of the existing tests failed when I started to return a valid key
from a failed insert(QPixmap), so add a test that would fail.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I74f23d2ec4c04151f8f1266c0c503713d4642f3a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 14:32:48 +02:00
Marc Mutz
6032845ca2 tst_QPixmapCache: rewrite QVERIFY(x != 0) to QVERIFY(x)
This is just confusing. QPixmapCache::find() already returns bool,
comparing it to a literal zero just makes it hard to read.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I43c000890377cca2111daa48799f10cc99aad8cf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 14:32:48 +02:00
Edward Welbourne
8e1b60b331 There is no frank.xbel so don't tell qmake to find it
Both the DOM and XML stream versions of the XBEL bookmarks example had
a frank.xbel in their EXAMPLE_FILES, but there is no such file. So
asking qmake to include it is spurious.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Iec08042d181fc09c2c428685ce841a13161ab273
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-09 14:05:06 +02:00
Edward Welbourne
202b1dca5d XBEL example - modernize strings: use "..."_L1 for literals
The XML stream reader and writer accept QAnyStringView arguments these
days, so passing a QLatin1StringView is entirely sufficient. This
makes static functions to provide access to unique QString instances
redundant. Linkers are allowed to uniquify the literals the "..."_L1
reference.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I7f37e97631e11683b9ddd3842fc6233547bed5ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-09 14:05:06 +02:00
Edward Welbourne
5fd4a65d95 XBEL example: minor simplifications
Pass one function's return as a parameter to another directly.
Use a ternary expression rather than conditional initialization.

Use initializer-list construction instead of appending to an empty
QStringList; and inline the result where it's used.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I781aedba8dcc4251193b55d82fe684c9b5da241a
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-06-09 14:05:06 +02:00
Edward Welbourne
705e4e63c6 XBEL example: Fix null dereference bug
As readXBEL() does call readSeparator(nullptr), the latter should cope
with being passed nullptr as item.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I786e4438b566438448b5d54ff6442c27f1255aa8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-06-09 14:05:06 +02:00
Edward Welbourne
4d8dddd699 XBEL example: use nullptr rather than 0 for null pointers
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I7cb95ab6f84854d36a949d1ce667cb80a9c626be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-09 14:05:06 +02:00
Mikolaj Boc
a1704ee6aa Correctly focus WASM windows on show
Since first requestActivate may happen before the window div is
actually displayed on-screen, we need to sync Qt's activation state
with DOM as soon as DOM element becomes visible. Focusing an
invisible element is impossible.

Fixes: QTBUG-79934
Change-Id: I04cf9b4ead006c9b8b135b3b6967d7938c581833
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-06-09 14:05:06 +02:00
Amir Masoud Abdol
5d12d9846a Fix the issue with setting the QT_BUILDING_QT
`TYPE` argument is not a thing, and if it is there, QT_BUILDING_QT is
set to `TRUE;CACHE;TYPE;STRING;When this is present and set to true, it
signals that we are building Qt from source.` instead of `TRUE`.

Pick-to: 6.2 6.5 6.6
Change-Id: I24784e9aead4929d408d06bce72d3f33ee21eb63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-09 13:50:18 +02:00
Marc Mutz
05e3880130 QString: add STL-style assign() [3/4]: (it,it) overload for char32_t
This no longer is range-length preserving now, so adapt the
documentation.

For the non-contiguous iterator case, it's actually ok to always
resize(0) and then append(), because, unlike for QList and QVLA, the
resize(0) doesn't actually iterate the container to destroy
elements. It just sets some members and conveniently detach()es for
us.

The char8_t case is even more complicated, since we can, atm, not
include qstringconverter.h into qstring.h, yet qstringconverter is
required for stateful UTF-8 decoding in the input_iterator case. So
that's postponed to yet another patch, and maybe won't make it into
6.6. But I feel it's important to have at least one
non-length-preserving version of assign(it, it) in before release lest
users come to rely on this documented (and de-facto) feature of the
the step-2 assign().

Fixes: QTBUG-106198
Pick-to: 6.6
Change-Id: Id458776e91b16fb2c80196e339cb817adee5d6d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-06-09 11:50:18 +00:00
hjk
fe5d9340b1 rcc: Fix bad data signature recognition
Done-by: Mathias Hasselmann
Fixes: QTBUG-73834
Change-Id: I99c480a2ef50ed110e0d98a9dd56661ea851397a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-09 11:27:10 +02:00
Kai Köhne
53fa325f4c Doc: Allow qdoc to link to functions mentioned
\c prevents qdoc from linking to the relevant function documentation.

Pick-to: 6.5 6.6
Change-Id: Ieaa38b1feba816e911b17445a9436f64c234522a
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-06-09 08:05:00 +00:00
Kai Köhne
ef7e65e19a Doc: Fix links to QLayout[Item]::expandingDirections()
The method has been named expandingDirections() since the very
initial git commit for Qt 4.8 ... So high time to fix the
documentation.

Pick-to: 6.5 6.6
Change-Id: If5d7189ebbe439bd0b0e95d51e77c08ee52c3471
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-06-09 08:04:59 +00:00
Vladimir Belyavsky
6b81063832 QStringBuilder: remove QString/QByteArray specializations
This is an improved version of the previous attempt to remove
this 3c6c3eccd1. Now we also take
into account that concatenation of 2 null stings must also produce
null string as a result.

Change-Id: I39c270552839b056247c1cce334cef4fa8f1cfdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-09 09:55:25 +03:00
Michael Weghorn
c7b925757f a11y atspi: Report correct char code point when it's > 65535
QString uses UTF-16 encoding and thus "unicode characters with
code values above 65535 are stored using surrogate pairs,
i.e., two consecutive QChars.". [1]

When the character inside of text is retrieved using the
GetCharacterAtOffset method of the AT-SPI Text interface,
use QStringIterator to retrieve the character's actual
codepoint instead of returning an invalid/incorrect one.

[1] https://doc.qt.io/qt-6/qstring.html

Pick-to: 6.6
Fixes: QTBUG-113438
Change-Id: I07108481716329fd23a92c88892eaedd3f9defc6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-06-09 07:20:13 +03:00
Tor Arne Vestbø
95d10ae682 rhi: Enable HDRExtendedSrgbLinear for iOS
Pick-to: 6.5 6.6
Change-Id: Iaff3c0d18c07cc0cd4ed57a8e6fa7fb07b130a58
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-06-09 00:24:20 +02:00
Volker Hilsheimer
f0049873d2 QMenu: don't crash when nested tear-off menus are closed
QMenu's causedStack maintains a list of menus on the way to the menu,
and might contain nullptr if one of the entries was a tear-off menu
that got closed (and thus destroyed, due to DeleteOnClose).

If the entry we get from the stack is nullptr, fall back to the passed-
in parent widget pointer, and test for nullptr before accessing.

Add a test case that crashes without the fix.

Fixes: QTBUG-112217
Pick-to: 6.6 6.5 6.2
Change-Id: I958182db47c3cc8733e1780f7efef43881ffae11
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-09 00:08:36 +02:00
Tor Arne Vestbø
e84c0df50f Add missing line continuations for memory_resource opt-out on Apple systems
And add some additional parenthesis for extra safety.

Amends f7c8ff511c.

Pick-to: 6.6 6.5
Change-Id: I4ca8b70f6adb876a10f82685ba9800021218d418
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-06-08 21:37:58 +02:00
Topi Reinio
727b6256c1 Doc: Global configuration: Remove obsolete content
Configuration aliases are no longer supported.

Pick-to: 6.6 6.5
Change-Id: I5bb4e1fe6a861f3824d9832f88d2b89c3f1498fd
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-08 17:50:12 +00:00
Topi Reinio
4729e1e720 Doc: Require Qt module documentation to define qhp configuration
By setting 'qhp' to true, QDoc will warn if qhp configuration is not
provided.

Pick-to: 6.6 6.5
Task-number: QTBUG-114181
Change-Id: I26bce80e888d0b0bd270ecdcc6c0774298076a4b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-08 17:50:11 +00:00
Amir Masoud Abdol
9a5de496f1 Move QT_ALLOW_SYMLINK_IN_PATHS warning to config.summary
I think this needs to be more prominent, as I noticed during the testing
that it could cause issues if it gets lost in between the config
messages, as we knew of course.

Pick-to: 6.5 6.6
Task-number: QTBUG-113463
Change-Id: I2ece498a8d3604362a49cc10499b92b0d2764fb9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 19:29:34 +02:00
Axel Spoerl
30cf6ed32f Don't double draw ItemViewItems' icons in QStyleSheetStyle::drawControl
To draw a CE_ItemViewItem QStyleSheetStyle::drawControl lets parts
of the element being drawn by QWindowsStyle, others by baseStyle().
If the ItemViewItem has an icon, it can lead to the icon being drawn
twice: Once by QWindowsStyle, respecting options set in the stylesheet.
Once by the baseStyle(), not respecting stylesheet options.

When the style sheet modifies the icon's position, the icon will be
drawn at this position as well as on the default position.

This patch prevents an icon to be drawn by baseStyle() when it has
already been drawn by the QWindowsStyle.

Fixes: QTBUG-110942
Pick-to: 6.6 6.5
Change-Id: I8622dfe95bef13b196a3e38025fac1cc92f097c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 19:29:34 +02:00
Amir Masoud Abdol
9d8a04cd1f Remove debug symbols from Android's release build
Android's toolchain file, ie., android-legacy.toolchain.cmake assumes
that the default build is a Debug build, and it adds the `-g` flag to
CMAKE_<LANG>_FLAGS, as a result, our release Android build always
contains debug symbols. In this patch, I basically move the `-g` flag
from CMAKE_<LANG>_FLAGS to CMAKE_<LANG>_FLAGS_DEBUG, and
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO.

Pick-to: 6.5 6.6
Fixes: QTBUG-111901
Change-Id: I31eadb07d9172c923e8beaf0ac6c6e34fe1ebefb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-08 16:25:59 +00:00
Tor Arne Vestbø
f341f75c8c Align QKeySequence behavior between macOS and iOS
External keyboards for iOS/iPad devices have the same Macintosh based
keyboard as Macs have, with Command (or Cmd) ⌘; Option (or Alt) ⌥;
and Control (or Ctrl) ⌃ keys.

We were already declaring the QPlatformTheme::KeyboardScheme as
MacKeyboardScheme on iOS.

[ChangeLog][iOS] Keyboard shortcuts now follow the same scheme as on
macOS, with their native representation expressed via the ⌘, ⌥, and ⌃
modifiers. Use Qt::AA_MacDontSwapCtrlAndMeta to override this.

Pick-to: 6.6
Fixes: QTBUG-113165
Change-Id: Ia1856ee1718dab9f2f2512ffffc8b4d3cc5adecc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 18:25:59 +02:00
Axel Spoerl
58ea69aaab iOS: Ignore next touch event if keyboard has lost focus during touch
If the iOS virtual keyboard as lost focus because it was slided down,
the next touch event on an inactive screen area will be mapped to the
keyboard. This kicks an assertion, because the keyboard is expected to
be visible. The case that the keyboard has been deactivated by sliding
it down is not covered.

This patch replaces the assertion by setting self.enabled to NO, which
reflects the keyboard deactivation.

Fixes: QTBUG-112246
Pick-to: 6.6 6.5 6.2
Change-Id: I4873b7a702178acfd3cb8c988134facc050d642a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-06-08 16:25:59 +00:00
Mårten Nordheim
e09b1373c2 tst_QSslSocket: ignore order of sslErrors list
In Schannel it is not guaranteed CertificateBlacklisted will be the
first error emitted. And it really does not make a difference anyway.

Pick-to: 6.6 6.5 6.2
Change-Id: If041f913db9e78ac54e6f8bb2ba1bda110e7d64a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-06-08 16:25:59 +00:00
Kai Köhne
eed17b3634 Examples: Remove unnecessary Q_INIT_RESOURCE calls
Explicit calls to Q_INIT_RESOURCE are only needed for
resources embedded in static libraries. See also

  https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources

Pick-to: 6.5 6.6
Change-Id: I06a24d1c04369eedc78ca60a6ca02ce33907d9e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-08 16:15:02 +00:00
Kai Köhne
7626736a5f Fix indentation of generated cmake code snippet
Pick-to: 6.5 6.6
Change-Id: I41a1998bd45fbbf2ec81fe7e3ce042bcb3aae308
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 16:07:57 +00:00
Marc Mutz
b2244a252c qnetworkreplyfileimpl_p.h: fix header guard name
It was missing the _P.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ic07b4145f06ba3b1bea52349cf9b3f8215f30313
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-08 18:07:57 +02:00
Morten Sørvig
9e0cb768cd wasm: log stack traces for exceptions
This is very useful for debugging.

Pick-to: 6.6
Change-Id: I4861afb9bd2b4e757a962d81583a8b12958f9f1c
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-06-08 18:07:57 +02:00
Mikolaj Boc
4230e56d2e Correctly document qtLoad's return value
Documentation got outdated during review of the new qt loader.

Change-Id: I8e23016b9a42e5f003e88c58a8e546255b167983
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-06-08 18:05:20 +02:00
Tor Arne Vestbø
f7c8ff511c Opt out of standard library memory_resource on macOS < 14 and iOS < 17
Although the header is available, and the compiler reports that the
standard library supports memory_resource, the feature is only
available on macOS 14 and iOS 17, as reported by

  https://developer.apple.com/xcode/cpp/

As long as our deployment target is lower we can't unconditionally
use this feature. It's not clear whether the expectation is that
consumers of the standard library on these platforms will have to
runtime check their uses of these APIs.

Pick-to: 6.6 6.5
Task-number: QTBUG-114316
Change-Id: I50c1425334b9b9842b253442e2b3aade637783ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-08 13:34:31 +02:00
Assam Boudjelthia
436923a76c Android: Fix reporting of QScreen's size() and physicalSize()
The screen's DPI need to be accounted for when calculating
the size in mm from pixels. This was missing after multi-displays
support was added for Android.

Amends fbf586db2c.

Fixes: QTBUG-112742
Pick-to: 6.5 6.6
Change-Id: I31814faa8de68e5193757d52e264b8ed90ae56b6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-06-08 14:04:45 +03:00
Alexandru Croitor
48841c34d2 CMake: Unify CMAKE_BUILD_TYPE behavior on all platforms
Before this change, we had the following behaviors.

On platforms other than Windows-MSVC:
- when no build type was specified, we defaulted to Release
- when -developer-build was specified, we defaulted to Debug
- regardless of platform, unless the option was explicitly specified,
we never defaulted to -debug-and-release.

On Windows-MSVC, we always defaulted to Debug. Which is inconsistent
with the rules above.
The difference happens because CMake always sets CMAKE_BUILD_TYPE to
Debug during the first project() call when targeting the Windows-MSVC
platform.

We interpreted that as the user setting the build type, and thus we
didn't want to override what the user specified.

After this change, if we detect that it's cmake setting the build
type, we assign a build type that follows the non-Windows-MSVC rules.

This change unifies the behavior across all platforms.

Adjusted the configure help with the new reality.

Augments 33af62db37

[ChangeLog][configure] When no explicit build type is specified,
Windows will now default to building Release like the other
platforms.

Pick-to: 6.5 6.6
Change-Id: Id2bf269c51cf300ec09751ece2ad721869e0f90c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-08 13:04:45 +02:00
Axel Spoerl
203550cf76 QPalette Fix documentation typo
compliments -> complements

Pick-to: 6.6
Change-Id: I5457582299d9cd7d39c8f17ad445cdb796bc8e59
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-06-08 13:04:45 +02:00
Alexandru Croitor
e3c6754760 Revert "CMake: make compile options consistent for Qt created libraries"
This reverts commit 389507a047.

Reason for revert: The original patch unintentionally changes
the deprecation warning behavior for user projects. Merging
the current change will resurface the original static qt build
bug until a new fix is developed.

Pick-to: 6.6
Change-Id: I29b41b43fdd76b19bc46439470e04443dc2b8ddb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
2023-06-08 11:04:45 +00:00
Mårten Nordheim
788b400d0e tst_QSslSocket: skip tests with specific cipher if unsupported
Change-Id: If107ec596abc6d5fd82206e8deff9875dfb308c8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-06-08 11:47:35 +02:00
Eskil Abrahamsen Blomfeldt
1dc88a1b5f Avoid infinite loop when loading huge files
QTextDocumentLayout could get into an infinite loop when the
contents exceeded QFIXED_MAX.

Specifically, QFIXED_MAX is used as meaning "one infinite page"
which means that newPage() will just return when it sees this
page height. If the page actually grew larger than this, though,
we would treat it as a page break and enter a loop where we try
to call newPage() to create new pages and never return.

The layout engine cannot support documents this large, so we detect
the case and then just finish the layout loop early when it is
encountered.

Pick-to: 6.5 6.6
Fixes: QTBUG-112968
Change-Id: I485303d714d112119a971c43e0086bf6d3d23e9f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-06-08 08:00:06 +00:00
Eskil Abrahamsen Blomfeldt
90e3f0bd73 Freetype: Don't do image transform for translations
In 6ba003f732, we added support
for transforming bitmap fonts in Freetype by rotating the rendered
glyphs as images rather than using FT_Set_Transform(). However,
we enabled this for all transforms, even the ones that were only
doing translations, which is unnecessary and also caused some
issues. We restrict the condition to only cover rotations, scales
and shears and let translations be handled as before.

[ChangeLog][Text][Freetype] Fixed an issue where setting a
translation matrix on text using a bitmap font would cause
rendering artifacts.

Pick-to: 6.5 6.6
Fixes: QTBUG-114229
Change-Id: Ib3f2870e57c881364c85432a7937f15f3664eda7
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2023-06-08 10:00:06 +02:00
Amir Masoud Abdol
41b32cd2c4 Add TRY_RUN to host tools
On Windows, we will try to run our host tools after a successful build.
If the build fails because of a missing DLL, we will be able to throw an
error with some direction on what might be the cause, and how to resolve
it.

Pick-to: 6.5 6.6
Fixes: QTBUG-113273
Change-Id: Iba548829bc41fbee95cef288faaf7edca118ee33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 05:09:00 +00:00
Tor Arne Vestbø
f34c5215f4 Add Q_OS_APPLE define on Apple operating systems
It's quite common that macOS and iOS share backends, for example due to
the functionality being part of one of the Apple core frameworks. In
this case the support isn't directly tied to the Darwin kernel per se,
so let's use a more general define to refer to the union of Apple
based features.

Pick-to: 6.6
Change-Id: I71cac5ec1d74cd86eba67a64b20846e48c9f05c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-08 03:50:06 +02:00
Friedemann Kleint
de3795c2a6 Mimer SQL driver plugin: Reduce repetitive error messages
Introduce message helper functions for get/set, sparing the translators
having to translate the data types.

As a drive-by, use UUID/CLOB/BLOB consistently.

Amends 0efd8854c4.

Task-number: QTBUG-111219
Pick-to: 6.6
Change-Id: I7a137c3797947523af5478b3add6ee0a26b295d7
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 03:50:06 +02:00
Szabolcs David
4e367fa17b Fix some syntax errors in snippets
- The following error occurs when trying to use these example codes:
"error: expected primary-expression before ‘!=’ token"
- Rename "map" to "hash" in the QHash snippet

Amends 7d542e1daf.

Pick-to: 6.6 6.5
Change-Id: I1ad5b799f444bf074dbfb44223c00770ecf456c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-08 01:50:06 +00:00
Ahmad Samir
8d127c5737 QMimeData: de-duplicate some code
- Fix integral narrowing conversion issues by using range-for
- Use QByteArrayView

Change-Id: Ib45c7d6d8ca27c347324b4b259f25282bc84ff3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-06-08 03:09:52 +03:00
Ahmad Samir
aa481854a9 QUrl: Add QUrl::fromEncoded(QByteArrayView) overload
Copy \note about backwards compatibility from
QMessageAuthenticationCode (with minor changes).

[ChangeLog][QtCore][QByteArray] Added QUrl::fromEncoded(QByteArrayView)
overload.

Change-Id: I8a190db2d50467e6191caf0abfe975b8fc656eb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-08 03:09:52 +03:00
Thiago Macieira
533a0d5e54 forkfd: Add support for eventfd(2) in FreeBSD
Drive-by make the code slightly nicer.

Change-Id: Idd5e1bb52be047d7b4fffffd174db9162cf697a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 17:09:52 -07:00
Thiago Macieira
4e2f8bad0a QElfParser: use ELFOSABI_LINUX instead of ELFOSABI_GNU
It seems to be the preferred constant in other OSes. In particular,
OpenBSD does not appear to have ELFOSABI_GNU[1]. Found while researching
if commit 9caac0f176 was still necessary
for OpenBSD.

This reverts commit ded2fd9ff4, which
implied NetBSD 9 doesn't have ELFOSABI_GNU either.

[1] https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp

Pick-to: 6.5 6.6
Change-Id: I63b988479db546dabffcfffd17662020d722af20
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-06-07 17:09:52 -07:00
Thiago Macieira
b1816c2718 QElfParser: fix build if EM_S390 is not defined
Found in the OpenBSD ports patch collection[1] while researching if
commit 9caac0f176 was still necessary for
OpenBSD. They should upstream their changes instead of working around...

[1] https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp

Pick-to: 6.5 6.6
Change-Id: I63b988479db546dabffcfffd17662042c7130f7c
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2023-06-07 17:09:52 -07:00
Thiago Macieira
604eb6f4cd CMake: apply OpenBSD patch to enable $ORIGIN
Found at https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-cmake_QtRpathHelpers_cmake

There are a lot more patches there whose purpose I can't tell. This is
the only CMake one that I do understand. They should upstream those
changes to us with an explanation, instead of carrying patches...

Found while researching if 9caac0f176 was
still necessary for OpenBSD.

Pick-to: 6.5 6.6
Change-Id: I63b988479db546dabffcfffd17661fdd376bf8c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-07 17:09:52 -07:00
Thiago Macieira
f992402f15 tst_QProcess: move the crasher code to a header
So I can use it in tst_QProcess itself.

This also modernizes it a bit by using __builtin_trap() where available.
On x86-64, this expands to the ud2 instruction.

Pick-to: 6.6
Change-Id: Ib5ce7a497e034ebabb2cfffd176288433378731b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 17:09:52 -07:00