Conform to the XDG Base Directory Specification:
"If, when attempting to write a file, the destination directory
is non-existent an attempt should be made to create it with
permission 0700. If the destination directory exists already
the permissions should not be changed."
At the same time the spec states about XDG_RUNTIME_DIR that
"its Unix access mode MUST be 0700", so don't consider the
directory with wrong permissions correct and use a fallback.
Task-number: QTBUG-68338
Pick-to: 5.15 5.12
Change-Id: I03c6b35b3f7d5ceb8e6326695bfc8207da92ea67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Except for types marked as unresolved, we're doing it anyway - the only
difference is that now we skip looking up the metatype by typeid.
[ChangeLog][QMetaProperty][Important Behavior Change]
QMetaProperty::typeName returns now always the same name as name() of the
corresponding metatype. This can cause a change for enum properties
which were not fully-qualified.
Change-Id: I1f57743948b7262ac06095d3bbc838d620f6e481
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If a testcase failed before we reached free, the QMetaObject would have
leaked.
Moreover, defer freeing until all tests have run: dynamic QMetaObjects
might create dynamic metatypes. If those were shared, we would run into
issues.
Change-Id: I2edfcb2605e58eaba454bfe0446a6b187a5210df
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Properties of non-dynamic classes always have the metatype stored, so we
can make use of it. Moreover, when the builder is converted into a
metaobject, we need to resolve the metatype anyway.
As a driveby, add a dedicated metatype test to tst_qmetaobjectbuilder.
Change-Id: I7eea0cd8fc2da5d92c7fc803f05cd81e3a9d4cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The Professional CMake book suggests always using explicit linkage with
target_link_libraries, so let's use that.
Whether to use PUBLIC or PRIVATE depends on the context. But let's
be conservative and advise on using PRIVATE by default.
Task-number: QTBUG-88935
Pick-to: 6.0
Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Follow the pattern recommended in the CMake docs for the $<JOIN:...>
generator expression. Wrap it in a $<BOOL:...> genex so that if a
target's INCLUDE_DIRECTORIES property is empty, we don't add a
stray -I with no directory following it. This fixes the following error
when running qdoc:
qdoc: Missing value after '-I'.
Pick-to: 6.0
Task-number: QTBUG-88838
Change-Id: Ie3ef2625fbb29cc501f7fc22ff7a9cc8ac548322
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QSortFilterModel shouldn't forward dataChanged() when the source model changes data in columns that the filter model refuses
Fixes: QTBUG-86850
Pick-to: 5.15
Change-Id: I26565d119d2aa36ea07b3de0c15f1b137bc002f8
Reviewed-by: David Faure <david.faure@kdab.com>
This used to be present in source-breaks.qdoc in qtdoc, but seems this
one note went missing when merging the content to other places.
Pick-to: 6.0
Change-Id: Idfd165eb1c7616c595f7a6515cc98d8477671e09
Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
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>