2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: I7fd9005ef66c11f640a50f0db468cdcb07eb621f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: I432e7ced3e49b570cf9e4057fe98411271693750
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: Ic189b1c55b6bdf0397636b3ae9555cc38b60fc48
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: I1cd2d45c54fbeb2b89accc257f2ec5b57f20c013
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
These reveal a roughly factor of six slow-down for two valid date
formats and a roughly factor of twelve slow-down for an invalid one.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-124465
Change-Id: Ibd21e43d4c64aced33ba5b21e4602e0dc4fd7548
Reviewed-by: Mate Barany <mate.barany@qt.io>
They're a bit more readable than calling dict on a generator.
Change-Id: I3177e31b1f617b80d1cf5d5f83df7036fc0c4c01
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
For security reason, Wayland doesn't provide global position for
top level windows, so topLevelAt is not supported.
Fixes: QTBUG-113404
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Id60b8b77a1843344db4d4e4c13382ad87adac806
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Although the code does not, in fact, know about them, it's more
pertinent to say that they're unsupported than to say that the variant
in question is unknown.
Change-Id: I411d792dc91f2d7af58a4b7919c952a005b3417e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
The existing data comes under Unicode-DFS-2016 but future updates
shall come under Unicode-3.0, so update the existing headers with the
former and the generator script with the latter. Leave a note in the
attribution file about this transitional state and how to resolve it.
Replaced UNICODE_LICENSE.txt from src/corelib/text/ with
LICENSES/Unicode-DFS-2016.txt, as fetched using reuse download.
This doesn't look like a rename but only actually adds some irrelevant
lines about where on the Unicode website the upstream files (to which
we do not apply this license) come from and changes some spacing.
Pick-to: 6.7 6.5
Fixes: QTBUG-121653
Change-Id: I50c9f4badc77a9aa402af946561aff58ae9e3e7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Qt and application code expects that QScreen geometry
should be available early in main(), after the QApplication
constructor returns.
This is not the case if onLoaded is called at later
point in time, since the container element for the
screen is typically made visible when onLoaded is called,
and does not have valid geometry before.
Change-Id: I62d87f01fce1cd601e7a70d842e22a61814c9db7
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Follow-up from commit 299dfe which added a similar update
for expose events. This fixes missing DPR updates for
exposed windows.
Pick-to: 6.6 6.7
Change-Id: Ic1a9a41bd979270b97303abb71f1230bff001d19
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The documentation of `QStyle::drawControl()` states that
"The widget argument is optional" so it must not be used
unconditionally.
Pick-to: 6.7
Change-Id: I8b5a8ed421c0ae2c667925e448c9a029b6deedfd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: I2a3f400e58f86cbc339c355977da784ef5c24800
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Location keys are meant to be used as regular expression.
The . need to be appear as `\.` in the regular expression.
The JSON parser interprets the `\`, hence the `\\.`.
Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: Ie3b8fb9686d59db13e5522309adbf3877bd2a3f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
They're indexed by the same key and should have the same language,
script and country. Just to be sure, assert that.
Change-Id: I9d4d9c0ef7078d6dcbb6ceccafdfaff671737689
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As it is, when a QWindowContainer's embedded window gains focus, the
container doesn't report having focus and QApplication::focusWidget()
will be nullptr. This is because when the embedded window gets focus,
the container will clearFocus() on the old focus widget. To be able
to set focus to the next focus widget (eg: as a result of a key tab
event sent to the container's parent window), the container checks
if its embedded window is already focused, and if so, forwards focus
to its nextInFocusChain(). That is why it keeps track of the (old)
focusWindow.
The problem with the current behavior is that if we want to make focus
navigation via key tabbing work and return focus *from within the
window* back to the normal widget focus chain, the encapsulating widget
needs to remember its focusWidget(), in this case the window container,
in order to be able to set focus to the next/PrevInFocusChain().
That is why we now set the focus to the window container whenever its
contained window gains focus. This means that
QApplication::focusWidget() will be the window container if the contained
window has focus. In this way, we don't have to call clearFocus() on the
old focus widget, or keep track of focus windows, because calling
setFocus() on the container will handle that.
It is worth noting and probably documenting the following caveats:
- even though the window container will be the
qApp's focusWidget(), it won't directly handle keyboard events, but the
contained window will
- we won't be able to respect the window container's focusPolicy in this
case, since the contained window will be activated from interactions
inside it, no matter the container's focusPolicy
[ChangeLog][QtWidgets][QWindowContainer] The window container will
become focused if the contained window becomes focused. This
implies that the QApplication::focusWidget() will be the window
container if the contained window is the focus window.
Task-number: QTBUG-121789
Change-Id: I1050afc59780f7189a0d8e8c95bff27f96f38dbc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The ICU backend was using its base's displayName() but none of the
other backends did so; have them do the same. This saves the need for
a QTZP:: suffix one one call to the UTC backend's displayName().
The order of backends in the header is a jumbled mess and the set of
could surely be reduced to a #if...#elif...#endif chain, especially
once TZ's dependence on ICU is sorted out, so add a TODO about that.
Change-Id: I6d6daf3f899f7c79538a7d16bc94b0610f1a4c28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
I neglected to update the CLDR dateconverter code when I expanded the
range of forms we support for display of a timezone. Even that
expanded range doesn't cover all the cases CLDR does, but we can at
least approximate each of CLDR's options by the closest we do support.
Make matching changes to how the Darwin backend for the system locale
maps its ICU-derived formats to ours.
This in practice changes all locales previously using t (abbreviation)
as zone format to use tttt (IANA ID) instead. Test data updated to
match.
[ChangeLog][QtCore][QLocale] Date-time formats now more faithfully
follow the CLDR data in handling timezones. In most cases this means
the IANA ID is used in place of the abbreviation.
Change-Id: I0276843085839ba9a7855a78922cffe285174643
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test assumes either windows or unix line endings, however
wasm can run on either system, causing problem with
git config core.autocrlf=true
Fix the test so that on wasm we correct filesize if
necessary
Change-Id: Ieb86c5388aa931d8ca06822e1c09a2c55801de67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Use QMap::constFind() instead of non-const QMap::find() where
applicable to avoid unnecessary detaches.
Change-Id: I76113c00efabb592f565f3ba4c90aefead1ac6a0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Wrap `connections` to std::as_const() to avoid unexpected detach
due to use of QHash::asKeyValueRange() in range-based for loop.
Change-Id: I2bf69782dc9dc63df0b3f9dfe395427909fba310
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There was a discrepancy that the multi-arg arg() overload would accept
any number of digits in the placeholder, resolving up to value 999
(e.g., %000001 was interpreted as placeholder #1), but the single-arg
arg() overload only supported exactly one or two digits. The single-arg
behavior was documented, so use it.
[ChangeLog][Important Behavior Changes] The QString::arg() overload
taking multiple QString-like arguments is now fixed to interpret
placeholders like the other arg() overloads: it will find at most two
digits after the '%' character. That is, the sequence "%123" is now
interpreted as placeholder #12 followed by character '3' (verbatim).
Pick-to: 6.7
Fixes: QTBUG-118581
Change-Id: I455fe22ef4ad4b2f9b01fffd17c767a948d41138
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Use more suitable QList::insert() overload and silence Clazy's
"mixing iterators" warning. The warning is non-sense for this
particular place, but it won't harm to avoid C-style cast and
iterators arithmetics there.
Change-Id: Ibfc8c8003473de3b7d9b67965e25a4cdb6a9f043
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QHash::removeIf() instead of a custom erasing loop on aliases
table when unregister custom type. It will still always detach even
if nothing needs to be removed, since QHash::removeIf() always detaches.
But this can potentially be fixed in the future, so it will be improved
indirectly.
Besides other things this also silences Clazy's "mixing iterators"
warning.
Change-Id: I3d6e8b0ed7dc10807570a0b0feac7eda6a0e572a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Remove unused <bitset>
- Place <qobject.h> under !(QT_BOOTSTRAPPED), because it seems used only there
Change-Id: Ic77c7441d2400cf32e7b6ca2b90a1984a0b6377a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When adding/fixing parts earlier it was missed that it was not handling
the _unsupported_ case, when authentication is not handled and there is
no resend. But there _is_ a challenge header.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-123891
Change-Id: I21470df0ce2528bad3babffc6e9f19b7afd29d20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We'd end up trying to takeFirst() from an empty QStringList.
[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
startCommand() to crash if passed a string that was empty or contained
only whitespace characters.
Fixes: QTBUG-124512
Pick-to: 6.5 6.6 6.7
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7689095c39272
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The original code updated d->fileEntry twice in a row: it assigned to it
directly, then called QFSFileEngine::setFileName() which assigned to
d->fileEntry again. Now only one QFileSystemEntry is constructed.
Change-Id: I3cdc131b97455c14e5b032fbdecdae0eaa32925f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Otherwise member methods such as size() could return incorrect info.
Add setFileEntry(QFileSystemEntry &&); to reuse a QFileSystemEntry if we
have already constructed one.
As a result of this, a QTemporaryFileEngine::setFileName() call has
become redundant and can be removed; the code it executed is already
taken care of:
- QFSFileEngine::close(): already called by QTFEngine::rename() a couple
of lines above
- QFSFileEngine::setFileName(): QTFEngine::rename() calls
QFSFileEngine::rename() which in turn updates the `fileEntry`
This commit is covered by tst_QTemporaryFile::rename(), i.e. if
QFSFileEngine::rename() didn't update the fileEntry, that test would
fail.
Change-Id: I312f35cf7fdf9b1a8cd0bce5e98ba7a48cf9426e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This changes four things:
1. The detection of Xft using platforms is now reversed assumed true,
unless the desktop environment is traditionally Qt based.
2. When Xft using platforms are detected the Xft settings win over
fontconfig settings.
3. On other platforms, Xft settings can still be used as a fallback if
no fontconfig settings are found.
4. In case of no fontconfig match Xft settings are now applied, where
before they would never be.
Fixes: QTBUG-43745
Change-Id: I52372a6e2315441668eaf384046514fd6653e64a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
As of Qt 6.7 we no longer return jobjects from that API. The declared
QJniType::Context type (and similar types) is no longer jobject-like,
they are now QJniObject-like.
Task-number: QTBUG-123900
Pick-to: 6.7
Change-Id: I215f84ac37907ae2b7950c40c7287590234e4e35
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
We now adopt the UIScene lifecycle, where we react to iOS creating
UIWindowScenes for connected screens, which we then configure with
a single instance of our QUIWindow, that in turn contains the
QIOSViewController and QIOSDesktopManagerView that we depend on
for our window management.
As a result, we can now create and show QWindows on visionOS,
which doesn't have UIScreen and hence failed with our old strategy
managing our UIWindow via UISScreen.
We still do not declare a UIApplicationSceneManifest in our Info.plist,
or report UIApplicationSupportsMultipleScenes, as this adds another
level to the window management that we're not ready for yet.
Task-number: QTBUG-121781
Change-Id: Ic02f43aa6b205289a3f3c8e72c2a6ef575031d9a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The tolerance is too low, and fails with Xcode 15 builds of Qt.
Pick-to: 6.7
Change-Id: I5755d33b052a43eb4af7ea29ec54746f73e3c42c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Xcode expects the base SDK to always be the device SDK, so we can't
pass CMAKE_OSX_SYSROOT on directly.
We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.
The logic is only triggered for single-arch Qt builds.
Change-Id: I0012e220cb415fcc5995672ffd60b25ef7eeb4e7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We used to set a private _q_foreignWinId property on QWindow when
creating foreign windows, and this was the mechanism which we then
passed the foreign winId to the platform plugin.
With c585802e94 this was removed,
since we now were passing the winId through via explicit QPA
APIs, and since 0c6911e5cd removed
the ability to explicitly destroy() a foreign window.
But when closing a QWindow, we destroy both the window itself,
and all its children, including foreign windows. In this case
we still want to support recreating the foreign window, for
example when the parent window is shown again. To enable this
we restore the _q_foreignWinId private property, but keep
the limitation of not being able to explicitly destroy a
foreign window.
Pick-to: 6.7 6.5
Fixes: QTBUG-124160
Change-Id: Ia885ba9f043e64fb21eedd2b4c344679726f1b5c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There were two of it. The "year-match-*" tests have two year fields,
one four-digit the other two-digit, and deal with whether they match.
The second year-match-1999 had, however, only a "yy" year format; it
in fact belongs to the "just-yy-*" family that follows. So rename it.
Amends commit 5108192f67 which landed in
6.7.
Pick-to: 6.7
Task-number: QTBUG-107185
Change-Id: Ibfe0c33cb00dc068d0f670d27c43ec4dc4550c05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc assures me this is a better way to do the job. In due course,
this needs to be changed to use the locale of the datetime parser,
either using QLocale's private API or once QLocale exports suitable
API.
Task-number: QTBUG-122619
Change-Id: I5dbb5c309198d55a9786ecbec239d085f678afb9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
QTimeZone, QTimeZonePrivate::Data and QString are all big enough to
warrant passing by reference.
Task-number: QTBUG-122619
Change-Id: I7f2381316e47f40dd0faac0471967162d4ee6031
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
It saves exercising its default constructor, which doesn't initialize
all members, and makes for terser code. Because the type is public, we
can't delete its constructor to force always brace-initializing. Since
the default values we'd want to NSDMI it to require <limits>, or
access to QTZP, it seemed better to just leave its default
initialization alone and just never exercise it.
Task-number: QTBUG-122619
Change-Id: I58d588d90080cf2f48eef2ef4b733b27bb4fba37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Turn QTZP::invalidData() into a default constructor. A second
constructor taking needed details avoids exercising that default
constructor elsewhere, when the invalid values aren't what we
need. All constructed instances now have all members initialized.
In the TZ backend, add some PosixZone helpers to create Data objects,
reducing the complexity of calculatePosixTransitions().
Task-number: QTBUG-122619
Change-Id: I56557a2f6249d60012355d5d72c662474be76e51
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
The type is always constructed by brace-initialization otherwise, so
just NSDMI-ing its offset to InvalidOffset simplifies the handling of
invalid values.
Task-number: QTBUG-122619
Change-Id: Ic7173fe6572bf700bb5858a2553750023c267160
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Although parsedRfcDateTime's clients never read utcOffset unless date
and time are valid, and never set them to anything valid without also
setting utcOffset, let's not leave it uninitialized by default.
The TZ file digester didn't actually set QTzTimeZoneCacheEntry except
when setting it to true, so let's make sure it's properly initialized
to false. The m_preZoneRule was initialized to all-zeros in one branch
of its construction, so set it to that by default so that its default
constructor leaves no member uninitialized.
These types are only constructed in parsers anyway, so the minor cost
of setting fields to zero is dwarfed by string manipulations.
Task-number: QTBUG-122619
Change-Id: I6c57fc6d33c379af3f7c6de80c4ca47e431f9d92
Reviewed-by: Mate Barany <mate.barany@qt.io>
The internal ShortData types are trivially copyable. Although their
operator==()s are defined in the bodies of public API classes, they
are inline and act on private member classes, so the change
(technically) to a public API class should be invisible to client
code, hence both source and binary compatible.
Task-number: QTBUG-122619
Change-Id: I854474c02da6607e7e81aa9161ce5b5aae659f00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>