The function is unused.
Change-Id: Ib2154398981c0db20a2096c83b371d12920e34ea
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: David Skoland <david.skoland@qt.io>
Documentation change to follow, as part of a QCollator doc overhaul.
Change-Id: Ie8d3df15a6c0f86b611a8866adf12f3355cc9710
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Its collation strategy can't be passed to the constructor, so
describing it as initialized with a strategy was misleading.
The "Linux without ICU" disclaimer was poorly phrased and only
mentioned on one of the options; it actually applies to all.
The operator() was marked internal, but the class doc's claim that
QCollator can be used with std::sort() relies on it being callable.
Moved option descriptions to the getters and filled in the missing
ones. Mention the default in all cases.
Added a minimal illustration of how to use a QCollator.
Fixes: QTBUG-72233
Change-Id: Ifa846eca05e8e42aaa08c4947a59a82d8a8a79bc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Many doc-comments had their end-comment marker indented.
Keep separate from real doc changes, to appease the inanity 'bot.
Task-number: QTBUG-72233
Change-Id: Id6b8244aeccd81ba7be461ec2b344910c106c17d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Up to 5.15.0, QDateTime::fromString(), when parsing a string that
matched the format but represented a date-time in a spring-forward's
gap, would return an invalid date-time object that represented a "best
shot" date-time, correcting the error in the string as best it could.
In 5.15, in order to handle time-spec information correctly, we
adapted the date-time parser to have a fromString() variant that
parsed a date-time as a whole, rather than as a date and a time; as a
result, QDTP::fromString() now returns false and QDT::fromString()
returned a default-constructed instance instead of the invalid
date-time that QDTP had produced.
Amend 7605451604 to restore the prior
behavior of returning the invalid date-time object from QDTP instead
of a default-constructed invalid date-time. Also document what this
implies for the caller's ability to recover from the situation, if a
best shot result is better than nothing.
[ChangeLog][QtCore][QDateTime] Restored pre-5.15.0 behavior when
parsing a date-time from a string (and document what it implies): if
the string has the right form but represents a date-time that was
skipped by a time-zone transition (e.g. a DST spring-forward), the
invalid date-time object returned can, none the less, be used to
recover a near-by date-time that may be more useful in some cases.
From 5.15.0 to 5.15.2 and in 6.0.0, a default-constructed QDateTime
was returned in place of this more informative invalid date-time.
Task-number: QTBUG-88633
Pick-to: 6.0 5.15
Change-Id: If0b439038d5fe48eefb951c62f3aae2933bb5651
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
An AM/PM field is only fixed-width if the locale's AM and PM texts
have the same length, which we shouldn't take for granted.
(They're not in Albanian, Bosnian or Cherokee.)
In sectionMaxSize(), count tells us the case, so we shouldn't be
taking both case variants into account, only the one we need.
Change-Id: I03b985cc5bf74c34742480558cef08af6343ed93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Parsing of time-zone offsets should check the offset string conforms
to the expected format and has valid values in its fields. The
QDateTime parser, fromOffsetString(), neglected the bounds check on
hours; the QTzTimeZonePrivate parser, parsePosixTime(), neglected all
upper bounds checks, only checking against negative valus.
Drive-by - refined phrasing of a comment.
Pick-to: 6.0 5.15
Fixes: QTBUG-88656
Change-Id: If04cdbe65064108eaa87c42310527783ad21b4c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The former also does fuzzy comparison, but it reports what the values
were, if the test ever fails.
Change-Id: I36ecda1f69bf3f430c904b37cd8c3a23201ab7e2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Added tests for aliases and various calendar properties, ensured
dateToJulianDay()'s invalid date branch is exercised. Corrected
assertion when constructing from system and asserted calendarSystem()
is as expected.
Pick-to: 5.15
Task-number: QTBUG-88183
Change-Id: I510afcb5d9d115f68148d1f679f3224d712f92f4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The default is now passthrough. And let's not mention the
environment variable overrides, as they are meant for internal
testing.
Pick-to: 6.0
Pick-to: 6.0.0
Change-Id: Ie2409e5411d4bdcdf041834cb5ca9e1215aa173a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Was overlooked when removed from QFlags
Pick-to: 6.0 6.0.0
Change-Id: If65ff4a07e2f72589d2c32c2d24366ff9dc2405f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The previous attribute instancing patch (6493b93) performed the
cleanup too late for the case where the command buffer ends with an
EndFrame command and core profile is used. Resetting the attribute
divisors needs to be done before the vertex array is unbound.
Otherwise the state will be wrong at the start of the next call
to executeCommandBuffer(), which is normally the start of the next
frame.
Change-Id: Ic76695b4d334ed1c1e816e747417d957c387a88b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Since doing a split will create an empty entry, then we can save time
and just return an empty QStringList in this case
Change-Id: I86a6532e7243151493ea4021bfcc05e4c2a9cbf0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way the user can directly click the link, instead of looking at the
'see also' section.
Pick-to: 6.0
Change-Id: I50b62fe0b376a3f6462c11abc46a001c334ba82a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QTextCharFormat::fontFamily is deprecated in favor of fontFamilies,
which returns a QStringList wrapped in a QVariant, whereas the setter
expects a QStringList.
Change-Id: I3333eaae4fc5ec3e3bdbec58047d6b3554b4a171
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Fixes a use-after-free which can reliably be observed under ASAN. In
QConfFileSettingsPrivate::~QConfFileSettingsPrivate we call
unusedCache->insert(conf_file->name, conf_file, ...)
Note that the key is a member of the object. Thus by deleting the object
before using the key, we dereference a dangling pointer.
Amends f08492c6fd.
Change-Id: I3a550fc73446b72dd46456232e85f6d206d64c01
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 5283ee71040dc2f3a762e9cc5e807fb17587e9b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the overloads for mouse events with device/without timestamp
and pass the active tablet or touch device.
Task-number: QTBUG-88678
Task-number: QTBUG-46412
Pick-to: 6.0
Change-Id: I8695b493540d0cbf50e9c72afe870a7633de3ab9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There are a few places left over, for example the QTextEdit
creating mouse events in a timer and notably QGraphicsView.
Task-number: QTBUG-88678
Task-number: QTBUG-46412
Pick-to: 6.0
Change-Id: I7ed23911be3b86b4b39fb478b947ec3b7a60761f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Play Store now accept only app with target
SDK version set to 29 or above
Pick-to: 6.0
Change-Id: If38f20c88fd6b0e6f29939cdf3d2eb793c0e1489
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Copy back changes to qmake internals that were done in qttools.
This makes it easier to keep the qmakelib copies in sync.
The code guarded by PROEVALUATOR_CUMULATIVE is not used by qmake itself,
but only by lupdate and Qt Creator. It seems to be sensible to have the
same behavior with regards to feature file evaluation in both
projects. It was originally introduced in qttools for QTBUG-62478.
The change regarding QT_BOOTSTRAPPED is safe, because the 'process'
feature is available and off in the boostrapped case.
Change-Id: I030ca8b093c017040a9ff9f4bb09a7cca4aa8964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The scope of the variable 'currBind' can be reduced if the variable 'r'
is not 0. So declare the variable when the variable 'r' is 0. The local
variable 'i' shadows outer variable in fetchNext(), so move it to the
front of switch.
Don't declare 'res' until we need and initialize it.
Change-Id: Idfb220b96cfbcd4088fd7858ed9392d0a3e10aea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Prefix it with "Qt Widgets -" to make it a bit clearer in the list of
highlighted examples which module this one is about.
Pick-to: 6.0 6.0.0
Change-Id: I0bf65b02db72173f1adfe0bcf8657be7905dbd6c
Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Otherwise they're not usable with iterator-based algorithms
that e.g. remove, partition and the like.
[ChangeLog][QtCore][QString] Added erase().
[ChangeLog][QtCore][QByteArray] Added erase().
Change-Id: I78829b1a5365dd53b6b6423ceedbc52edeafbc63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Use if constexpr instead of plain if; use C++17 algorithms
instead of hand-rolled loops.
Change-Id: Ifa092f892199b9b21bad04b2d72d5e3117a1b377
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Even for non-complex types, it makes no sense to use the assignment
operator instead of placement new when constructing new objects.
Pick-to: 6.0 5.15
Change-Id: I5f15fe4b3397cf52d1d35e6c4dcc513b94b3cf14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
It was redundant with the timer info dictionary, and was even used
where using the dictionary would have been more efficient.
Change-Id: Ia656bf9b56c61e23df9f8743d8f8efbf65d37574
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
8664ee610d added support for collapsed
borders but set the style to solid no matter what border-style defined.
Fix it by properly setting the desired border style.
Task-number: QTBUG-36152
Change-Id: Ie527511f831e7f62ab7064d4958b35ddbf1a9403
Pick-to: 5.12
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Enabling instanced drawing will set glVertexAttribDivisor to 1 for the
PerInstance attributes. This is of course a persistent state, because
GL, so it will apply to all subsequent draw calls that uses attributes
with the same location number, introducing weird and wonderful randomness.
Therefore, make sure we set the divisor back to 0 for non-instanced attributes.
Change-Id: I2d9115369fa24e8d57396d2a5f88d1435fe98971
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If CMake version is 3.19 or greater, use cmake_language(DEFER CALL)
for Qt internal scope finalizers, instead of the homegrown
implementation.
Apart from not depending on the hacky homegrown solution, it
significantly improves the readability of --trace-redirect logs.
Pick-to: 6.0
Task-number: QTBUG-77377
Change-Id: I5ce374bb313865662c536826e86052bc762438b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
On DLL platforms, the value of QMAKE_PRL_TARGET should be the import
library (foo.lib), not the actual DLL (foo.dll). The genex
TARGET_LINKER_FILE_NAME provides exactly that.
Fixes: QTBUG-88864
Pick-to: 6.0
Change-Id: I553930bb840007772fe8f4612f95e0e320f54107
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Before CMake 3.19, we are not allowed to query non INTERFACE_ prefixed
property names from INTERFACE libraries. And it was the wrong thing
to do as well. Prefix the properties with INTERFACE_ as appropriate.
Don't try to add INTERFACE_COMPILE_DEFINITIONS from header only
modules to the headerclean compile commands. This causes configuration
issues with UiPlugin in qttools. Fortunately it seems that qmake
doesn't do that for 'header_module's either.
Finally don't query for the FRAMEWORK property on the passed target
(INTERFACE libs can't be frameworks). Instead just query if the whole
Qt build itself is a framework build.
An issue was discovered regarding QT_NO_ENTRYPOINT genexes breaking
headersclean add_custom_commands for UiPlugin in qttools. To avoid
this the property was renamed to all lower case in
6ca66de9120537134b63d42de6c53c6e5834e8f3. This avoided the immediate
issue, but it's possible it might resurface in the future with a
different property name that wasn't renamed. In particular I thought
it might happen with QT_NO_UTF8_SOURCE but it didn't.
In case something like that happens again, the two possible solutions
are to bump minimum CMake version requirement to 3.19 (where upper
case property names are allowed to be queried from INTERFACE libs) or
to implement recursive include directory fetching similar to our
qt_internal_walk_libs implementation.
Pick-to: 6.0
Task-number: QTBUG-86053
Task-number: QTBUG-82615
Change-Id: I7815d555ec9ea049a8fd40f2a2f072dcb9f5e9c3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Query the include dirs from the INTERFACE_INCLUDE_DIRECTORIES property
when generating docs for an INTERFACE library.
Amends 2db41fefa0
Pick-to: 6.0
Task-number: QTBUG-88838
Change-Id: Ic8a454ba66b2dbc59bad883e1e0d38ebb26d0370
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This test was failing but was returning a pass because of a bug
in androidtestrunner.
Task-number: QTBUG-88507
Task-number: QTBUG-88508
Pick-to: 6.0
Change-Id: I4fda7c2ddf8cd1e6858617e7bb447078c5768a75
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since QHash is missing the overload, too, just ignore the hint for
now, but provide the STL-compatible signature so generic code can use
QSet as a normal sequential container.
[ChangeLog][QtCore][QSet] Added insert() overload taking an insertion
hint, for STL compatibility.
Change-Id: I9fe41877343ebff721b650fb7b9cd4e06b6608d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
The Local Fortune examples and the JSON Save Game don't need to be
highlighted in Qt Creator.
Pick-to: 6.0 6.0.0
Change-Id: I7c7c9997e9a1cfb61f94309f16be65c810b42e14
Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Make the string into a list and call setFontFamilies.
Pick-to: 6.0
Change-Id: I1b70db784fd6e495b48917141d07bacd1e883882
Reviewed-by: Andy Shaw <andy.shaw@qt.io>