65727 Commits

Author SHA1 Message Date
Assam Boudjelthia
ff6a6d3285 Android: fix style extraction when set to none
If extract_android_style meta data is set to none currently the app
still tries to extract full stlye and crashes. If this option is set
no style data should be extracted after this patch.

Pick-to: 6.7
Fixes: QTBUG-121667
Change-Id: I764e1eb6a582073196f991ca930d245d17a1f7e5
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-02-06 17:23:42 +02:00
Oliver Dawes
63c8c1e862 Guard against nullptr cmdAllocators Release call
It is possible for a QRhiD3D12 instance to be created and destroyed
before the cmdAllocators list is initialized. This change simply
guards the cmdAllocators so that Release is only called if the
element is not nullptr.

For an example of how this can happen see QRhi::create. The
QRhiD3D12 is created but may be released immediately if
QRhiD3D12::create fails. One way this may happen is if the
ID3D12Device is removed but in practice many different errors may
cause create to fail.

Pick-to: 6.7 6.6
Change-Id: I395d247a952f9584122be083ac5ca6a3caddf300
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-06 15:23:42 +00:00
Volker Krause
f4e83fccb4 Optimize QTimeZone construction on Android
isTimeZoneIdAvailable() is significantly slower than just trying to
initialize the timezone and see if that worked.

Even in the x86 emulator the difference for this is from 2+ms to no
longer measurable here, on less powerful ARM devices it's even more
extreme. This matters in particular for code creating many QTimeZone
instances, e.g. for calendaring.

Pick-to: 6.7 6.6 6.5
Change-Id: I5f175137b8b71816347a8debb492214427a51104
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-06 16:23:42 +01:00
Krzysztof Sommerfeld
21196d26d8 Make use of methods defined in utils unix layer
Some unix-like concepts are supported by VxWorks VSB layer - UTILS_UNIX.
One of such methods is getgrgid(). Include it in
`qfilesystemengine_unix.cpp`, so that we don't need to exclude VxWorks from code that uses it anymore.

Task-number: QTBUG-115777
Change-Id: I72b301647bfdb208cb6859bb0f9994e3537fc345
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-06 15:23:42 +00:00
Edward Welbourne
79badf1b2c Update Valgrind to version 3.22.0
[ChangeLog][Third-Party Code] Updated Valgrind header used by QtTest.
The change only affects portability of s390 inline assembler.

Task-number: QTBUG-121346
Pick-to: 6.7 6.6 6.5
Change-Id: I7eca3b13d4f5475693c548b85b837d5d4b4b090f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-06 16:23:42 +01:00
Johannes Grunenberg
c05f987fcd QLogging: Add missing newline in win_message_handler()
Neither win_outputDebugString_helper() nor OutputDebugString() add a
newline at the end of the message, so one needs to be added before being
passed to the output handler.
A newline was previously present but removed when deduplicating calls to
qFormatLogMessage().

Fixes: QTBUG-121947
Pick-to: 6.7
Change-Id: I9f1c1d8726e4234f24999f47c52340140d5a4614
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-06 14:32:08 +01:00
Eskil Abrahamsen Blomfeldt
24224f1fe4 Windows: Default to DirectWrite font backend
The GDI font backend is missing support for certain modern features,
and has a lot of work arounds for missing APIs. DirectWrite is the
modern way to handle fonts on Windows, so we make this the default
now, but keep the old backend as a fail safe.

Fixes: QTBUG-119420
Change-Id: I0ea5cdfdcd759ccc894efb01b2410826c44aa1ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-02-06 13:04:26 +01:00
Tasuku Suzuki
bd6d7d4d74 Remove extra semi-colons
Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-06 20:17:18 +09:00
Tinja Paavoseppä
8b601e6dbe Android: Fix QtTextureView inverted opacity condition
The Android TextureView class wants to know whether the view is
opaque, while the condition has been evaluating whether it should be
transparent. Invert the condition to let Android know correctly whether
the TextureView should have transparency.

Pick-to: 6.7
Change-Id: Ic636f78dd3c691e85456c579e4559b8bc7a077a2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-06 09:22:36 +00:00
Tim Blechmann
cadc239c48 corelib: serialization - fix macos unity builds
CarbonCore defines `DEBUG`, which can nameclash with the `DEBUG` define
in the json parser when using unity builds

Change-Id: Ic9f666a1da98aaebe30836abf877228f2f83004c
Pick-to: 6.7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-06 15:18:14 +08:00
Tim Blechmann
6833adffff corelib: remove unused #defines
Change-Id: I66c0d1a78e71cd4ac36d6761d1d9cdf36c30113d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-06 15:03:50 +08:00
Juha Vuolle
d5f3a9095b Add missing QRestAccessManager constructor documentation
Pick-to: 6.7
Fixes: QTBUG-121859
Change-Id: Ie8d9033a8efe36767f47509afe1a46c788cb13ca
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-06 08:11:03 +02:00
Juha Vuolle
118ee59d8c Add missing QHttpHeaders::isEmpty() documentation
Pick-to: 6.7
Change-Id: Ib0d19cabc09d96b3920ade3db4d46b0bb0a6decb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-02-06 06:11:03 +00:00
Tim Blechmann
6b13e0ca59 core/gui: fix odr violation
When linking Qt statically, QtCore and QtGui are not separated into
different DSOs.
when both statically linked versions of QtCore and QtGui are linked into
the same binary with LTO, gcc emits:

```
/usr/src/debug/qtbase/6.3.0-r0/git/src/gui/painting/qicc.cpp:105:
warning: type ‘Tag’ violates the C++ One Definition Rule [-Wodr]
/usr/src/debug/qtbase/6.3.0-r0/git/src/corelib/kernel/qtranslator.cpp:78:
note: an enum with different value name is defined in another
translation unit
/usr/src/debug/qtbase/6.3.0-r0/git/src/gui/painting/qicc.cpp:106: note:
name ‘acsp’ differs from name ‘Tag_End’ defined in another translation
unit
/usr/src/debug/qtbase/6.3.0-r0/git/src/corelib/kernel/qtranslator.cpp:78:
note: mismatching definition
```

we therefore define the `struct Tag` in an anonymous namespace or the
QIcc namespace

Change-Id: Ib4edeede35c51322ab1959d70fb87359b196e59b
Pick-to: 6.5 6.6 6.7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-06 05:03:09 +00:00
Thiago Macieira
9e73917537 QDBusAbstractInterface/Doc: fix example to match the description
The docs say "This example illustrates function calling with 0, 1 and 2
parameters" because it was copied from the synchronous call()
documentation. But the snippet didn't do that, because back in Qt 4 when
this was created, it was too difficult to exemplify that for
asynchronous use. It now no longer is, with lambdas.

Drive-by update the docs for both functions to refer to each other.

Fixes: QTBUG-121873
Pick-to: 6.6 6.7
Change-Id: I664b9f014ffc48cbb49bfffd17b089b7f77c1cde
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2024-02-05 19:36:17 -08:00
Ahmad Samir
366657b951 Remove QT_READDIR_R macro from qplatformdefs.h
readdir_r() has been deprecated since glibc-2.24; all usage of
QT_READDIR_R in qtbase has been ported to readdir() since 2016
4b6784b49c6dcf0add9ec0cbb4ad97cd191c2aa3 (which explains in details the
reasons behind the deprecation).

What's left is the QT_READDIR_R, user code that still uses it, can
switch to readdir_r() (which is not advisable).

[ChangeLog][QtCore] Removed QT_READDIR_R macro; readdir_r() has been
deprecated since glibc-2.24 and it's recommended to use readdir()
instead. For more details see:
https://man7.org/linux/man-pages/man3/readdir_r.3.html

Change-Id: Icca2dca7e696533dcb983a82ba97a13baadcf015
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-06 00:57:17 +02:00
Edward Welbourne
bd07335554 Use short name as QTZP::abbreviation() by default
Also use C locale for this, rather than QLocale().
This makes the ICU backend's override redundant.

Change-Id: I3d668dd3a784b48d0a5fff7d11cc25a6e1423c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-05 23:12:59 +01:00
Edward Welbourne
56d8a751cb Unify the CMake config for QTZP_icu.cpp
The two differed only in one selecting UNIX, the other WIN32; not sure
we have any platforms for which neither of those conditions is true
but, in any case, if such a platform has ICU and enables feature
timezone, I guess we should be using ICU for its timezone backend.

Change-Id: I3a7812c143f18732bf4dae7e8de8e42a662f0f39
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-05 23:12:59 +01:00
Edward Welbourne
46c1936e17 Rework tst_QTimeZone::windowsId() to use initializer-lists
Instead of clearing a list repeatedly to then repopulate it by
appending entries.

Change-Id: I82594d69c1cb145defff43d84f92f8410d8997aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-05 23:12:59 +01:00
Ivan Solovev
83f0796192 Implement QCborContainerPrivate::compact()
... and use it in QCborContainerPrivate::replaceAt_complex() to avoid
unconstrained memory growth in certain scenarios.

Remove the `reserved` parameter, because it was referring to the
elements array, not to the byte data, so it cannot really be used
in the implementation.

Fixes: QTBUG-109073
Pick-to: 6.7
Change-Id: I2e8fe7e4a4bf7a0ce06c87ca657f2bc01bae0341
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-05 21:52:33 +01:00
Tor Arne Vestbø
4dbc267945 iOS: Guard traitCollectionDidChange against lack of QGuiApplication
During shutdown we may get traitCollectionDidChange for our QUIWindow,
as it may outlive the QGuiApplication and the QWindows due to hanging
around in an auto-release pool.

Pick-to: 6.7 6.6 6.5
Change-Id: Ifc6471b933fb1b4d1e83e9b734aac31044dce03e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-02-05 21:52:33 +01:00
Tor Arne Vestbø
483523ad9f iOS: Guard against displayLayer after platform window is gone
During shutdown the UIView might outlive its QIOSWindow platform
window. If we receive displayLayer calls, we need to bail out,
to avoid crashing when trying to send the expose event.

Pick-to: 6.7 6.6 6.5
Change-Id: I2f36a4dd825e91b348bc57a06e6aa6b1a12fd249
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-02-05 21:52:33 +01:00
Christian Ehrlicher
781135b0d2 QSqlDatabase: add Q_PROPERTY
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.

Task-number: QTBUG-120566
Change-Id: I23103a921cd391f24ce0ffd915a4ae2f98686d21
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-02-05 21:52:33 +01:00
Jaishree Vyas
6be61763a0 Doc: QDomDocument doc refers to QXmlQuery which doesn't exist in Qt6
Remove QXmlQuery from the docs

Fixes: QTBUG-120530
Pick-to: 6.5 6.6 6.7
Change-Id: Ic7927375701fbcdf106f90fbea8ea3aac2df8f5a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-05 20:42:48 +00:00
Tor Arne Vestbø
bc7e728fcf iOS: Remove QUIView from superview on QIOSWindow destruction
Unlike on macOS, our UIViews are children of a QIOSDesktopManagerView
that we use to do window management, so we need to remove the view
from its superview, even if represents a top level QWindow.

The only exception is top level foreign windows, which are used to
represent a native UIView for the purpose of containing a Qt view
hierarchy within. As we don't know anything about the foreign view's
superview hiearchy we shouldn't touch it.

Pick-to: 6.7 6.6
Fixes: QTBUG-120369
Change-Id: I6a43bb0a4e72d0d1525a7cc33d572ea7477215b3
Reviewed-by: Doris Verria <doris.verria@qt.io>
2024-02-05 21:42:48 +01:00
Eirik Aavitsland
972bd4ed46 Update bundled libjpeg-turbo to version 3.0.2
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.2

Fixes: QTBUG-121737
Pick-to: 6.7 6.6 6.6.2 6.5 6.2 5.15
Change-Id: I0085f0f859dd9c95ed203fd22bd9702fd1e9d721
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-05 14:09:54 +00:00
Jarek Kobus
0d0810e2dc QObject: fix installEventFilterOrder() test flakiness
Don't rely on timer precision and use int counter instead.

Amends 1fe88bf4cd919d4b5cadb4be2cf0193525c54673

Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I057b4dd51014784ec9b244301b43583f3de6ddd1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-02-04 18:33:37 +01:00
Ahmad Samir
d887e34b49 tst_qdiriterator: add a test for QFsFileEngineIterator
As a baseline for subsequent commits.

Change-Id: Ifac026848e92817b08a75ceafee6d06e0a8f399d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-04 14:04:18 +02:00
Lucie Gérard
ff1039c217 Change license for tests files
According to QUIP-18 [1], all tests file 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: I9657df5d660820e56c96d511ea49d321c54682e8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-02-04 09:56:42 +01:00
Liang Qi
f07d8309d6 QGenericUnixServices: make sure the picker returns a color
This amends b646c7b76c7787cff57bca0fde04d9f58abdfbb8 .

Pick-to: 6.7 6.6 6.5
Change-Id: Ic7183c06a93085d65b31c86380889b78c714548b
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2024-02-03 21:40:13 +01:00
Thiago Macieira
c5f22c54cb qHash: provide the long double overload on Darwin systems
Commit c0791ac76ec7cfdc3945efa67a6f72ee3623413c didn't explain why it
was #ifdef'ed out. It's just an alias for double. Maybe compilers at the
time used to complain if you used it, but I can't make Apple's clang
produce a warning now.

Pick-to: 6.7
Change-Id: I664b9f014ffc48cbb49bfffd17b02293403e9571
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-02-03 07:33:00 -08:00
Marc Mutz
a327117c0d QBitArray: defend resize() and fromBits() against negative sizes
Use the same technique the constructor already uses: Q_ASSERT followed
by selecting the no-op branch in case assertions are compiled out.

Pick-to: 6.7
Change-Id: I24cbcfd686f67e060134baecfb21044948b6eb98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-03 08:33:28 +01:00
Marc Mutz
6504496c64 QBitArray: use QDataStream::SizeLimitExeeded where applicable
[ChangeLog][QtCore][QBitArray] Uses new
QDataStream::Status::SizeLimitExceeded now, where applicable (was:
WriteFailed, ReadCorruptData).

Pick-to: 6.7
Change-Id: If5a8db9c6b2f104b40266784d88cf7cad0b0ce73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-03 08:33:14 +01:00
Shawn Rutledge
9fa471b72d Fix frontMatter tests: fixed fonts and testdata
When the main font is a fixed-width font, QTextMarkdownWriter generates
backticks around plain text; so QEXPECT_FAIL if we detect that.

tst_QTextMarkdownWriter::frontMatter() Compared values are not the same
   Actual   (output)                  : "---\nfoo\n---\n`bar`\n\n"
   Expected ("---\nfoo\n---\nbar\n\n")

Also, include all test data as resources for platforms that need it
(such as Android).

Task-number: QTBUG-103484
Change-Id: If18ca493c402b128cdc0fb1910b2e822512af6e8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-02-02 20:14:45 -07:00
Shawn Rutledge
bffddc6a99 Extract and re-write "front matter" in markdown documents
It's increasingly common for YAML to be used as metadata in front of
markdown documents. md4c does not handle this, so we need to remove
it ahead of time, lest md4c misinterpret it as heading text or so.

The --- fences are expected to be consistent regardless of the format of
what's between them, and the yaml (or whatever) parser does not need to
see them. So we remove them while reading, and QTextMarkdownWriter
writes them around the front matter if there is any.

If your application needs to parse this "front matter", just call
qtd->metaInformation(QTextDocument::FrontMatter).toUtf8() and feed that
to some parser that you've linked in, such as yaml-cpp.

Since YAML is used with GitHub Docs, we consider this feature to be part
of the GitHub dialect:
https://docs.github.com/en/contributing/writing-for-github-docs/using-yaml-frontmatter

[ChangeLog][QtGui][Text] Markdown "front matter" (usually YAML) is now
extracted during parsing (GitHub dialect) and can be retrieved from
QTextDocument::metaInformation(FrontMatter). QTextMarkdownWriter also
writes front matter (if any) to the output.

Fixes: QTBUG-120722
Change-Id: I220ddcd2b94c99453853643516ca7a36bb2bcd6f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-02 20:14:28 -07:00
Volker Hilsheimer
216af5d7f9 Fix usage of std::enable_if_t to SFINAE out QProperty APIs
Declare an IfUntypedPropertyData alias and use that consistently.

Amends 311f8896322bcd39d33369c8311a8c89ccdad449.

Pick-to: 6.7
Change-Id: If36ef8e2f9ce25e0ffe7b4b448c31ea5866acfc3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-02-03 00:48:20 +01:00
Volker Hilsheimer
4b64df5650 Reapply: Remove const/ref debug operator for QDockWidget
QObjects are usually passed by pointer, so we leave the override
taking a pointer.

This amends bbeff2a3350dd3396400865525d509b784c2d93e, and reverts
the previous revert in b148a362c36a9b34b0c21c60530353d6bf6b92cb.
Now that we have removed the incorrectly added operators from the
6.6 branches entirely, we can remove the unnecessary const/ref
operator from 6.7.

Task-number: QTBUG-119952
Pick-to: 6.7
Change-Id: Id196367ddf3ffb443db44194002f850dcfec5d79
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-03 00:48:19 +01:00
Giuseppe D'Angelo
1aa16094c0 QPrintEngine: emit CMYK colors as CMYK when printing in PDF
When printing in PDF, QPrintEngine used to convert every color to
RGB. Stop doing that -- if the user paints with a CMYK color, emit
it in CMYK.

Change-Id: I2714d243103501e4602dec9f225f5379ed8f7dec
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-02-03 00:04:38 +01:00
Giuseppe D'Angelo
97ca5f6161 QPdfWriter: use DeviceGray when in Grayscale mode
QPdfWriter has "always" supported a grayscale mode in order to
support grayscale printing from QPrinter. When in this mode,
colors were still emitted as RGB, just with equal quantities for
each channel.

But the PDF format itself supports grayscale colors, so
avoid the conversions and emit colors directly in that.

Change-Id: Id5ec3bc42b710909f32986c59d8fbd6f748e02f9
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-02-03 00:04:38 +01:00
Giuseppe D'Angelo
3a7cda715a QPdfWriter: switch the default color model to Auto
If a user specifies a color in CMYK, save it in CMYK by default
(instead of converting it to RGB).

[ChangeLog][QtGui][QPdfWriter] QPdfWriter by default will now
save CMYK colors in CMYK, instead of converting them to RGB.
You can use the setColorModel() function to restore the previous
behavior.

Change-Id: I2a699f99d44c106d59bf0e32c11f9cf9999d16e8
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-02-03 00:04:37 +01:00
Giuseppe D'Angelo
e35dcba5bb QLineEdit: disable cursor blinking on hide
QLineEdit activates the blinking cursor timer when it's shown,
but never deactivates it, resulting in constant wakeups even for
hidden line edits.

Note that this is a workaround. Qt is supposed to send a focus out
event to line edits that get hidden. In some corner cases, it
doesn't, and only a hide event is sent.

Change-Id: Ic0645512051466ca9b1e84c54cef34c22287338b
Task-number: QTBUG-52021
Pick-to: 6.7 6.6 6.5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-02-02 23:12:00 +01:00
Ahmad Samir
e26fbd59d5 QFileSystemIterator: simplify the constructor
Neither implementation (Unix and Windows) uses the QStringList
or the QDir::Filters args.

Change-Id: I6a552e41eb37e4b76246e35d43ac4d34a4ae9d12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-03 00:12:00 +02:00
Ahmad Samir
0516d48ae9 QFileSystemIterator: set errno to 0 before calling readdir()
So that errno can be used to distinguish between "reached end of dir
stream" state and an error.

Set errno to something more useful (EILSEQ) when we fail to decode an
entry's name, requested by Thiago in code review.

Change-Id: I8091144d25e5e5aa875cf40eaf6ee13c9e409ee7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-03 00:12:00 +02:00
Ahmad Samir
3758829162 QFileSystemIterator: manage dirstream with unique_ptr
Less manual resource clean-ups.

Drive-by changes, initialize members in-class. Also remove an unused
include.

Change-Id: I03cd12e1c6c12338d09daba916cd34cb36f04260
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-03 00:12:00 +02:00
Ghenady Kuznetsov
3aa9388056 Fusion style: add right side indent to groupbox title
Add right side indent to the title if groupbox alignment is set to
Qt::AlignRight | Qt::AlignVCenter.

Fixes: QTBUG-121049
Pick-to: 6.7 6.6
Change-Id: I9aac295c824ad774410efd679f59075e4251b611
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-02-03 00:12:00 +02:00
Tasuku Suzuki
2b8a604c40 Fix build with -no-feature-animation
This amends 8eaf01ef818c1b980e2bbce1e8ddd2de638f5028

Pick-to: 6.7
Change-Id: I8e30f232b732b0acb0b6c7070ecfa216fabd64da
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-02-02 22:12:00 +00:00
Wladimir Leuschner
a1f12273b2 QWindows11Style: Draw MDI SubWindows in Windows 11 style
Fixes: QTBUG-120633
Pick-to: 6.7
Change-Id: I6ad4052ca45f7c90cd52a9d2440b508730d3685d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-02-02 22:07:08 +01:00
Eskil Abrahamsen Blomfeldt
0916415ef7 Implement missing features in DirectWrite font backend
The DirectWrite font backend is an optional backend which
is planned to take over as the default on Windows. In order
to do this, though, a few gaps need to be filled in order
for it to pass all autotests.

The following things are covered by this:

1. Bitmap fonts are unsupported in DirectWrite. We enumerate
   these using GDI and fall back to the GDI font engine when
   loading them. As part of this, we introduce a new handle
   type for fonts on Windows which can represent both
   the DirectWrite and GDI engines.
2. "Legacy font names" where sub-family is embedded in the
   family name is now enumerated together with the
   typographic font name.
3. The DirectWrite font engine was not loading kerning pairs
   from the font, like the other engines (omission which was
   detected by the test)
4. Turning off antialiasing does not work with DirectWrite, so
   we fall back to GDI for this.
5. Loading supported writing systems from application fonts
   was not supported.

Task-number: QTBUG-119420
Change-Id: Icf6c351afb0d7487b2f4634199088d701a324aae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-02 18:01:52 +01:00
Shawn Rutledge
16bcdba8e7 Update md4c to 0.5.2
Followup to c29a235833410fde4cb4d502f89129bccd7403f0

[ChangeLog][Third-Party Code] md4c was updated to 0.5.2.

Task-number: QTBUG-121442
Pick-to: 6.2 6.5 6.6 6.6.2 6.7
Change-Id: I097d9aa5f54c59c301a91fb824adf949daae3af2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-02 10:00:13 -07:00
Shawn Rutledge
7c313f1865 QMovie non-anim: use QImageReader::imageCount but not nextImageDelay
Since 3f4d6279c4b0d04422efff478a5e2fb36259dbaa (khansen 2005) QMovie
calls QImageReader::read() until QImageReader::canRead() returns false.
That's apparently to support animated image formats in which the
frame count is not known at the beginnning (i.e. not specified in
the image format's metadata). But non-animated multi-frame formats
are expected to return valid values from QImageReader::imageCount();
and those also tend to keep returning true from canRead() regardless
of how many frames have been read (the interpretation of canRead()
is "does the file have the expected format?" rather than "are we
about to read too many frames?"). So, when a multi-frame image is abused
as an animation, QMovie was able to keep reading the same frame
repeatedly and pretend that the frame sequence goes on forever.
It also tended to read frames as fast as they could be decoded,
because nextImageDelay() is not usually provided, because multi-frame
image formats don't specify a frame rate in their metadata.

So now we change QMovie's behavior for image formats where
QImageIOHandler::supportsOption(Animation) returns false:
trust imageCount(), but not do not trust nextImageDelay().

But to actually jump to the next frame in this case, we also need to
call QImageReader::jumpToNextImage().

Altogether, this makes QMovie support "flipbook" animation for
multi-frame image formats, such as tiff and pdf.

Added "read frame x of c" logging in qt.gui.imageio category.

For testing, we use a pre-existing multi-frame Obj_N2_Internal_Mem.ico
file, to avoid depending on the tiff plugin.

[ChangeLog][QtGui][QMovie] QMovie now handles non-animated multi-frame
image formats (such as tiff): QImageIOHandler::imageCount() is observed,
and the default frame rate is 1 FPS.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-117429
Change-Id: I6dad2a684e12c78a68288402e223a59427bf649e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-02 09:57:00 -07:00