Commit Graph

59262 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
3730c55a87 QWaitCondition: remove a misleading comment
The comment seems to imply that POSIX "does not allow for spurious
wakeups" on a pthread_cond_t, or that it doesn't allow for them to
happen on certain conditions. That's a misleading generalization. POSIX
allows for spurious wakeups [1], so we must handle them, end of story.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_timedwait.html

Task-number: QTBUG-109364
Change-Id: Iffcfbd85ec84c4e94a051f235fd3b3557a3aea9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-13 22:32:24 +00:00
Giuseppe D'Angelo
05e72d53a6 PCRE2: upgrade to 10.42
Upstream released 10.41 and 10.42 in quick succession.

[ChangeLog][Third-Party Code] PCRE2 has been updated to 10.42.

Change-Id: Iadec8e64e9ce7ddad17afb075157719af76379bd
Pick-to: 5.15 6.2 6.4 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-13 22:32:24 +00:00
Timur Pocheptsov
edca2f5b78 qdarwinpermission_location: disable deprecation warning
Class method is deprecated on iOS (but not on macOS). Reading warnings
about deprecation with a recommendation to use that part of API we
already have in @available check is a bit annoying, so suppressing warnings.

Change-Id: I17645c8fb6f1056d8146e5d8e8e1a74113d5ff6b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-13 21:57:58 +00:00
Thomas Senyk
ad2aca113d eglfs-kms/gbm: fix segfault and add qScopeGuard
As framebufferForBufferObject has a code-path which returns a nullptr,
it's vital to check on that and return early in that case.

As this is the third segment in this function that does gbm_surface_release_buffer,
a qScopeGuard was introduced to reduce code duplication.
This also makes this function saver/easier to maintain long term.

The platform on which this segfault was reported is QEMU

Pick-to: 6.2 6.4 6.5
Change-Id: I5ee1ad4073712349b7475bce3a7978961fea2344
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-13 21:07:51 +01:00
Yuhang Zhao
67284763e7 HiDPI: fix wrong window size after DPI change
Current code doesn't take the custom margins into account,
it will cause windows with custom margins have wrong size
after DPI change.

Amends commit 2cfca7fd19

Pick-to: 6.5 6.4
Change-Id: I80b01c030a63d02cf66f105785df7c3f590481b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-14 02:33:26 +08:00
Tor Arne Vestbø
faffaa7292 macOS: Don't set cursor for non-key windows
The system behavior when using NSTrackingArea with
NSTrackingCursorUpdate is that cursorUpdate is called whenever
the mouse enters a key window. In response, we use [NSCursor set]
to apply the QWindow's cursor that was set earlier though
QCocoaWindow::setWindowCursor().

As a QWidget can manage a hierarchy of child widgets, each with
their own cursor, we may see multiple calls to setWindowCursor()
when hovering the mouse over a window.

In ae8e96d4c2 we worked around an
AppKit bug where an override cursor would prevent our call to
invalidateCursorRectsForView from resulting in a cursorUpdate
call. But, in doing so, we ignored one of the documented behaviors
of invalidateCursorRectsForView, namely that the cursor is only
updated immediately if the window is currently the key window.

As a result, we would call [NSCursor set] for non-key windows,
which creates an inconsistent behavior. As long as we're not
consistently supporting cursor updates for non-key windows
we should align our workaround behavior with the existing
behavior.

Task-number: QTBUG-96374
Change-Id: I36e4c7802b177230a7e81133cd38557590f041b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-13 17:21:13 +01:00
David Faure
49dbedacf5 QStackedWidget: remove unused member
Change-Id: I109d9753fc7466163aac10921911fc036eb5924e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-12-13 14:06:09 +01:00
Amir Masoud Abdol
5d47680003 Remove the incorrectly added extra .bat
The .bat extension was already handled for, __qt_cmake_private_path,
and adding the extra one was causing an issue where
qt-cmake-standalone-test was calling qt-cmake-private.bat.bat!

Amends 8aae821b5a

Pick-to: 6.5
Change-Id: I9c374440c89c617e31f369fde8f041e5c1d17a03
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-13 12:41:29 +00:00
Ahmad Samir
419c99f835 QByteArrayApiSymmetry: silence two clang warnings
tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp:1174:80:
warning: overflow in expression; result is -9223372036854775808 with
type 'long long' [-Winteger-overflow]
const qlonglong longMaxPlusOne =
    static_cast<qlonglong>(Bounds::max()) + 1;

tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp:1175:81:
warning: overflow in expression; result is 9223372036854775807 with type
'long long' [-Winteger-overflow]
const qlonglong longMinMinusOne =
    static_cast<qlonglong>(Bounds::min()) - 1;

I usually build with GCC, but building with Clang for clazy-standalone,
so I saw these two warnings 500+ times, enough already. :)

Change-Id: Idd86af568ffe89ae49b2a3f9bbeedf312de5e631
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-13 14:41:29 +02:00
Ahmad Samir
e3ae2a505e QString: add needsReallocate() static helper
Split it out from resize(), will be reused in do_replace_helper().

Change-Id: If779e03196678e1618f0ecc114448fed796b43d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-13 14:41:29 +02:00
Ahmad Samir
6f2a1430c9 QString: don't use noexcept if the method could allocate memory
Change-Id: I49dbd25a41152995d0843fa54d7b3cb4045f3849
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-13 14:41:29 +02:00
Doris Verria
f0e98e35a1 Metal rhi: Cast layer bounds to int before multiplying by scale factor
In qrhimetal, we were setting the current pixel size by multiplying
the width/height of the CAMetal layer bounds, which are floats, with
the scale factor, and then rounded these to the nearest integers by
converting from QSizeF to QSize.

This caused problems, namely a crash when trying to resize a modal view
controller on iOS, because Metal expected the height of the render pass
to be equal to (int)height * scaleFactor. So looks like we were relying
on the truncated rather than rounded value of the height for this.

To fix, cast the layer width/height to int before multiplying with the
scale factor, to be consistent.

Pick-to: 6.5
Change-Id: I02f4f48db3dcc3802dd56aa816988847fc5d4603
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-13 12:41:29 +00:00
Morten Sørvig
a46a77a8b4 wasm: disable x.y.z suffix versioning
This simplifies deployment and eliminates the possibility
for duplicate downloads due to the browser/server not
understanding symlinks.

Change-Id: Ife22c052c424f309d76ff0f9118c01e98426da95
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-13 13:41:28 +01:00
Tor Arne Vestbø
53b413f1c5 Rename QMessageDialogOptions::Icon to StandardIcon
To clarify its use as a pre-defined standard icon, which is a separate
use-case from providing a user-defined QIcon.

Change-Id: I187ce2e5f125a7392b1279c9bd1e871790c8065f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-13 13:41:28 +01:00
Mårten Nordheim
24e4fb34cd Bootstrap: Fix compilation of decl/def with different conditionals
By making their conditionals the same

Change-Id: I2f1663480103fdfb0c156fc3da2da8d69651824a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-13 13:41:28 +01:00
Bartlomiej Moskal
4ceee3911a Android: fix Android assets handler not listing dirs with only sub dirs
It looks like AAssetDir_getNextFileName is not enough.
Directories that contain only other directories (no files)
were not listed.

On the other hand, AAssetManager_openDir() will always return a
pointer to initialized object (even if the specified directory does not
exists), so we can't just leave only it here.

Using FolderIterator as a last resort. This approach should not be too
time consuming.

As part of this fix, add some unit tests to cover/ensure assets
listing/iterating works as expected.

Fixes: QTBUG-107627
Pick-to: 6.4 6.2 5.15
Change-Id: Id375fe8f99f4ca3f8cad4756f783ffafe5c074df
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-13 12:04:40 +00:00
Nicolas Fella
fbfaf5d38b Add xdg-activation support to QGenericUnixServices
This is needed to transfer focus to the receiving application if that
is already running

It uses the new native interface for QWaylandWindow to access the
existing xdg-activation support of QtWayland.

The received token is passed in the options map for portal calls
(as defined in the portal spec) or passed via env variable when
launching the relevant helpers

Change-Id: I524bc58d88033af914e8af2c6db26b1a86afb863
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2022-12-13 11:49:50 +01:00
Amir Masoud Abdol
9773f0175c Return qt-configure-module to bin/
We agreed that qt-configure-module needs to come back to bin/ as it's
user-facing.

Amends d77ce33082

[ChangeLog][CMake] Upon further consideration, qt-configure-module
was deemed user-facing, and was thus moved back to ./bin on
all platforms.

Task-number: QTBUG-107621
Change-Id: I1f7874436e5b3988242091fc0303ea828f29d5c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-13 10:02:25 +00:00
Piotr Mikolajczyk
9ce8d4890f Add handling of screen hotplug
When a display is connected to an Android device
a notification is sent to the platform layer of the
application. The QAndroidPlatformIntegration will create
a platform screen and add it to QWindowSystem.

Task-number: QAA-1257
Change-Id: Id2cf6b47363630c3b5c93c0bc778e2058d8372b3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-13 07:49:22 +00:00
Volker Hilsheimer
70b3df00f9 Silence compiler warnings about unused variables
Change-Id: I02e51868f762292b0a6b57d38a5bd25335b19621
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-12-13 05:17:26 +01:00
Lu YaNing
223cf01cc6 Add static_cast for QKeyEvent
Use static_cast to convert a QEvent to a QKeyEvent,
replacing (QKeyEvent*)e

Change-Id: I52ac3f46aec42600251cf737db2e71c04f2b45c7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-13 12:17:06 +08:00
Tor Arne Vestbø
04695824f0 Remove note about QSystemTrayIcon menu on macOS not emitting aboutToHide
It works perfectly fine nowadays.

Change-Id: I519a581ef4c815fc82a6c82c517cf1350b7b5c67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-12 22:18:20 +01:00
Volker Hilsheimer
54f7cd34a1 iOS: initialize font traits
Silences build-breaking compiler warning and probably fixes a bug.

Pick-to: 6.4 6.2
Change-Id: Ice48657831ac1f8406f33ca7e3afa70556831274
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-12 20:10:11 +01:00
Joerg Bornemann
82601c1205 CMake: Handle non-existent targets when collecting dependencies
When collecting the dependencies of a target, it can happen that we
encounter a target that is not visible in the current directory scope.
This can usually be fixed by moving the corresponding find_package call
to a higher directory.

Detect this situation and print a warning with instruction how to
silence this warning: either by fixing the situation or by setting
QT_SILENCE_MISSING_DEPENDENCY_TARGET_WARNING.

Fixes: QTBUG-108286
Change-Id: I9033fedbd81ef0710b7cc11fab0e94e67c74ff86
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-12 20:10:11 +01:00
Volker Hilsheimer
f89c948c0c QHeaderView test: Remove unused variables
Silence warnings such as:
variable 'sum_lookup_visual' set but not used [-Wunused-but-set-variable]

Change-Id: If38515d9753cf7b79a250985890a139e96e92329
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-12 20:10:11 +01:00
Volker Hilsheimer
82b1f4b90d Fix compiler warning when comparing integers
Cocoa's columnArray::count is an unsiged int, resulting in a compile
warning when QCOMPARE'ed with a signed integer literal.

Change-Id: I420a9e89bba5feeb9d8a040a06e6ba0e209c82f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-12 20:10:11 +01:00
Kai Köhne
ae3224bf92 Document the qt_add_plugin() options new in Qt 6.5 as such
Task-number: QTBUG-104189
Change-Id: Ic2d27debd689757836478a55d3927ce9bbcd3849
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-12 19:25:45 +01:00
Kai Köhne
098b097324 CMake: Remove qmake conversion markers from gui/CMakeLists.txt
The 'special case' markers were used by the conversion tool. Now
that the .pro files are gone, we can get rid of them.

This is also true for other comments that refer to the .pro file.

Change-Id: I973e9b2647ecf49137209b7fed2f13b213c0bbe9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-12 19:25:45 +01:00
Eskil Abrahamsen Blomfeldt
58907dfa81 Try to match variant-selector font to preceding character
Variant-selectors are special unicode symbols which are used to
modify glyph selection for the preceding character. For instance,
a regular symbol could be turned into a color emoji using VS16,
the emoji variation selector. In order for this to work, however,
the font that handles the selector has to handle the full pair of
characters, so that it can apply the correct substitution rules.

One specific example of this was on macOS, where an airplane
symbol + VS16 would match the symbol to the default UI font but
the VS16 to the emoji font. Since there string provided for the
emoji font did not have any preceding character for VS16, we just
ignored it.

To improve on this, we now detect variation selectors that have
been matched to different font engines than the preceding
character. When such a case occurs, we check if the selector font
also supports the preceding character, and if it does, we keep
the pair together and use the same font for both.

[ChangeLog][QtGui][Text] Fix some cases where a variation-selector
character would be ignored in font selection and the correct
variant of a character would thus not be selected.

Task-number: QTBUG-108799
Change-Id: I9f427e0520e652ee2f24a4f7dc3c1957251e06bd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-12 19:25:45 +01:00
Laszlo Agocs
6e3170b674 eglfs_kms: Prevent drm errors with more than one window during the screen's lifetime
The QML Live Preview tool exercises the problematic case of having a
QQuickWindow, then closing it, then showing another, then destroying
that, ..., and so on.

It seems that the eglfs_kms backend does not handle this gracefully:
if there was a page flip issued for a window that is then closed, the
new window will result in drm errors (like -22 EINVAL) because the
logic gets confused due to holding on to surface buffers from the old
window.

To remedy this, make sure the same cleanup is performed on a failing
atomic commit as it is done on the non-atomic code path. In addition,
reset more things in resetSurface().

Change-Id: I7e13dbbf4d74b4ed9beaf71472680a0daafb4f95
Fixes: QTBUG-82104
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-12-12 19:25:44 +01:00
Friedemann Kleint
2d20406f59 Vista Style: Use correct action icon pixmaps matching the device pixel ratio
Extend change 5911335756 to the Vista
style (using the paint device's ratio).

Pick-to: 6.4
Fixes: QTBUG-108440
Task-number: QTBUG-85885
Change-Id: Ib0b5fcc943a18896b770b382b39bbb684238a618
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-12 18:40:54 +01:00
Venugopal Shivashankar
725b641d87 Doc: Add margins to all anchors in a translated page
Google translate drops the space around the non-translatable
inline text. This should ensure that inline anchors have extra
margins.

Change-Id: I1c204a9a27d0a39256ef04aa3f03ba1b8433aa54
Done-with: Topi Reinio <topi.reinio@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-12-12 14:14:22 +00:00
Tor Arne Vestbø
da754d5b65 macOS: Use NSStatusItem.menu to manage system tray menu
Using [NSStatusItem popUpStatusItemMenu:] to manually show the menu is
deprecated, and was causing various issues when right clicking the menu,
such as not unhighlighting the menu item when dismissing the menu, or
worse, not quitting the application if a 'Quit' item was triggered from
a right click.

The reason we were using popUpStatusItemMenu instead of the menu
property of NSStatusItem was that the latter prevented us from seeing
the action message of the NSStatusItem button, which we used to emit
the system tray's activated signal, but this can be solved by listing
for the menu's tracking state starting.

Fixes: QTBUG-103515
Pick-to: 6.4
Change-Id: I686550ebac7d94d8d11b2e3c49ed16a8240cb214
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-12 15:14:21 +01:00
Eirik Aavitsland
4a5abfcea4 wiggly example: add support for emojis etc. (utf16 surrogate pairs)
The venerable wiggly example was created before unicode support was
added to Qt. Hence, when extracting the individual characters from the
string for painting, the code was not prepared to handle that some
characters, like emojis, are composed of two QChar elements.

Fixes: QTBUG-28853
Change-Id: I9804415f92775e2b78fa9fcaf7a2d112153cdce0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-12 12:33:20 +01:00
Axel Spoerl
6a3627b6c5 Set geometry property in QXcbWindow after checking minimum size
QXcbWindow::create() bound the window's size to windowMinimumSize(),
after its size had been inherited from parent().
QPlatformWindow::setGeometry() was called before that sanity check.

When a fullscreen window is re-mapped from a deactivated screen to the
remaining screen, the call to QPlatformWindow::setGeometry() assigns
an invalid QRect to QPlatformWindowPrivate::rect
The negative int values x2 and/or y2 cause
QXcbBackingStoreImage::flushPixmap to address unmapped memory and
crash.

This patch moves the call to QPlatformWindow::setGeometry() from
before to after bounding to a minimum value. That assures a valid
rectangle to be assigned in all cases.

Fixes: QTBUG-109226
Pick-to: 6.4 6.2 5.15
Change-Id: I349a0f3c721059a9013a275de5b4cb147fbdd7a1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-12-12 09:47:03 +01:00
Ben Fletcher
0943b5d65d RHI: QShaderDescription storage buffer qualifiers / run time stride
Add storage buffer memory qualifier and run time array stride information
to QShaderDescription::StorageBlock.

Memory qualifiers allow more informed selection of RHI resource buffer
binding (bufferLoad / bufferStore / bufferLoadStore) function.

Run time array stride (for last block member unsized array) allows
packing of buffer data for transfer to / from GPU. Without this
information, applications must infer or guess which packing rules
(std430 / std140) are in use.

Change-Id: I676d7e848afefd40d01cdd463c569b07022b683e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-11 11:05:24 -08:00
Ahmad Samir
2fe3b0e564 QContainerTools: add q_points_into_range overload
Looking at the use-cases of the already existing q_points_into_range
overload, all of them can be ported to the new one (i.e. all of them
were using range [begin, end)).

Change-Id: I4bfdd68271512b88a9800a16237ff967a367eaeb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-11 15:44:26 +02:00
Marc Mutz
fa2153bd10 Optimize QXmlStreamWriterPrivate::doWriteToDevice(QStringView)
Use a stack buffer, and perform the recoding from U16 to U8 in chunks.

Since no-one so far managed to get a chunked QStringEncoder to produce
the same output as the test expected, at least not without additional
API, fall back to the raw QUtf8 functions. This also avoids the
indirect function call overhead that QStringEncoder would entail.

Fixes: QTBUG-109284
Change-Id: Icaa26c3988ac8506c9cf3fde18fd5892e5e63ef2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-11 10:46:52 +00:00
Marc Mutz
be3fbd8045 QXmlStreamWriter: remove unneeded QStringView::toString() calls
Now that QXmlStreamWriter's APIs take QAnyStringView, there's no need
to convert the QStringViews we get from e.g. QXmlStreamReader APIs to
QString first.

Task-number: QTBUG-103302
Change-Id: Iab33dbfb5da7b3501cae0d0ab7f7ecdb61cca784
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-11 11:46:45 +01:00
Marc Mutz
6551ec5cfd QXmlStreamWriter: remove unused [[maybe_unused]]
Q_ASSERT() already ensures its argument gets compiled even with
QT_NO_DEBUG, but then skipped as dead code.

Task-number: QTBUG-103302
Change-Id: I6614b23967e2bb506e52f1493526564a0b5955be
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-11 11:46:34 +01:00
Marc Mutz
ede4a508ce QXmlStreamWriter: remove Private::write(data, ptr)
... and port the last remaining user over to the QAnyStringView
overload.

Task-number: QTBUG-103302
Change-Id: I7edd855d6c2bc16180c642191aa0d477586c1e0b
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-11 11:46:24 +01:00
Ahmad Samir
59fb33e095 QString: add convenience method converting latin-1 into a QVLA
Less code duplication, as "convert Latin-1 data to Utf16 and store in a
QVLA" is used in various places.

Change-Id: I861f5b8f988411d400db0440b0f5a56c5365e990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-10 23:37:20 +02:00
Lu YaNing
d84d7d36af Clean up dead code
Amends commit ce73b4db62

Change-Id: I4ed0fc817882e06b16aa9eed959d4a10730d37ac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-10 22:40:28 +08:00
Alexandru Croitor
0f5af511ea Revert "coin: Build qmake examples in non-qtbase repos"
This reverts commit 3cb3218797.

Reason for revert: Breaks in qtdeclarative

Change-Id: Iefe2954826bca80ebb2aecb8e8d8367290c218d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 10:50:20 +00:00
Alexey Edelev
a02750d12f Isolate freetype feature
If freetype feature is not enabled we don't deliver its header
files as part of Qt. The freetype font database was used
as the generic fontdata base for unix platforms. This uses
QPlatformFontDatabase as the generic one if neither fontconfig
nor freetype features are enabled.

Fixes: QTBUG-109270
Change-Id: I9e935fd1557db417eb94d44b6a0d88818d567fbe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-10 11:44:39 +01:00
Fabian Kosmale
b9c80ecc08 CMake: Add qt 'policy' support
This mimics CMake's policy support. The policy state is stored in an
internal __QT_INTERNAL_POLICY_<policy> variable; by using normal
variables, we gain support for stacking for free.
Policies can be explicitly en- or disable via qt6_policy; that command
also has a GET mode to retrieve them again.
Furthermore, one can now pass min and max version to
qt6_standard_project_setup, to opt in to a certain set of defaults
introduced in a given Qt version.

We add support for policies in QtModuleHelpers, so that we can check for
known policies while building Qt itself.

No actual policies exist yet; but a follow up commit will introduce one
for qt_add_qml_module.

Change-Id: I57a0404c9193926dd499f94cc5f73e359355c0b3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 10:43:38 +00:00
Amir Masoud Abdol
8aae821b5a Fix for misplacement of the qt-cmake-standalone-test in -developer-build
Amend d77ce33082

Change-Id: Idab13c45b15b07e10bee47fff20481581d22dfac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-10 11:43:08 +01:00
Assam Boudjelthia
f3c998510d Fix infinite loop when iterating content uri sub-files/dirs
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.

Pick-to: 6.4 6.2
Fixes: QTBUG-104776
Change-Id: I4643a73a3bd4019bedaa056c35468117bcec18dc
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-10 07:40:11 +02:00
Edward Welbourne
2f440169c0 Adapt to QTimeZone replacing Qt::TimeSpec usage
In the process actually handle all time-spec cases in various places
that only handled UTC or LocalTime, or at least note that they don't
where that's not practical. Also tidy up header ordering and ensure
QDateTime's header is included wherever it's used, while adding the
include for QTimeZone where needed.

Task-number: QTBUG-108199
Change-Id: Ic1a5cdf0aaf737bf1396aa8ac58ce2004cef7e19
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-10 06:39:44 +01:00
Edward Welbourne
8c8d6ff7b6 Deprecate QDateTime methods using plain Qt::TimeSpec
As foreshadowed when QDateTime adapted to route all QTimeSpec use
through QTimeZone, this commit deprecates the old API in favor of the
newly more capable QTimeZone-based API.

Fixes: QTBUG-108199
Change-Id: I9a3f9f94d4a5d8cc229db72b3e4731a9e318a076
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-10 06:39:33 +01:00