Commit Graph

62046 Commits

Author SHA1 Message Date
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
Amir Masoud Abdol
1dfa922606 Remove the manual undef of the min/max macros, or def NOMINMAX
We now add NOMINMAX to PlatformCommonInternal target which will be
linked to everything else, so min/max will not be defined upon the
inclusion of `windows.h`, or other headers.

Pick-to: 6.5 6.6
Change-Id: I10016720dac7ce015e929885b7368ee86d8b6918
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 01:18:04 +02:00
Amir Masoud Abdol
076b4bed9f Resolve an issue when running /qt-configure-module .
Accounting for the case where `MODULE_ROOT` is set to `.` which then
makes the `get_filename_component` command to return an empty string;
consequently, we cannot find the `config_file.txt`, and cannot process
the features correctly.

Amend f4bf7982a6

Pick-to: 6.5 6.6
Fixes: QTBUG-114085
Change-Id: I55c7529be6caba4691adec80efca8021bd03c500
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 01:18:04 +02:00
Amir Masoud Abdol
48014f99dc Remove an unused variable
Pick-to: 6.5 6.6
Task-number: QTBUG-109394
Change-Id: Ib1099e3d4091b0b222e405ce25b5e680f0514476
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-07 23:18:04 +00:00
Amir Masoud Abdol
b738ad7e3a Fix an issue with processing -prefix paths ending with \ on Windows
In cases like `C:\` or `C:\D\E F G\`, we had the issue were Windows'
path separator was acting as an escape and was corrupting configure
arguments', so, we were ending up with `-DCMAKE_INSTALL_PREFIX=C`, or
were cutting the argument list short, and ended up ignoring some of the
arguments.

Pick-to: 6.5 6.6
Change-Id: I433af61d5c143cc37a64dcf8ac82a1a78ce543a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-08 01:18:04 +02:00
Amir Masoud Abdol
958c12273a Add Unity Build to config.summary
Unity Build was missing from the `config.summary`. This fixes that.

Pick-to: 6.5 6.6
Task-number: QTBUG-109394
Change-Id: Icd9898956ec1a5332297272130bce27d4d2675ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-07 23:18:03 +00:00
Marc Mutz
f5ed163c19 QString: add STL-style assign() [2/4]: (it,it) overload for QChar-convertible *it
Restrict the permissible value_types to those QStringView can take,
plus QLatin1Char. All of these implicitly convert to QChar and give
the correct result, even when converted char-by-char.

Task-number: QTBUG-106198
Pick-to: 6.6
Change-Id: Icb44244cb08af391161c4309467d4e0d2d3d3d62
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2023-06-07 23:18:03 +00:00
Timothée Keller
245c2b621f Windows QPA: Fix restore geometry after dragging from maximised - Fix
Small adjustment made to previous patch to fix the following issues:
- restoreGeometry not being updated after moving the window from one
screen to the other with keyboard shortcuts.
- restoreGeometry's size not being changed when moving screens if
WM_GETDPISCALEDSIZE isn't sent.

Pick-to: 6.6 6.5
Task-number: QTBUG-112814
Change-Id: I9dd2340137ce57a731f8881d476e902323887e62
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-06-07 21:41:55 +00:00
Timothée Keller
f4d6d04898 Windows QPA: Change monitor index detection
Monitor index detection changed from comparing deviceNames to comparing
serialNumbers, to prevent the case where two monitors with identical
names might overwrite one another.

Fixes: QTBUG-112829
Pick-to: 6.6 6.5
Change-Id: Ibfad08e178774396c4b347acfcfbdb83ed4fe332
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-06-07 17:31:19 +00:00
Axel Spoerl
c153066baa QDockWidget: Propagate window title when re-docking
When a floating dockwidget's title changes, it is rendered as a
window title. When the title changes while floating, the change will be
reverted to the pre-change title when the dockwidget is docked again.

This patch explicitly propagates the window title, if it has been
programmatically changed while the dock widget is floating.

It adds test functionality in tst_QDockWidget::floatingTabs().

Fixes: QTBUG-113591
Pick-to: 6.6 6.5
Change-Id: I96fa69fb27ad1a85f4ea9ce44c0a22290259fca6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 18:46:56 +02:00
Sze Howe Koh
5a2474b2dd Doc: Clarify how to use QPainter with QTextEdit
The documentation suggests that it is possible to reimplement
QTextEdit::paintEvent(), but doing so might produce cryptic runtime
warnings:

    QWidget::paintEngine: Should no longer be called
    QPainter::begin: Paint device returned engine == 0, type: 1

The correct way to reimplement this function is noted under
QAbstractScrollArea::paintEvent(). This patch updates the note and
copies it to QTextEdit for clarity.

Pick-to: 6.6 6.5 6.2
Change-Id: Ib7d8dadeb2358475bcdb0b2e624857700f9a004e
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 16:46:56 +00:00
Laszlo Agocs
526744ba65 rhi: vulkan: Fix swapchain format check
Fix the treatment of the sRGB flag. That is independent from the value
of format(), and should be checked regardless of wanting a HDR swapchain
or not. On Android for instance Display P3 with RGBA8 or RGBA8_SRGB is
one of the formats offered. While we do not support this right now,
it is an example of a "HDR" format that still uses a color buffer
format where a dedicated sRGB format is available and must be
chosen according to the specified swapchain flags.

Pick-to: 6.6
Change-Id: I2d97689fa5af7c08486702ae690f2230d06db469
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-06-07 14:42:58 +02:00
Laszlo Agocs
dc341ea284 rhi: d3d12: Fix swapchain format check
Pick-to: 6.6
Change-Id: Ie2c19ce0aa2c30997a682ed25bc69b2b8e9f7ee0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-06-07 14:42:56 +02:00
Laszlo Agocs
8a1915e04e rhi: d3d11: Fix swapchain format check
...to only return true for HDR formats that are sensible for
Direct 3D. There are currently no other formats, but new ones
may get added in the future.

Pick-to: 6.6 6.5
Change-Id: I4fc6d605da8f6bf2644a4e5c355ab8f1c62ad68d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-06-07 14:42:54 +02:00
Marc Mutz
e4682408b0 Add tst_QString::prependEventuallyProducesFreeSpaceAtBegin()
This seems to work with prepend(char), but not with prepend("data"),
cf. QTBUG-114167.

Task-number: QTBUG-114167
Pick-to: 6.5 6.6
Change-Id: I7aa4dca7c2b5938c2e5ad416231945c23140d659
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-07 11:39:43 +00:00
Tor Arne Vestbø
f1011bd2ed macOS: Don't assume DnD is handled via internal drag loop
If we have only one item, we're not using beginDraggingSessionWithItems
which requires us to manage our own drag loop, and instead use good old
dragImage, which takes care of the drag loop on our behalf.

In both cases we end up in draggingSession:endedAtPoint, so we need
to explicitly check for the existence of a manually managed drag session.

Amends 8a359343621fa83941946cb4e661b54ca7a1c4cc.

Fixes: QTBUG-114236
Pick-to: 6.5 6.6
Change-Id: Ifa9110945e191c4ffebe099e3e4edf9c571ab376
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 13:39:43 +02:00
Tor Arne Vestbø
b006d6d9de iOS: Don't invalidate a11y whenever UI elements are added or removed
The UIAccessibilityScreenChangedNotification will result in iOS resetting
its state, focusing the first a11y element on the screen. We shouldn't
tie clearing the a11y cache to this notification, as those are two
separate actions.

In the case of adding or removing individual elements, we still likely
need to clear the cache, but can inform the system of the more granular
UIAccessibilityLayoutChangedNotification to have it re-read the a11y
tree.

We still handle additions and removal of a11y elements with Window
or Dialog roles as UIAccessibilityScreenChangedNotification, as these
likely involve major UI changes.

The implicit UIAccessibilityScreenChangedNotification on QIOSWindow
destruction has been removed, as it's assumed iOS will automatically
refresh its a11y tree when a UIWindow is destroyed, and in any case
it's up to the individual clients of QAccessible to send the relevant
QAccessibleEvent to inform about the situation.

Pick-to: 6.6 6.5
Fixes: QTBUG-100094
Change-Id: If7d5cb961743e5ca97d45553b05ae5e92f82d275
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-06-07 13:39:43 +02:00
Tor Arne Vestbø
0237709e2c Add QOperatingSystemVersion::MacOSSonoma for macOS 14
Pick-to: 6.6 6.5
Change-Id: I22d4a2443e10ef40f498aa48aabad9aaa7aa8d1a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-07 13:39:43 +02:00
Tor Arne Vestbø
9decda9063 Remove conanfile.py
The conan experiment has ended, and the file is only bitrotting
nowadays.

Pick-to: 6.5 6.6
Change-Id: I8408265f7db7e52803b1f532d08a11387ea978cb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-07 13:39:43 +02:00
Tor Arne Vestbø
366923b597 Detect when Xcode is presenting os_log as structured log messages
In that case, just like when os_log mirrors to stderr by itself, we
want to disable Qt's fallback stderr handler.

Pick-to: 6.6 6.5
Change-Id: Ia373b19788edbce616d4f0d3d9f0b217ddc1e5c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-07 13:39:43 +02:00
Tor Arne Vestbø
569c78162a Remove compatibility defines for Apple OS versions
These are already defined in AvailabilityVersions.h in the SDK,
and we expect people to build Qt against the latest SDK available.

The corner case of requiring defines for upcoming/beta SDKs can
easily be handled by using the version number directly, which is
the recommended practice anyways.

Pick-to: 6.6
Change-Id: Ica296118ee17608b8c43f9338c3083189083474c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-07 13:39:43 +02:00