We should sync external headers for 3rdpary projects
like freetype and harfbuzz-ng and keep the directory
structure.
Fixes: QTBUG-113416
Pick-to: 6.6 6.5
Change-Id: Ie66edb9a21cff37ca6c8c68b6d225de6d8bbad81
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
It's an example in Qt SVG that is to be removed.
Pick-to: 6.5 6.6
Change-Id: I6e8cf38885649ca10f70a70b8400873c97bf1698
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Between the find() == 0 obfuscation (since fixed) and this unchecked
replace(), it took me way too much time to figure out what was going
on: the key passed has been invalidated by the setCacheLimit(0).
Now that we QVERIFY that the replace() _fails_, it's much easier to
backtrack and figure out why it does so and why, consequently, the
following find() is also expected to fail.
As a drive-by, reorder two lines so the grouping becomes clearer
(blocks now both headed by setCacheLimit()).
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I434b65fc13c3fed6512036efeb98d738eeb2a13d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It wasn't obvious to me, at least, and I only found out about it when
I failed to construct a test failure based on this.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I339132d7bb2cb8a76f0f1feec37891d6131c4d7b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
None of the existing tests failed when I started to return a valid key
from a failed insert(QPixmap), so add a test that would fail.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I74f23d2ec4c04151f8f1266c0c503713d4642f3a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is just confusing. QPixmapCache::find() already returns bool,
comparing it to a literal zero just makes it hard to read.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I43c000890377cca2111daa48799f10cc99aad8cf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Both the DOM and XML stream versions of the XBEL bookmarks example had
a frank.xbel in their EXAMPLE_FILES, but there is no such file. So
asking qmake to include it is spurious.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Iec08042d181fc09c2c428685ce841a13161ab273
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The XML stream reader and writer accept QAnyStringView arguments these
days, so passing a QLatin1StringView is entirely sufficient. This
makes static functions to provide access to unique QString instances
redundant. Linkers are allowed to uniquify the literals the "..."_L1
reference.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I7f37e97631e11683b9ddd3842fc6233547bed5ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Pass one function's return as a parameter to another directly.
Use a ternary expression rather than conditional initialization.
Use initializer-list construction instead of appending to an empty
QStringList; and inline the result where it's used.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I781aedba8dcc4251193b55d82fe684c9b5da241a
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
As readXBEL() does call readSeparator(nullptr), the latter should cope
with being passed nullptr as item.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I786e4438b566438448b5d54ff6442c27f1255aa8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Since first requestActivate may happen before the window div is
actually displayed on-screen, we need to sync Qt's activation state
with DOM as soon as DOM element becomes visible. Focusing an
invisible element is impossible.
Fixes: QTBUG-79934
Change-Id: I04cf9b4ead006c9b8b135b3b6967d7938c581833
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
`TYPE` argument is not a thing, and if it is there, QT_BUILDING_QT is
set to `TRUE;CACHE;TYPE;STRING;When this is present and set to true, it
signals that we are building Qt from source.` instead of `TRUE`.
Pick-to: 6.2 6.5 6.6
Change-Id: I24784e9aead4929d408d06bce72d3f33ee21eb63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This no longer is range-length preserving now, so adapt the
documentation.
For the non-contiguous iterator case, it's actually ok to always
resize(0) and then append(), because, unlike for QList and QVLA, the
resize(0) doesn't actually iterate the container to destroy
elements. It just sets some members and conveniently detach()es for
us.
The char8_t case is even more complicated, since we can, atm, not
include qstringconverter.h into qstring.h, yet qstringconverter is
required for stateful UTF-8 decoding in the input_iterator case. So
that's postponed to yet another patch, and maybe won't make it into
6.6. But I feel it's important to have at least one
non-length-preserving version of assign(it, it) in before release lest
users come to rely on this documented (and de-facto) feature of the
the step-2 assign().
Fixes: QTBUG-106198
Pick-to: 6.6
Change-Id: Id458776e91b16fb2c80196e339cb817adee5d6d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
\c prevents qdoc from linking to the relevant function documentation.
Pick-to: 6.5 6.6
Change-Id: Ieaa38b1feba816e911b17445a9436f64c234522a
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The method has been named expandingDirections() since the very
initial git commit for Qt 4.8 ... So high time to fix the
documentation.
Pick-to: 6.5 6.6
Change-Id: If5d7189ebbe439bd0b0e95d51e77c08ee52c3471
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
This is an improved version of the previous attempt to remove
this 3c6c3eccd1. Now we also take
into account that concatenation of 2 null stings must also produce
null string as a result.
Change-Id: I39c270552839b056247c1cce334cef4fa8f1cfdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QString uses UTF-16 encoding and thus "unicode characters with
code values above 65535 are stored using surrogate pairs,
i.e., two consecutive QChars.". [1]
When the character inside of text is retrieved using the
GetCharacterAtOffset method of the AT-SPI Text interface,
use QStringIterator to retrieve the character's actual
codepoint instead of returning an invalid/incorrect one.
[1] https://doc.qt.io/qt-6/qstring.html
Pick-to: 6.6
Fixes: QTBUG-113438
Change-Id: I07108481716329fd23a92c88892eaedd3f9defc6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QMenu's causedStack maintains a list of menus on the way to the menu,
and might contain nullptr if one of the entries was a tear-off menu
that got closed (and thus destroyed, due to DeleteOnClose).
If the entry we get from the stack is nullptr, fall back to the passed-
in parent widget pointer, and test for nullptr before accessing.
Add a test case that crashes without the fix.
Fixes: QTBUG-112217
Pick-to: 6.6 6.5 6.2
Change-Id: I958182db47c3cc8733e1780f7efef43881ffae11
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
And add some additional parenthesis for extra safety.
Amends f7c8ff511c.
Pick-to: 6.6 6.5
Change-Id: I4ca8b70f6adb876a10f82685ba9800021218d418
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
By setting 'qhp' to true, QDoc will warn if qhp configuration is not
provided.
Pick-to: 6.6 6.5
Task-number: QTBUG-114181
Change-Id: I26bce80e888d0b0bd270ecdcc6c0774298076a4b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
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>
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>
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>
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>
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>
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>
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>
Documentation got outdated during review of the new qt loader.
Change-Id: I8e23016b9a42e5f003e88c58a8e546255b167983
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
- 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>