Commit Graph

65770 Commits (039b2e4e5dca0fbf98a10fe548467034eeddf117)

Author SHA1 Message Date
Marc Mutz 039b2e4e5d QTzTimeZoneCache: don't hold mutex while parsing files
The QTzTimeZoneCache::findEntry() function is always called with
QTzTimeZoneCache::m_mutex held, from its only caller,
QTzTimeZoneCache::fetchEntry().

However, findEntry() performs quite heavy parsing, reading
e.g. /etc/localtime or a file in /usr/share/zoneinfo/. These files are
larger than 2KiB file on my system.

Even though findEntry() doesn't touch m_cache during its operation¹,
it thus prevents other threads from looking up (and even parsing)
other entries in the cache.

A straight-forward solution is therefore to drop the mutex in
fetchEntry() for the duration of the findEntry() call² and then
re-acquire it for the final m_cache.insert().

This means, of course, that more than one thread could parse the same
file concurrently, and then one of the thread's result would be
discarded. Having the file already in the OS cache makes this probably
less of an issue than it sounds, but more complicated protocols are
readily implementable, should it become necessary. QTBUG-122138 has a
sketch.

¹ It's a static function, so it cannot access NSDMs.
² Incl. the heap allocation required to store the result in QCache.

Fixes: QTBUG-122138
Pick-to: 6.7
Change-Id: If0cba6d041fb21a48cbde6b43190662a2c55cd25
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-16 14:20:50 +01:00
Giuseppe D'Angelo 913f4f1a6f QDataStream: also disable streaming of member pointers
2fd4a86dc5 disabled the streaming
of pointer with QDataStream, as they would otherwise accidentally
select the `bool` overload. Do the same for member pointers.

Change-Id: I4910953a2856957518b4e51bdc4a0c26d75addab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-16 14:13:09 +01:00
Christian Ehrlicher 8eb599566e QDockWidget: fix dock buttons size
The previous fix calculated an icon size of 12 instead 10 for the icon
size when SH_DockWidget_ButtonsHaveFrame is set. This lead to a too
large icon. It was also rendered blurry because there was no native png
with 12x12 pixels so it has to be scaled.

This amends 04f4b27774

Pick-to: 6.7
Fixes: QTBUG-122214
Task-number: QTBUG-118643
Change-Id: Iaf332a21681e5b84222299d79d4b28d0c26b0cda
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-16 14:13:09 +01:00
Lucie Gérard 76a7057bf5 Change wasm files license
The other files in this directory are non-LGPL

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9c319f723dafd7205029d7632c456412d1a3010b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-16 09:05:44 +01:00
Mårten Nordheim 1dd89bfb04 QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUG
Because there is no other way to stop it from printing the output.

Pick-to: 6.7 6.6 6.5
Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-16 00:33:46 +01:00
Marc Mutz 7192b11841 Avoid double-lookup in QLibraryStore::findOrCreate()
The code is in a critical section, so don't waste time traversing the
QMap twice.

Now that two previous commits have re-arranged the code such that
lookup and insertion are symmetric, we can combine them into a single
lookup using operator[].

Pick-to: 6.7 6.6 6.5
Change-Id: I4a10cece65b8c35d05a9b80967bf15d2e15bd73f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-15 22:29:53 +01:00
Andreas Eliasson 57388179a4 Doc: Fix readString() and readByteArray() code snippets
Both of these functions return a StringResult, which has no
StringResult::code member. Instead, use the existing
StringResult::status member.

Fixes: QTBUG-122254
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I0b9bfa1fc9a30e9c542ab90f3d8f4243bdeda762
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-02-15 21:35:00 +01:00
Ahmad Samir 026e1e3fdb QTimer: use QTest::ingoreMessage() for negative internvals tests
Pick-to: 6.7 6.6 6.5
Change-Id: I87d095b748a7488a71b22710ab7ed72d9451c769
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-15 22:35:00 +02:00
Lucie Gérard 039d51835f Correct license in widget/kernel
According to QUIP-18 [1], all module files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only
LGPD and non-LGPL licenses should not be mixed in a
given directory.
The files in this patch now match the other files
in the same directory and QUIP-18 rule.

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: Ied60c775fbae38d6edeabc669f782b39d02c28f4
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-15 21:34:59 +01:00
Tor Arne Vestbø 7a512d1267 iOS: Propagate focus changes to VoiceOver
Changing the focus object should update the VoiceOver focused element,
the same way we do it on macOS.

There's no NSAccessibilityFocusedUIElementChangedNotification on iOS,
but we can pass the focused element as an argument when posting the
UIAccessibilityLayoutChangedNotification.

The class method on QMacAccessibilityElement to get an element for
an QAccessible::Id was not used by any callers, and has been modified
to resolve the container from the QAccessibleInterface, so that we
don't need to plumb that all the way from the focus change event.

Inspired-by: Jan Möller <jan.moeller@governikus.de>
Fixes: QTBUG-114608
Pick-to: 6.7 6.6 6.5
Change-Id: I2e43ae649bc7e3a44c1e1200e8de66bf420b1949
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-15 21:34:59 +01:00
Marc Mutz af051f9be2 QVarLengthArray: re-publish Prealloc as a nested PreallocatedSize
This gives users of the class easy access to the Prealloc template
argument, without having to write a pattern-matcher like

   template <typename T>
   constexpr qsizetype preallocated_size_v;
   template <typename T, qsizetype N>
   constexpr qsizetype preallocated_size_v<QVarLengthArray<T,N>> = N;

first.

[ChangeLog][QtCore][QVarLengthArray] Added PreallocatedSize nested
constant, equal to the Prealloc template argument.

Change-Id: I928eaa5e62967445cdd7b0c2759567483fdb8997
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-15 17:44:36 +00:00
Tinja Paavoseppä e703feea40 Android: Request QtEditText focus when its window is touched
This allows switching focus between different Qt windows,
which combined with the previous changes enables keyboard
focus for child windows.

Task-number: QTBUG-118139
Pick-to: 6.7
Change-Id: I4b237166dee264a22b2e3dd1ca4d82e0cfce376b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-15 19:44:35 +02:00
Petri Virkkunen 2c192c6f5f Android: QtActivityDelegateBase listens to focus events from child views
In order to detect gaining/losing and moving focus between windows,
implement GlobalFocusChangeListener for the root View.

Add a surfaceFocusChanged native function in QAndroidPlatformWindow in
order to follow these focus changes.

Task-number: QTBUG-118139
Pick-to: 6.7
Change-Id: Ia9bf6249c28a420f42793a9829aef31b12757630
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-15 19:44:35 +02:00
Tinja Paavoseppä f4050cc5ea Android: Move QtEditText to QtWindow
Every QtWindow has its own QtEditText. QtInputDelegate
uses QtEditText from the QtWindow which has the focus.

QtEditText is a View class which handles the creation
of the input connection, and encapsulates other various
keyboard input related functionalities. Previously
we have only had one, which requests focus when the
software keyboard is opened. However, with the
introduction of child windows, it does not make
sense for all the windows to operate through this
one instance.
Furthermore, since it always needs to have focus
to be able to open the software keyboard, this
leads to a bit surprising behavior in the focus
chain if we want to make each window focusable,
not just the top level one. Having each window
have its own QtEditText makes sure when a window
gets focus, the focus doesn't leave outside
of the matching view's own scope, making it easier
to handle.

This should also make it easier to clean up keyboard
input related events tied to a window when that window
is removed.

Task-number: QTBUG-118139
Pick-to: 6.7
Change-Id: Idd1a9407bc0c48660f2885d3bda28e46d42c08a0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-15 19:44:35 +02:00
Eirik Aavitsland 4449dbe737 Baseline tests: avoid rendering items that are blacklisted on the server
Blacklisting items on the baseline server would avoid any mismatch
failures for such items. However, they would still be rendered. That
is undesirable if the rendering itself has unwanted side effects for
such items, e.g. crashing the test executable.

Fix by adding new functionality in the baseline testing framework to
allow checking blacklisting status ahead of time, and add a new macro
QBASELINE_SKIP_IF_BLACKLISTED to do just that.

Add usage of that macro to the QPainter baseline test.

Pick-to: 6.7 6.5 6.2
Change-Id: I35f6df8cff2c6cb985c25ab5470cd42b53d44940
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-15 18:44:35 +01:00
André Klitzing ad8047daf1 Fix documentation of used digest and signature algorithm
SHA-256 is used since 2019.
This amends c9f8893000.

Pick-to: 6.7 6.6 6.5
Change-Id: I005aa3414e4606045c8c3b01d71547efcf4122ba
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-15 16:24:29 +00:00
Tor Arne Vestbø ef37889845 macOS: Expand and tighten plumbing of QWindow's requested color space
A QWindow can have a requested target color space via its QSurfaceFormat.
This allows users who know what color space their source material is in,
or who do their own color matching, to ensure a consistent target color
space.

In the past we plumbed this to NSWindow's colorSpace property. This meant
that you could only have one color space per top level, even if child
windows were in play, and we could only set the color space if we were
the ones creating the NSWindow, failing the color space request in cases
where the window was embedded in a non-Qt window hierarchy.

We now store the requested color space in our QNSView, and propagate it
to both the IOSurfaces we use in QCALayerBackingStore, and to the view's
layer, in case it's a CAMetalLayer. We also pick up any changes to the
backing properties of the view, and ensure we update the color space
accordingly.

We still propagate the color space to NSWindow, as for OpenGL we don't
use CAOpenGLLayer (which has a colorSpace property), but instead use
NSOpenGLContext. This is not something we're going to change, so as
a workaround we set the NSWindow color space, which does affect GL
drawing via NSOpenGLContext. The granular color spaces we set on
the IOSurfaces and CAMetalLayer will override the NSWindow state.

Pick-to: 6.7
Change-Id: I5d9765d95140b8523ee09f70ff09a8c9400ffdc7
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-02-15 16:27:19 +01:00
Mårten Nordheim 775a57f266 tst_QNetworkReply: Try to stabilize qtbug68821proxyError
The test is a bit silly, it was originally written to make sure that
we produce meaningful errors when trying to connect to a proxy server
where the connection is refused or the server doesn't respond at all.

To test that, it creates a local QTcpServer and starts listening to any
free port (by specifying port 0) and then it closed the server and
uses the address-port of localhost:serverPort as the proxy to use, since
we know it _was_ unused, since we were able to bind to it.

However, just calling close() doesn't immediately tear down the internal
socket descriptor, so the OS may still have the port reserved for
some time.

By moving the QTcpServer to a narrower scope we will quickly destroy it
and the internal socket engine, which is parented to the server, and
this in turn releases the socket descriptor.

Pick-to: 6.7 6.6 6.5
Change-Id: If12128fc21d1f545df152f08f0d52c1b14ac6037
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-15 16:27:19 +01:00
Eskil Abrahamsen Blomfeldt de3d5dd73b Fix kerning errors when using DirectWrite backend
There were a couple of errors when calculating advances
in the DirectWrite font engine: First of all, we would
apply the CLEARTYPE_NATURAL glyph metrics when using
GDI_CLASSIC rendering, causing text to look compressed
in some places, because we always passed TRUE for the
useGdiNatural parameter to GetGdiCompatibleGlyphMetrics().

In addition, we would pick the GDI-compatible metrics even
when design metrics had explicitly been requested on the
layout. This is the case for distance field rendered text,
which always operates with design metrics and scalable
layouts, so it was visible as kerning errors on some text
there.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122139
Fixes: QTBUG-122167
Change-Id: Ic28da6b3235d7af0452bdcb836e037594f8a20ba
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2024-02-15 14:51:37 +01:00
Rym Bouabid 760043ea8c QDir: Use QT_TEST_EQUALITY_OPS macro in unit-tests
Replace QTestPrivate::testEqualityOperators() helper function with
QT_TEST_EQUALITY_OPS macro to get a reasonable debug output in case of
failure.

Task-number: QTBUG-120303
Change-Id: I1ca23cabfe62ab78e012cf95fd2add631fc88a64
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-15 14:51:37 +01:00
Alexey Edelev 02e516281b Fix framework headers copying when module don't have header files
Amends 103eca1070

Change-Id: I3caae60c022cd46a6d33691760b619920d6e778e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-15 14:04:44 +01:00
Matti Paaso 0d9c92bfdf Fix mount command
Mount on Virtual machine uses NFS version 4 as default,
and it was causing disk I/O errors when trying to access disk.
Forcing the mount use NFS version 3.

Change-Id: Ibc5958d8a7e71c463ffa9c3282344c08b2c5019a
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2024-02-15 09:52:52 +02:00
Alexandru Croitor b3cc89e81c CMake: Fix AUTORCC_OPTIONS INTERFACE_LIBRARY error with CMake 3.16
Make sure not to set the AUTORCC_OPTIONS property on INTERFACE_LIBRARY
targets, because it's not allowed with CMake versions lower than 3.18.

Amends 329dbfcc78

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122266
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Task-number: QTBUG-121948
Change-Id: I9ab606c0b11e2b4f8689e0bde9c001f59c81fa42
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-15 08:32:06 +01:00
Volker Hilsheimer 5b993fa8ed AppleIconEngine: fix aspect ratio adjustment
The requested icon might not be square, so fit the image
we have correctly into the requested size.

Fixes: QTBUG-121764
Pick-to: 6.7
Change-Id: I877dedf5aa779cd82a75a1a49b26c08e3cea6163
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-15 05:07:22 +01:00
Volker Hilsheimer 477381993a Iconbrowser: render theme icons as list with large icons
In icon mode, the name of the icon gets truncated.

Pick-to: 6.7
Change-Id: I8e2081a68006907ae916c8e8fa1aeb6006acbc6d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-15 05:07:18 +01:00
Shawn Rutledge bf8167c5fc tst_QTextMarkdownWriter: test both ways of setting font characteristics
We have explicit QFont properties, and QTextFormat::setProperty().
Setting FontFixedPitch doesn't necessarily affect the view (QTextEdit or
Qt Quick Text/TextEdit); and setting the font to the one we get from
QFontDatabase::systemFont(QFontDatabase::FixedFont) is also unreliable,
because the "monospace" fallback might actually be proportional.
QTextMarkdownWriter checks for both to decide whether to use backticks;
so markdown writing works if an editor UI makes the format monospace
both ways to be safe. But in the opposite case that the main font is
actually a monospace font, it's always been broken.

The rest of the QTextCharFormat properties are generally working, to
the extent that they are applicable to Markdown. But we lacked explicit
test coverage: so far we were just reading Markdown or HTML and writing
Markdown to test the writer.

Also amend an old comment about writing underlines: writing was always
possible, and since f5c7799f59 reading is
supported too. So the underline support is symmetric (except that we
don't heed the QTextDocument::MarkdownFeatures argument to the writer
ctor: we probably should do that some day).

Pick-to: 6.7
Task-number: QTBUG-54623
Task-number: QTBUG-75648
Task-number: QTBUG-75649
Task-number: QTBUG-79900
Task-number: QTBUG-99676
Task-number: QTBUG-103484
Change-Id: Iacb4ed0ea59030570702d4eadfdadfad872065c6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-14 18:36:42 -07:00
Rami Potinkara 1f6d7cbb34 Android: QtEditText support for full-screen soft keyboard
Full-screen soft keyboard support added. Including functionality
for copy-cut-paste and line change.

Future TODO QTBUG-121522

Task-number: QTBUG-109367
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Ia5632cacc910c7ebde0e40608c2abd027b8f953a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-15 00:59:14 +02:00
Marc Mutz c30195a95e QVarLengthArray: give the default Prealloc a name
... and use that in QVarLengthFlatMap's definition in lieu of a magic
constant.

Amends d4611ba3a5.

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I369f31b643789075ef6c14669b8b794ed0b3bbb1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-02-14 21:59:59 +01:00
Alexey Edelev 7c9efdf40c Add configure mappings for QT_BUILD_<TESTS|EXAMPLES>_PROJECT
Pick-to: 6.7
Change-Id: I1e9f877c4c9b6257f4f90e3361d5a0226e62e841
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-14 20:47:29 +00:00
Rym Bouabid fec4984dc9 QFileInfo: Use new comparison helper macros
QFileInfo had operator==() and operator!=() defined as public member
functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get
rid of these methods and replace them with a hidden friend.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Task-number: QTBUG-120303
Change-Id: Ie290df230b0f608a0965dccba9184382291cad8e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-14 21:47:29 +01:00
Paul Wicking 99b9eb7177 Doc: Fix QDoc warnings for overloads
Change-Id: I9a77b6ea0026748c7f97f73b327118f7a9212d52
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-02-14 21:47:28 +01:00
Paul Wicking f157422c58 Doc: Resolve qdoc link warnings
- Drop link to non-existing documentation.
- Reorder links such that the target becomes the text and vice versa.
- Use correct link target names.
- Add missing qttestlib doc project dependency to qtwidgets.

Pick-to: 6.7
Change-Id: Iaa0ea7b22326c82271b14b17c4b78c3a25a834f1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-02-14 21:47:28 +01:00
Tor Arne Vestbø 986f8b361c QRhiWidget: Register cleanup callback also on first RHI init
The first time ensureRhi() is called we don't have an RHI yet, and will
adopt the top level's repaint manager's RHI. We need to register a
cleanup callback for this RHI, so that if it goes away, we will
reset our RHI pointer to null, just like when we switch from one top
level to another (and get a new potential RHI).

Without the reset, we would be working with a stale QRhi pointer,
which we in most cases updated via a call to ensureRhi(), that
picked up the new QRhi, but for good measure we should reset it
if we can.

Pick-to: 6.7
Change-Id: Iac6d8787b636675bbcb4358e8f0baad26187b0e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-14 18:51:29 +01:00
Tor Arne Vestbø 6fbbbef260 QRhiWidget: Tear down resources before window has changed
We were handling QEvent::WindowChangeInternal, but based on what the
code is doing, what the comments say, and what QQuickWidget does,
the right event should be WindowAboutToChangeInternal.

This fixes a crash when reparenting a QRhiWidget into another widget,
where we could call removeCleanupCallback() on an RHI that was already
gone.

The fact that we have a stale RHI pointer at WindowChangeInternal time
is still problematic, and caused by our call to addCleanupCallback not
happening as it should for the first call to ensureRhi(), but this will
be fixed in a follow up.

Pick-to: 6.7
Change-Id: I054120e97a24a1f74af44b2d251470792f03f7f3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-14 18:51:29 +01:00
Even Oscar Andersen 1ca7368d59 wasm: Add corelib/io/qdataurl autotest
Change-Id: I69ac2f0c5b364e3d006d3605383a7dd8cdecb887
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-02-14 18:24:39 +01:00
Joerg Bornemann dd970940ba CMake: Fix custom QT_DEPLOY_TRANSLATIONS_DIR on Windows
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-121880
Change-Id: I7747253ae2671b2d417b25f0a98bc13871a661e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-14 18:24:39 +01:00
Joerg Bornemann 527b9da538 CMake: Fix custom QT_DEPLOY_QML_DIR on Windows
The value of QT_DEPLOY_QML_DIR was never passed to windeployqt.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-121881
Change-Id: I993793f74d84ccb0e7c2deb72b1e33e81692ecbb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-14 18:24:39 +01:00
Mårten Nordheim 3c8d717964 QLocal8Bit::convert{To,From}Unicode[win]: use more of state
Like other backends we should increment the invalid character count
when we output a replacement character.
And we should also output the NULL character if requested!
The downside here is that convertFromUnicode doesn't even have the
ability to do so. So instead I added a comment explaining why it is not
handled there.

Task-number: QTBUG-118318
Pick-to: 6.7 6.6 6.5
Change-Id: I57ba631aa59454e77007ab353277b7e8c2b5526a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-14 18:24:39 +01:00
Ahmad Samir 2956b84332 QFilesystemWatcher: speed up the unittests
The only backend that requires longer wait times is
QPollingFileSystemWatcherEngine; lower the interval of the polling
engine for the unittests (using the same objectName() trick that is used
to force using a specific watcher engine).

Remove the comment about FAT32 filesystems, there is no where on the CI
where this test fails so far.

Before:
Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 127027ms

After:
Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 666ms

Change-Id: I96378f810463fa5c4ebdc13946ea23810e80f144
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-14 17:57:03 +02:00
Juha Vuolle 2514d2cc1b Inline old QNetworkAccessManager transferTimeout int overloads
Qt 6.7 introduced new std::chrono variants of the transfer
timeout functions. We can now inline the old 'int milliseconds'
functions to reduce the  number of DLL entry points when one
isn't needed.

Task-number: QTBUG-122023
Change-Id: I18e0ed424fa4da1dde67c811e0f3744edf24b5f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-14 17:57:02 +02:00
Juha Vuolle 6c213653d0 Inline old QNetworkRequest transferTimeout int overloads
Qt 6.7 introduced new std::chrono variants of the transfer
timeout functions. We can now inline the old 'int milliseconds'
functions to reduce the  number of DLL entry points when one
isn't needed.

Task-number: QTBUG-122023
Change-Id: Iedcb6d0035bc6c3f03b87de543e9b02937b755e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-14 17:57:02 +02:00
Philip Schuchardt f21af7f88b Synchronize read buffers on non-Apple Silicon in RHI
Read buffers are not automatically synchronized when the
buffer uses MTLResourceStorageModeManaged. This commit adds
GPU to CPU synchronization for managed buffers, ensuring
proper data transfer for reading operations on non-Apple
Silicon devices.

Fixes: QTBUG-119447
Pick-to: 6.6 6.7
Change-Id: I6398f4f27d00950c7dceae918b04e0054d4b5647
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-14 16:57:02 +01:00
Lucie Gérard ee8822168c Change license in test file
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I701e707447ca68977bdd80662200eb0c36545dbe
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-14 15:23:05 +01:00
Alexey Edelev 103eca1070 Change the mechanism that copies framework header files
Split the header copy custom commands into two blocks and add
<module>_sync_headers_fw_copy target that is responsible for the copy
of CaMeL-case header aliases. For the Ninja generator we leave the
file-level dependencies between the <module>_sync_headers_fw_copy
target and header copy commands. For the Unix Makefiles generator we
put the command directly to the target to make sure it's executed by
make.

Also add the explicit commands for creating the output header
directories.

Fixes: QTBUG-122200
Pick-to: 6.5 6.6 6.7
Change-Id: I71ba716d17a879f20ae0869cf2257d246ac17eff
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-14 10:47:41 +01:00
Alexey Edelev 0b79ee6d3b Make possible partial tool lookup when using QT_HOST_PATH
Consider QT_HOST_PATH when setting the QT_WILL_BUILD_TOOLS flag.
In this case if we do not crosscompile or require building tools
aka QT_FORCE_BUILD_TOOLS=ON, we may by pass tool_FOUND check and
assume that we will try building the missing tool.
Set qt_require_find_tools GLOBAL property to indicate the tools
lookup requirement.

For tools that can be found we will try re-using them from
QT_HOST_PATH, but not building from scratch.

Change-Id: I94e92f62eb799308e38721b4d580052bb4bb35f9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-14 10:47:40 +01:00
Kai Köhne 4c58e16882 Clean up about Qt dialog text
* Use https instead of http
* End Ltd with a dot (it's an acronym)

Change-Id: Ie94b57245b37461a2ca3af629879d886060f9fe3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-14 10:30:07 +01:00
Kai Köhne 6ea922b584 Remove year from generic Qt copyright information
While at it, also add the missing dot in Ltd. (as
it's an abbreviation). Also, prefer https:// over
http://.

Fixes: QTBUG-121906
Task-number: QTBUG-121928
Pick-to: 6.7 6.6
Change-Id: I4e1f1563376ae36b3c260359d830f00969ab9351
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-14 09:30:07 +00:00
Shawn Rutledge 65c40290b4 QTextMarkdownWriter: Don't word-wrap headings
If it wraps, the text on the next line is no longer part of the heading.

Fixes: QTBUG-106526
Change-Id: I8015c948d875c6944422ef3439e3128af5b2a2e2
Pick-to: 6.5 6.6 6.7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-13 21:38:00 -07:00
Shawn Rutledge 908fc2e72b QTextMarkdownWriter: Avoid omitting or misplacing ending indicators
If we need to word-wrap a paragraph after a long formatted span,
write any ending markers before the newline (amends
280d679c55 ).

Break before a fragment if the whole thing is past the column limit;
in that case, write out any ending format markers before the newline.

And now we have test coverage: prepend characters one-at-a-time to a
line that already has a two-word formatted span at the end, and watch
it successively break after the span, in the middle, and then before,
while never putting a newline before the ending markers or failing to
write them.

Fixes: QTBUG-116927
Change-Id: I140e10d19a491cb599bf7ecf8514af866b5383f3
Pick-to: 6.5 6.6 6.7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-13 21:37:43 -07:00
Shawn Rutledge f3e528b97f QTextMarkdownWriter: Handle lists in blockquotes correctly
But we do not yet handle a blockquote in a list item. Presumably
that's less common anyway.

We now also continue block-quote prefixes onto blank lines
within a block quote, which looks more normal.

Pick-to: 6.7
Task-number: QTBUG-104997
Change-Id: I2b5642cf3a0c81a94444a33f026a02ad53e7e6bb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-13 21:14:23 -07:00