COIN is using patched std::optional header for VxWorks, which is based
on 23.09 version of this system, and fixes few compilation and runtime
issues, unfortunately it introduced runtime error as well. This error
causes std::optional to not destroy contained object in destructor,
which is a source of fail in tst_QResourceEngine::cleanupTestCase().
This fail was quieted down using QEXPECT_FAIL for VxWorks, due to exact
reason being unknown at the time.
It was found out that unpatched version of std::optional header in
VxWorks 24.03 fixes most of issues found in 23.09, so there is no need
to use old header. Additionally it cleans contained object in destructor
properly, so this is the one that should be used. In order to use it,
COIN will need to refresh VxWorks images, but this in turn will fail
this test with XFAIL.
Replace QEXPECT_FAIL with QSKIP in tst_QResourceEngine::cleanupTestCase
for VxWorks, update comment accordngly.
Once unpatched optional version from VxWorks 24.03 will be used on COIN,
skip will be removed entirely.
Task-number: QTBUG-130069
Pick-to: 6.9
Change-Id: Ib446d04b2fabb027dad7af909ac00b7b30e76b53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's possible that the first ABI from Build.SUPPORTED_ABIS would return
an ABI that's not packaged in the APK, for example if an armeabi-v7a APK
is run under the device supporting arm64-v8a, in that case the returned
path would be that of an arm64-v8a while it's not actually packaged
inside the APK.
Fixes: QTBUG-132155
Pick-to: 6.9
Change-Id: I0f311accee246fa2d1d0b8aaf424d034b4b2d04c
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
The test gets a string representation of a key sequence by stitching
the individual parts manually. It is not a portable approach and the
test relies on undocumented behavior of QKeySequence::toString().
A more reliable and portable approach is to pass the Qt::Key value to
QKeySequence and let it do its magic.
Change-Id: I2a0e8734c93fa4f86f11324f26d8967d22e14247
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The bug, QTBUG-121418, was actually fixed earlier by commit
84afaafc9c (or, for 6.8, commit
8c40e8cf12), but escaped our attention
at the time.
Fixes: QTBUG-121418
Pick-to: 6.9 6.8
Change-Id: Ie24eb172674189079aede7a39584ea760aac1b0c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Tests input method hints, but currently does not work and does not
check these properly.
Remove as broken/irrelevant
Change-Id: Iad1bc2a14d2e69b13b7f882b1191d3b810c26c43
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QShortcut has a constructor that takes a _parent_ object and a
function to invoke, and it will internally connect its activated()
signal to that function. This connection will not provide a
context object (the parent is not used to this purpose).
Given it's not clear what the context should be if any (the parent?
`this`?), I'm not at ease at just supplying "something" as the context.
Instead, hide the constructor if we're under QT_NO_CONTEXTLESS_CONNECT.
There's another constructor where the caller can supply a context.
Change-Id: I21befcc86eeb07e65eadee1222757ecc5bab1d2c
Pick-to: 6.9 6.8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
COLRv0 fonts are both scalable and in color, which was not
previously handled in the Freetype backend because it only
supported color fonts with embedded bitmaps. This patch
simply correctly detects the scalable color fonts and
render them through the same mechanism as other color
fonts.
[ChangeLog][Freetype] Added support for COLRv0 format color
fonts.
Pick-to: 6.8 6.9
Task-number: QTBUG-131116
Change-Id: I290e7525c24b4cf2ec872a366e5193f54712a3a4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Running Chrome in headless mode helps to circumvent
a lot of issues with GPU driver/Wayland interactions
that we encounter in CI.
Run Chrome in headless mode if corresponding environment
variable is set.
Pick-to: 6.9
Change-Id: I1cf290f484054766e2b99d99045e7b39d5662210
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Since the removed API uses QDebug. Requested in code review.
This is needed for a subsequent commit (removing qdebug.h from public
headers when possible), but I split out to its own commit to ease
backporting.
Pick-to: 6.9 6.8
Change-Id: I76980634b9ebbae7cf010d99f5095aa94a825824
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The class declares a protected destructor, which interferes with the
RO5. The only subclass in qtbase is move-only; QTextCodec (in
Core5Compat) is not even movable.
Make QStringConverterBase move-only as well.
Pick-to: 6.9 6.8
Change-Id: I20d16df79f7ad8e7e7a8af339954cfa2d1482e96
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since the function is implemented to return 0 for many non-alpha-numeric
keys already, make that the default implementation and remove the
Q_ASSERT(false). Instead, emit a warning.
Amends 1a82056000, after which the
QQuickShortCut test in Qt Quick trips the assert.
Change-Id: I6c6ac0a80043c1bbb7683bc47c1092a12b9cf230
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Jules Bertholet <julesbertholet@quoi.xyz>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The data for the CLDR update was generated from an incorrect xnr.xml
that has contained an extra < and hence the generated
qtimezonelocale_data_p.h is also incorrect.
Update qtimezonelocale_data_p.h with the correct CLDR v46 data.
Task-number: QTBUG-130877
Pick-to: 6.9
Change-Id: Ibc87e137b1519be470704ed519c0988333625af5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This looks like another case of a base class with a protected, defaulted
destructor, which interferes with RO5. Explicitly redeclare the other
special member functions in order to suppress the warnings coming from
the deprecated copies.
Pick-to: 6.9 6.8
Change-Id: Icf8c8817ef001d0503683d071c4f004db64caa2d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
I'm not entirely sure why function_ref_base declares its destructor. I
guess it's declared in order to make it protected, because the class is
non-polymorphic and inherited by function_ref, and one may want to avoid
slicing. On the other hand, function_ref_base is an implementation
detail, living in a `detail` namespace; so that sounds very unlikely.
In any case, the class is clearly meant to be copiable, so add back
(as protected) the missing special members.
Pick-to: 6.9 6.8 6.5
Change-Id: Ibf909e1746e65eecf8b8990839a6e4c9eb56ca13
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Flat buttons were larger than normal buttons - therefore also add
marginsRemove(QMargins(2,2,2,2) for the flat case too.
Pick-to: 6.9 6.8
Task-number: QTBUG-132433
Change-Id: Id010d45bf85c5d7d09ff8db8bda44b1be7d85297
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Found in API review.
Amends afd0bb28fb.
Pick-to: 6.9
Change-Id: I694dfc3f16ea90bca07a47c1d57ba1cf21b23f1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
So it's less ambiguous in case there's a comma in either the pattern
string or the replacement one. It will still be ambiguous for strings
with quotes themselves, but escaping requires content not present in the
bootstrap library.
Drive-by test that unsigned and floating point also complain.
Pick-to: 6.9
Change-Id: Ia8ca184a7d54b240d653fffd631dbcb7f9e1c97d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Amends Qt 4.8 commit 8dd8db250d92521fda619bdcf3e1c859b37b2da0.
The report in QTBUG-12673 says "quit()" and the backtrace clearly shows
the issue was attempting to cleanly exit the event loop while a modal
dialog was showing. The test instead tested ::exit().
That was actually an important test because nothing else in the Qt test
suite was testing this, but now it's included in the exitFromEventLoop()
test for QCoreApplication, QGuiApplication, and QApplication.
Task-number: QTBUG-12673
Change-Id: Ie7bd19af7103f3066b10fffda299d1168c8f677e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Dynamic linking on WebAssembly involves preloading .so libraries
during startup of application. Normally, those plugin preload
lists are generating manually by user, which can be tedious.
Add a bash script which demonstrates how to call python
programs to generate preload lists.
Pick-to: 6.9
Change-Id: I0a9869ad0d26606f8b33af2c38248cec3088dd0d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
... instead of Q_NORETURN, as the attribute should be unconditionally
available since C++11.
Amends bad618606d.
Found in Qt 6.9 API review.
Pick-to: 6.9
Change-Id: Ia008acf0777867f551c7e1cc3423f29f8ed6fbed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As that will steal focus from tst_QApplication, which is needed for
subsequent tests.
Pick-to: 6.8 6.9
Change-Id: I5720c4a2bb45f98894616e01da10b9c40a2b6735
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The call to q_assert() isn't constexpr, so can't happen in a constexpr
function. Most compilers shrug this off as they can see the code
actually is unreachable, but apparently debug builds on QNX can't work
that out. Since nothing actually needs the function to be constexpr,
remove that qualifier. In the process, move the offset-case, which is
also unreachable, to the end of the switch, closer to the unreachable
end of the function (since I failed to spot that there were two
unreachable parts at first).
Pick-to: 6.9 6.8
Fixes: QTBUG-132698
Change-Id: Ibdde7abd91d284e1c1af53e2b5e142fc234400a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Was missing from this new value type, and is quite useful for this type.
Addresses API review comment.
Pick-to: 6.9
Change-Id: I07ea7ded7f963b2032c377f024bb88e9d54a4d5c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
They were in a separate block as a result of this file previously being
used for two sets of bootstrap builds: qmake and Bootstrap. Therefore,
this amends commit 43c28aa904 ("Use Core
library for qmake instead of the Bootstrap library").
Nothing checks QT_NO_TEMPORARYFILE any more, so remove that instead of
moving, thus also amending b57a9a3cd9
("Bootstrap: remove QTemporaryFile").
Change-Id: Ib5c5500be2898f72b333fffda91ec1f6bfe83353
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
It's unused, aside from an equally-unused #include.
Change-Id: I6ecd9e5ac0036241201efffd7b009a960d88dc43
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
There's no more rcc.pro and rcc hasn't been bootstrapped since 6.0,
because we don't need it to store the QMimeDatabase databases.
Change-Id: I8fd9211b20a0d794d4abfffdeff99fb4ede5475b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Amends 9e214cbcdd ("Bootstrap: remove
QRandomGenerator"), which was the only user of both getauxval() and
getentropy().
Change-Id: I7d8c223b3bbfd86ef997fffdf046e2f4867889ff
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
The three bootstrapped tools should validate their arguments properly,
so there's no need to have them print something. They aren't means to
test the Qt classes either, so assertions shouldn't apply.
Change-Id: I580758610c7262414b64fffd54f84eb16743673d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
And fix some compilation bugs if QT_NO_DEBUG_STREAM is defined.
Drive-by fix the grammar in the qcommandlineparser.cpp qWarning().
Change-Id: Ia9287ea189ae4a4b7545fffdbff7dbb9196de519
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Java methods of QtAbstractItemModel may get called from Qt GUI thread or
Java main thread. Situation is the same with internal proxy methods,
where they may directly or indirectly called from these two thread.
At the same time, a chain of calls may happen from these threads, so
some functions may get called indirectly from a single caller thread.
In this change, we are adding a map of QObject* to QRecursiveMutux
where the QObject is a QAbstractItemModel, either the proxy instance
or a reference to an underlaying QAbstractItemModel when the model
is implemented in C++.
Each call to any function locks the QRecursiveMutux instance associated
with the QAbstractItemModel instance. A connection from
QObject::destroyed to a lamda, helps to remove the map entry when
the model is destroyed.
Pick-to: 6.9 6.8
Fixes: QTBUG-127467
Change-Id: I18dcdc207e201b3883526648b4e672e5868ed8ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This is a non-polymorphic class, so explicitly export only the
out-of-line methods.
Amends cc128d802c.
Found in Qt 6.9 API review.
Pick-to: 6.9
Change-Id: I30af1121bce1ba9c57cb326cffb1375ac3b22195
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The qthreadstorage.h header contains two implementations controlled by
the QT_CONFIG(thread) definition.
Commit 8553ffd8d1 changed the positions
of the namespace macros in the header, but didn't consider the fact
that we now include std and Qt headers inside QT_NAMESPACE in the
!QT_CONFIG(thread) case.
Fix it by moving all the includes to the top, and wrapping them in
the needed QT_CONFIG() checks. As a drive-by, drop the unused
type_traits include.
Found in Qt 6.9 API review, but picking down to 6.5, as that's what
the original commit did.
Note that 6.5 cherry-pick will require to replace <memory> with
QtCore/qscopedpointer.h because
6da1f72311 was never picked to that
branch.
Pick-to: 6.9 6.8 6.5
Change-Id: Ic9c5fe82df38a3bd64829c016de8dcbd9f060315
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In preparation of adding QT_NO_SCOPED_POINTER, which would be rather
pointless for users if public headers continued to mention the type.
Pick-to: 6.9 6.8
Task-number: QTBUG-132213
Change-Id: Ib5a40a1b8defe1cfe858218bb25c422f900dfe6b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When converting an implicitly-shared Qt container to QSpan, the QSpan
ctor would call .data(), which detaches said Qt container (if it's not
const). This is what must happen for mutable spans (QSpan<int>), but
is not necessary for non-mutable spans (QSpan<const int>).
Fix by copying the potential const from QSpan::element_type to the
Range object in the resp. QSpan ctor. This makes a QSpan over a const
element_type mark the range const before passing it to adl_data() (=
member-data()). For a non-const element_type, nothing changes.
[ChangeLog][QtCore][QSpan] No longer detaches implicitly-shared Qt
containers converted to QSpan<const T, N>. Note that std::span<const
T, N> will, however, detach such containers, so we recommend to use
std::as_const() with implcitly-shared Qt containers, as always.
Fixes: QTBUG-132133
Pick-to: 6.9
Change-Id: I9fdae20994d2c900bc5b45b44db3901d10f8838a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QException has an out-of-line destructor in order to pin its vtable.
But like any std::exception subclass it's meant to be (and effectively
is) copy-constructible and copy-assignable (cf. [exception]/2).
Add the missing copy operations, and the default constructor.
One may argue that this class should use some other approach since it
also has a polymorphic clone() -- for instance disable assignments and
make copy constructions protected -- but that ship has sailed.
This prevents a Clang warning about the deprecated copies in the
presence of a user-declared destructor.
Change-Id: I4d8613ade265ea85a5a7e97255b75b7fcf3e5a27
Pick-to: 6.9 6.8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's unnecessary and just generates warnings due to the deprecated
copy operations.
Change-Id: I7aac7efc215dffb3298951972280f7a2ff6ef72c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
So that the pthread_key is destroyed much later than now, at QtCore
unload time instead of a bit earlier in exit(). That's important so it
runs later than the Q_DESTRUCTOR_FUNCTION for QLibraryStore
(qlibrary.cpp), which is what unloads plugins, whose unload-time
destructors may be attempting to quit() & wait() for their worker
threads.
I had to keep the destruction of the exiting thread's adopted thread
where it was: a function-local static's destructor. As noted in the
comment added by 1da7558bfd, we need
QThreadData::cleanup() to run before the libraries start to unload
because we need to delete the event dispatcher.
Init priority 10 will place it after the QHash random seed and qsimd
initialization, on ELF systems and on Windows. On other systems (incl.
Apple ones), the order probably depends on the order of the files in the
CMakeLists.txt. I thought that would mean the destructor for thread/
would run before plugin/ but that apparently is not the case. But that's
fragile.
Amends 1da7558bfd, which amended other
things...
Fixes: QTBUG-132697
Task-number: QTBUG-102984
Task-number: QTBUG-132381
Pick-to: 6.9 6.8
Change-Id: Id7263d6ffe7a5949cd84e35d942ad0e02df1b455
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit adds one unusual creation and three more unusual exits:
* creation of the Q*Application in a thread (QTBUG-130895)
* exits using ::exit() instead of returning from main():
* from the main thread's event loop
* from an auxiliary thread
* from inside an auxiliary thread's event loop
All of these exercise the moment the QAdoptedThread & QThreadData for
the main thread is destroyed, which are, respectively:
* thread exit time, running thread-specific destructors
* inside exit(), running atexit()-like callbacks (qthread_*.cpp)
* [tst_static_q*application] inside exit(), running static destructors
(added in commit 1da7558bfd)
Unlike the tst_static_q*application tests, the calls to ::exit() cannot
be a regular QtTest because that would cause the log output to be
incomplete. The threaded Q*Application could be a test of its own, but
since I needed to add the helper anyway, I chose to add the test there.
For the majority of the tests, the failure mode is going to be a crash
on exit.
Task-number: QTBUG-12673
Task-number: QTBUG-132429
Pick-to: 6.8 6.9
Change-Id: I1062ef500356bd97dd0cfffda4aeeda9afa138e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The class defines a destructor, but it's also meant to be copy/move
constructible (being a shared data for QCbor* classes). On the same
note, the class is not meant to be assignable, as doing so would corrupt
the refcounting, so delete those operations.
Change-Id: I7781773da86b26544f9389337bfc059d9483fef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
I'm not sure why this code had copy constructors taking by non-const
reference. Add the missing const.
Change-Id: Ie6d1cb6eab7b829a59e21f1874b041a00a52d1e9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
There is no need to search for high-res svg icons - a svg scalable by
design. Also the QSvgIconEngine does not support it.
Pick-to: 6.9 6.8
Change-Id: Ib76c887900ce77268e9c0253cb697b8de9e7f10e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>