The test function assigns a hard coded rectangle to gestures and uses
the default size of a graphics view at the same time.
The leads to flakiness, where the gestures can't be delivered when their
size is out of bounds of the view's geometry.
Assign size size dynamically, according to the view's geometry.
Task-number: QTBUG-130811
Pick-to: 6.5
Change-Id: If75f59d15f84e610b4ec987daa2a06ce62539228
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6995709992344ac608f2b2a19b2c3883019bfaeb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWinRegistryKey::value<T> returns an optional<T> which can make code a
bit more readable than the std::pair<DWORD, bool> return value from
QWinRegistryKey::dwordValue.
This implements part of the "TODO: Remove once all usages are migrated
to new interface." comment in QWinRegistry class because it allows us to
remove the QWinRegistryKey::dwordValue function.
Change-Id: If568de4e31778e91ce7aadadb4aac90e41222826
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7a63a25ef71fbbe7b3eaa6ecb9a26c3e497e582a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
which happens when we build with SDK 14 (where there is not property
for importing PKCS12 in memory only) and then run on macOS 15
(where our trick with a temporary keychain is not working anymore).
Task-number: QTBUG-130500
Change-Id: I05845fa23dec70d48251f5e4d93084a574d67d92
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c9d1f18d0b88f3a4c60bf9a1342459fd67f42dbe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implementation checks the state and returns without storing the
exception when its canceled or finished.
Add tests for both situations.
Done-with: Ivan Solovev <ivan.solovev@qt.io> (analysis and phrasing)
Pick-to: 6.5 6.2
Fixes: QTBUG-128405
Change-Id: I4610a022ea12e1bc9ce24cb17b972b5b9e051f0a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6efec3850da188d3bba075185aa6e5c264c815eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of removing group separators after conversion, we can omit them
using QLocale. The decimal point and group separators can be the
same character, if the user configures the system locale accordingly.
Add a test that compares the text shown by the spinbox with what the
locale would do. Since the C locale sets the OmitGroupSeperator number
option by default, cover several cases to verify that we explicitly
set the correct number options based on the QDoubleSpinBox property,
and implement a customized system locale that returns the same
character for group separator and decimal point.
Fixes: QTBUG-77939
Change-Id: I257ea44ed988c70cb4fc0cfc81c3b366c0a431eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 34b5e43e6259c6362c642a244ceb26d482f35b82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't just silently succeed.
As a drive-by, keep the skipped code visible to the compiler.
QThread::create() is universally available since
4a5f3c8b93, so the skipped code ought to
compile.
Amends ac6a9f9bfa.
Change-Id: I193ecf802ffbfd103747aa34eb307fb1a814a94e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e1b20893aeeb9580bc6b52ac4baea297675bfee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 1ed0dd88a3 moved the finish()
functionality from immediately after run() returns to the time of
thread-local destruction, to make sure that user destructors didn't run
after our cleaning up. But as a side effect, it made other user code run
too late, after some thread-local statics had been destroyed.
This is a common practice, which causes the destructor for worker to run
too late:
worker->moveToThread(thread);
...
QObject::connect(thread, &QThread::finished, thread, &QObject::deleteLater);
QObject::connect(thread, &QThread::finished, worker, &QObject::deleteLater);
This commit splits the cleanup in two phases: QThreadPrivate::finish(),
which runs immediately after run() and will call back out to user code
(finished() signal and delivery of deleteLater()), and cleanup() that
cleans up the QThread{Private,Data} state and destroys the event
dispatcher. That destruction is the only call out to user code.
I've removed the complex mix of pre-C++11 pthread_setspecific() content
and C++11 thread_local variables in favor of using one or the other, not
both. We prefer the thread-local for future-proofing and simplicity, on
platforms where we can verify this C++11 feature works, and because it
allows us to clean up QThreadData and the event dispatcher as late as
possible. (There's some code that runs even later, such as pthread TLS
destructors, used by Glib's GMainLoop)
Unfortunately, we can't use it everywhere. The commit above had already
noticed QNX has a problem and recent bug reports have shown other
platforms (Solaris, MUSL libc) that, 13 years after the ratification of
the standard, still have broken support, so we use pthread for them and
we call cleanup() from within finish() (that is, no late cleaning-up,
retaining the status quo from Qt 4 and 5). See QTBUG-129846 for an
analysis.
Drive-by moving the resetting of thread priority to after finished() is
emitted.
[ChangeLog][QtCore][QThread] Restored the Qt 6.7 timing of when the
finished() signal is emitted relative to the destruction of thread_local
variables. Qt 6.8.0 contained a change that moved this signal to a later
time on most Unix systems, which has caused problems with the order in
which those variables were accessed. The destruction of the event
dispatcher is kept at this late stage, wherever possible.
Fixes: QTBUG-129927
Fixes: QTBUG-129846
Fixes: QTBUG-130341
Task-number: QTBUG-117996
Change-Id: Ie5e40dd18faa05d8f777fffdf7dc30fc4fe0c7e9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4fabde349f16b59f37568da2a4c050c6dd53a34e)
The commit 1f22fc995a introduced nested
functions without properly checking their return status with
QTest::currentTestFailed().
Later, commit 855c448469 used the same
pattern.
Fix all the affected tests by wrapping the function calls into the
pre-existing RUN_TEST_FUNC macro.
Both commits were picked to 6.5, so do the same with this patch.
Pick-to: 6.5
Change-Id: I3e11bf5724d9b89c75a4e5c73c96f9566c36b5cd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some reason, 4d6cf54664a98e01d4caab42431c62d6deb9f86e didn't treat
all lambdas, and no-one noticed.
This patch completes the task by transforming the remaining lambdas to
be non-move-only.
Amends 4d6cf54664a98e01d4caab42431c62d6deb9f86e, whose commit message
is pertinent to this patch, too, but not repeated here.
Pick-to: 6.5 6.2
Change-Id: I6dfe6eb438065e16fcb7ab1f2efcb64c0146bb6c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5c3dc2ecb97b69eb12e06c499ddb50666be60be6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Those files are read by reuse to complement or override the copyright
and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: I01023e862607777a5e710669ccd28bbf56091097
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4c83657448f66ac0ee46900aff2e5a230eda49b0)
There are more tests that create TLS server and can potentially
fail in case SecureTransport backend is in use.
Task-number: QTBUG-130500
Change-Id: Iaf2071c19f3cc0d3617bfc8c484b464c1a212d5a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 81e7d3f95a1646d91d126596d0d7d6acf106298a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So far, the entire tree view was filled with items, so we didn't see how
the empty area below the last item was rendered. Take a screen shot of
the tree after giving it twice the space it originally has to get some
empty area included as well, without breaking existing baseline images.
Task-number: QTBUG-123632
Change-Id: I50714c0b3b04f4b1844e52063d0c0c77ff2d7154
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 4be99b1900f3ba7414a9acbc4777a669fcbd8e3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After 3ca615d9735f7ddb8e2ae5c13e5effd419a56300, the style sheet style
will not draw rows unless the item has a border. Otherwise, it will
assume that the item drawing later on will fill the background anyway.
We also never painted the background for empty rows.
However, if the item's background is semi-transparent, then the row
needs to be drawn first, so that the correct background shows through.
And for empty rows, we need to draw just the background. This is
especially important for trees with alternate background colors.
Add baseline test case for this particular combination. This will result
in a minor change to the results of the existing
transparentBackgroundNoBorderForBranchIndicator test case, where now the
background is drawn behind the indicator area when the item's background
is semi-transparent. I don't think this is a bug though.
Fixes: QTBUG-123632
Change-Id: I2cd4efb748aaefc03a3b576458b750ee47479e97
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit b780eaf6a063a7efe03417cf6b7008a188e222a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
VxWorks, at least as used in the 6.8 CI, has a problem with move-only
lambdas passed to QThread::create(). This might have been the reason
for the resurrection of the cxx11_future feature in
408430a543ef605157963b1a894847c7ba9f9956.
This patch tries to work around the issue by not moving the promise
into the lambda capture, but caputuring it by reference, and then
moving it into a local stack variable. In all cases, the ThreadWrapper
is created after the promise, so, since the ThreadWrapper dtor join()s
(like jthread), the promise out-lives the thread, and the destruction
of the promise happens-after the join() with the thread. So, no data
races. Code mustn't touch the promise object from the main thread once
the ThreadWrapper has started, but that's the case already and the
test functions are small enough for any such future use to be obvious
in review.
Amends 385f0732d9 and
4e1b20893aeeb9580bc6b52ac4baea297675bfee.
It appears that dev no longer has the problem¹, but apply this to dev,
too, to maintain consistency with the test in last three LTS releases.
¹ 4e1b20893aeeb9580bc6b52ac4baea297675bfee passed, but its cherry-pick
to 6.8 did not
Pick-to: 6.5 6.2
Change-Id: If1feba9d3a7f8677789d45fa9f4990cf44145709
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4d6cf54664a98e01d4caab42431c62d6deb9f86e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They are an unnecessary hit on build time.
Rewrite the tests using the standard Qt conventions.
Change-Id: Iac47e62c58b1805c3b4a0ac4f4b3db206c66cc65
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6ddf74716d7b2fe0df5dd9c0172f9ecf936d5c5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the window that the sheet (as created for a modal dialog) lives in
has already been destroyed by the time the sheet is hidden, then we used
to trip an assertion. Instead, always use the sheetParent, which is
still alive.
Add a test case that asserts without the fix.
Fixes: QTBUG-128302
Change-Id: I4c399b73e2552bab79358c5505f403efa8e4f80b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 332f49f2d8c5675bab8bde6acfb377d567961d4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some of the new imageIO plugin tests recently added would fail in
static builds, since the search order is different then.
Fixes: QTBUG-130739
Change-Id: I074bb1bd314e8ff9a6ea90ba0cd27985aca5ad75
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 8f5ee7acbdf957ecb4568927df24bd5076da3262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When applying an "obliquen" transformation with Freetype, this
applies a 12 degree horizontal shear on the control points of the
glyph you have loaded.
However, any other transformation we set on the glyph will be
applied when loading it. So if you have e.g. a rotation on
the glyph as well, then this will be applied first and the
rotated glyph would be obliquened instead, now along the wrong
arbitrary axis in the rotated coordinate system.
To fix this, we detect the case where a transform is applied and
multiply in the obliquen in advance. It means we have to duplicate
some code from FT_GlyphSlot_Oblique() which might get out of
sync (if the slant angle changes in a newer version for instance).
We limit this to the cases that are currently broken so that we
avoid messing with any working use cases.
[ChangeLog][Text] Fixed an issue where artificially obliquened
text would look incorrect when other transformations were also
applied and the Freetype backend was in use.
Pick-to: 6.5
Fixes: QTBUG-97436
Change-Id: I61c5d007e9ea9be2beb283a8b8abbed7723bab38
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit db8230715aa115dc2da5177bb1824fb40c5f2569)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's nothing in our documentation saying this is permitted, but we
have specific code for it on Windows and it works on Unix because we
just wait on a QWaitCondition.
Change-Id: Id6331fa9aad473cb4f35fffdf8bb04d9a34cd108
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5b5297fe87859f59a7aaf5e86a8915c00714fefa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We already disallow them for classes; this was a mistake in not handling
the "struct" keyword. The C++ syntax is valid, but moc is unable to
parse two classes at the same time. Users can define the inner outside
of the body of the outer class and that works.
[ChangeLog][moc] Fixed a bug that caused moc to attempt to parse a
nested struct (not class) with meta keywords and this produced code that
wouldn't compile. Nested classes and structures are permitted, but must
be defined outside of the declaration of the outer class.
The fix for this revealed a bug in the presence of Q_DECLARE_FLAGS for
inner classes. This can be easily fixed by moving the token for
Q_DECLARE_FLAGS value outside of the [Q_META_TOKEN_BEGIN,
Q_META_TOKEN_END] range.
[ChangeLog][moc] Fixed a bug that caused moc to reject a class (not
struct) containing Q_DECLARE_FLAGS that was defined inside the body of
an outer class containing Q_OBJECT or Q_GADGET.
Fixes: QTBUG-130498
Pick-to: 6.5
Change-Id: I2a3f148f70280e87302afffd3e7617e5861bb338
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4e4eef175bc0d0e2a34875ae98f2ddf9eee73b35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Lambdas that only capture by reference never need to be mutable.
Drop the keyword (and the now-superfluous parentheses).
Amends 385f0732d9.
Pick-to: 6.5 6.2
Change-Id: Iaa6451c1c26f1aed198c447ee59198c4e0285b15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 37daf732d5089c58a6428124263243509d152987)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends ff9818135db28e287e7818defd9c1a9acdebacdc and follow-up changes,
which shouldn't have passed CI as they resulted in runtime warnings
until ca8ca216dbd5d374aa05d96db8052c2411baae7c.
Change-Id: Ib3688779d5bcba06ce992453e62fb841251f6a62
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3662be51935827e2fdb384bc407e055470e831c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changing the default section size requires that we inform the parent
view of the header about size changes, and that we update the header
so that we repaint with the new section sizes. This didn't happen.
The private setDefaultSectionSize implementation does all that. However,
QHeaderView only remembers if the default section size was explicitly
overridden; it doesn't care if individual sections were resized, and
overwrites explicitly resized sections. This breaks QTreeView, where
calls to setColumnWidth resizes individual sections, but a style change
(e.g. when setting a style sheet, which results in posted events) would
then overwrite all section sizes with a new default.
To fix that, only resize those sections to the new default that had the
old default before.
This still breaks tests that assume that changing the default section
size will affect sections that have been explicitly resized. To make
those tests pass, and to minimize behavior changes, also resize sections
to the new default section size if they don't have a valid size before,
and adjust the problematic test to resize all sections to 0.
[ChangeLog][QtWidgets][QHeaderView] Changing the defaultSectionSize no
longer affects sections that don't have the old default size.
Fixes: QTBUG-116013
Change-Id: I02fee3f7fda66f4d982bacea1b4a8b14c896bb65
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 32578a088db5769e919a4ec5ebf33346479e7a68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we change, reset or update the default section size, e.g. in response
to style changes or programmatically, then we don't want to override
explicitly specified column widths in e.g. a tree view.
Add a test that verifies that we don't overwrite.
Task-number: QTBUG-116013
Task-number: QTBUG-122109
Task-number: QTBUG-123154
Change-Id: I3d9a6ac685da39a59436b91f56e86b0f705e645c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 3ca0288aa927108de4c57119d9767998021a6089)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use QCOMPARE_* macros to compare results, and use a qScopeGuard to emit
diagnostic output in case of failure.
Task-number: QTBUG-116013
Change-Id: Id13ba70244d5c58c14c088619dbf0ee835492eb7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d9098760134bad9c1d18837a204ea7fb26d30e43)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Extract a helper returning the transform from
QGraphicsViewPrivate::mapToViewRect() and use that.
Fixes: QTBUG-128913
Change-Id: Idc31f653c23cd7d0e5bbb8af560f010f01ac4d4b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit deb4e08c1212aa3d43f62f9e7211bf69d3be0ada)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not all test cases inspect all of failed, then, and canceled, but it
doesn't hurt to always collect all three.
Avoids having to write the same type of code over and over again.
Amends bf3fc5c95c (but really
1f22fc995a and
855c448469, which each duplicated the
initial pattern without refactoring).
Pick-to: 6.5 6.2
Change-Id: Ifb2a3589f8aed9017fbdff20e4edb64e8c9e2488
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 9d0da873f0ddadb60e61fbd6c96c8b00f026e99f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In unit-tests, blocking operations should be timed, whenever possible,
so that a proper failure is logged instead of a watchdog timeout
(which is reported as a crash).
Wait for 60s and wrap the wait() in QVERIFY(). Since this can fail,
mark ThreadWrapper's dtor as non-noexcept.
Amends 385f0732d9.
Pick-to: 6.5 6.2
Change-Id: I3462017cb1a7580c901b98e9b1c3741853f32dc6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 32d12c2ebace41361c789e5aa58430ebf9f687b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 7a7f2547f3, which added the triplet
including the script before the language_Territory name without it. The
truncate-from-the-end algorithm in QTranslator ended up trying the pure
language first, and - if found - ignored any more specific territory-
variant that might be present.
To fix this, replace the truncate-from-the-end algorithm when we try
to find files, and instead create a comprehensive list of fallbacks,
avoiding duplicates as we go along. Insert those fallbacks right after
their base-entry. We then try to find files for each entry, with and
without the prefix.
This fix is needed only in 6.8 and 6.5; from 6.9 onwards, the change to
QLocale::uiLanguages in 84afaafc9c6968dd76fcadc5392065d340543521 fixes
this on the correct level, making kludges in QTranslator unnecessary.
As a drive-by, replace int indices in for-loops with qsizetype.
Fixes: QTBUG-124898
Pick-to: 6.5
Change-Id: Ia3deceb4ed2c6ef5ca0a815cc7b8878bf29ef088
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Fix tst_QSqlQuery::lastInsertId() for PostgreSQL - there must be no
other query inbetween insert and lastval() to acutally receive the
correct last inserted id.
Change-Id: I6c5bda4b1e54ec89b80caa6abf7afcc9cfe1e28b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4b9631359bd3c1cae7344846193e3d10c3a54725)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We calculated the expiry at time of download by looking at Max-Age, but
as long as must-revalidate was true we would just perform the network
request anyway.
One issue this, further, highlights is our PreferNetwork and PreferCache
options having no behavioral differences while being documented to
do different things. They both consult the cache first and returns any
non-stale data from there.
Fixes: QTBUG-128484
Change-Id: I24b62e2bb072446e463482a778da7cfbd82a6835
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit e4a35df2afc306e566884f3d917daa08e41761f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename it to just LIBRARIES, as PUBLIC_LIBRARIES is not meant to be
used in tests.
Change-Id: Idcf35e2834de44b2dd8d11cdef0205b11e89d377
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 492deefc17435bef03964382e0abadb16d86669c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Valgrind does not support those instructions yet so these tests always
fail. Skip them.
When it gets support for them, we can do a version check.
See https://bugs.kde.org/show_bug.cgi?id=383010
Change-Id: I954b2b6a9bbef1a31833fffd1cc4bc33dce353ed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 0b41b81b9febc8f0dafd0a6a8e6571333e5415d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When Q_PROPERTY is used to define a property with type (for example)
Qt::Alignment the name of the type stored in the meta-object is
"Qt::Alignment".
When QMetaObjectBuilder.addProperty() is used it will instead use the
name of the meta-type (ie. "QFlags<Qt::AlignmentFlag>") which it has
obtained from QMetaType::fromName("Qt::Alignment").name().
In the QMetaProperty ctor it tries to resolve the QMetaEnum for the
property and uses the internal parse_scope() to extract the scope and
qualified key from the name. However it does not handle template names
and so fails with dynamically created properties.
This change to parse_scope() removes the "QFlags<>" so that the
template type can then be parsed.
Another solution would be for addProperty() to always use the type name
it was given rather than use QMetaType::fromName(). That has the
advantage that the layout of the dynamic meta-object would match that
generated by moc.
Change-Id: Iac9e2db2f134029709158b4e500286922396501d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5624060865e3ccd3c487f10355cb740b7322f93c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows, file- and directory-names that end with a space (or a dot)
are invalid, even though it's possible to create them. Same for names
that start with a space (but starting with dots is ok). Even Explorer
chokes when trying to then delete or rename such a file or directory,
and often the only way out of the mess is to operate on the 8.3 path.
In Qt, we only sometimes fixed such paths by removing trailing spaces
and dots. This still made it possible to create a "bad " directory in a
non-native file dialog, which could then not be deleted. The node tree
even ended up with both "bad " and "bad", neither of which was handled
correctly.
Fix this by always chopping trailing space and dots when adding or
modifying a node, amending 3693d3d2a1e76f6e6d41db340505e00c6ddaeda1.
Fortunately, this can be reproduced with QFileSystemModel, so add a test
that exercises it in the same way as QFileDialog does, e.g. both by
creating the misnamed directory directly, and by renaming a directory to
an invalid name.
Given that this is very broken on Windows Explorer as well, don't
cherry-pick this back into branches under strict change management.
Fixes: QTBUG-129028
Change-Id: Iec1edf9fd2548dda4567134a9b5cf3e298589c19
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 53df22b42d73dbb48bc25ad05500993df56b928c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Need to enable element_type unconditionally, to direct the default
std::pointer_traits::to_address to fall back to operator->().
[ChangeLog][QtCore][QList] Fixed std::to_address() on QList::iterator
on older compilers.
Fixes: QTBUG-130643
Change-Id: I521f327933c51ca87c511a7741b2dce65094032b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit b8c879f273533d87f52dbc8e9d2f9b3b3566cd60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a class has an opt-in, the test should test both.
Pick-to: 6.5 6.2
Change-Id: I3b200a2f8e96c62b0c38ae735cb9f7e6786375b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c198a67bfb3fea21ec06f72ea08107c4da6e88f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Like QString, QChar also changes API when said macro is defined.
So, like tst_QString from 8420d3e0b2
onwards, also compile tst_QChar under it, separately.
Pick-to: 6.5
Change-Id: I81d25d5bfae78b1a11d47e49aa618d079c4b09b7
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 167b04aac89488a5f2005bd1f4dfde354f43c6a6)
It's not using keychains and not triggering a blocking system dialog.
Change-Id: Id2a3b74ab3647890747fba9b8d261ab3e60fb3bc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 07a0e4496ddf15ef469c3b244270300b9c855d44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As usual, when making a change, we find out that test coverage was
poor. Add such tests for QChar ctors.
Amends (should have been a prequel commit of)
9ef4c123c39c642357c9e8530d59f32f220a7824.
Conflict resolution for 6.8:
- adjusted static_asserts to old QChar ctor overload set
Pick-to: 6.5 6.2 5.15
Change-Id: Idcd9ab816ef815ce4a85dba1f7e37201b64c2203
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 69190a370d1e9f60c78f3096df62a61b6a5d1384)
To confirm the functionality of custom imageformats plugins in Qt
image reading, both for supporting new formats and for overriding Qt's
builtin formats.
Change-Id: I6abafdb47301ad1f35b19951e42b1f3b61fe6ec3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6eefe0ca59dc25f7953b93e8b80c62c78a6ccfde)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The total stack space available is 1MB, but each pointer is 8 bytes.
So we have to limit the amount of pointers we allocate on the stack to
somewhere below 128K.
Pick-to: 6.7 6.5
Change-Id: I1d1262a4048cf4b3fed8df813decc3e142430a32
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit b2e0ff4bca5d81205c8425cdc528e5c2a2988172)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>