It turned out that we've been maintaining both displaceFrom and its
copy, `where`, in parallel.
This is not needed, so only maintain displaceFrom.
Pick-to: 6.8 6.5
Change-Id: I8c13420ae3fd284e362c4dd1f1b06d2847780c86
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f18e8cebfcb9053bec3221f88a3944a781114530)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Issue the event when geometry has changed to match QML.
Task-number: QTBUG-115926
Pick-to: 6.8
Change-Id: I31d87a2b07c1cbdb31063bdbf146f21310103798
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c1fba2d4ee47d2ce69b56d69629cd13b1439a107)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All callers of replaceOrAppend() (present and future) pass an rvalue
`value`, so take advantage of C++17 guaranteed copy elision, take
`value` by value and move it into place.
Even for implicitly-shared classes, a move (pointer swap) is cheaper
than a copy (atomic ref-count upping/downing; ca. 100x slower than a
normal int).
Amends d8f6425fef1050525480afec662a417a7645c22e.
Pick-to: 6.8
Change-Id: Ia52a2ec2c079f515f92b0890e42669d4ba435c20
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 8761fa5b8bec2f9b80550523e824f4e3141aca49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complained that mapSize was used in ~FdWrapper uninitialized
when the object was destroyed before map() had been called on it. This
is a False Positive, because in that case, ptr == MAP_FAILED, and we
wouldn't be reading mapSize.
But be nice and split the FdWrapper class into two, by creating an
object managing only the mmap() part of equation and returning it from
map(). The most-natural choice for such an object would be a
unique_ptr with a custom deleter, but that has built-in knowledge of
nullptr (ie. doesn't call the deleter on nullptr), which, at least
theoretically, is a valid return value of mmap() (the error case is
(void*)-1), so write a small struct ourselves.
Coverity-Id: 390668
Pick-to: 6.8 6.5
Change-Id: I43d635617bd26120cf402241bf59680fe63d071a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1d2dda041a419740dff16dbb4addc6d93583f08d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They were left in to for easier reviewing when the old function
pointer table was changed to this switch. In this second step, we can
now collapse adjacent duplicates into one each.
Pick-to: 6.8 6.5
Change-Id: I7b7fa8991817895a01c63251ab3b0ecc95b5756b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 455e0ff42a68849b8d76dd8fbac58a35fa2dc866)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complains, for each findKnownValue() call, that "forming the
address of the element at index numValues of buffer start requires the
index to be no more than the number of elements in the buffer", citing
QCss::NumKnownValues (e.g.) as the out-of-bound index.
Since it's complaining about the initialization of `start` in
findKnownValue(), I can only assume that it is bothered by the `+
numValues` (which moves the pointer out of range) followed by the - 1
(which brings it back into range), so make sure we subtract 1 before
adding to `start`.
That array + numValues would be considered outside the array
(incl. one-past-the-end) is highly irregular, and, AFAICT, caused by
the arrays not storing the resp. "unknown" entry at index 0,
effectively turning the arrays into Pascal (base-1) ones.
Shot in the dark (and a sign of poor/overly-strict deduction
capabilities in Coverity, if this is actually fixing the issue), but
worth a try.
Amends previous fix attempt 204b6c99089bcf7893be326e7d0076402b7abf0c.
Pick-to: 6.8 6.5 5.15
Coverity-Id: 183557
Coverity-Id: 183559
Coverity-Id: 183560
Coverity-Id: 183569
Coverity-Id: 183573
Coverity-Id: 183574
Coverity-Id: 183579
Coverity-Id: 183584
Coverity-Id: 183585
Coverity-Id: 183586
Coverity-Id: 183589
Task-number: QTBUG-83817
Change-Id: I3ad1f744986fe3223571a919b8a537c544ef314c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 66081c52b5b4017ae141f8fa27bd082be1e79422)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code used a `<QString>` to indicate an object of QString
type. I have not seen this pattern used elsewhere, so rewrite the
expression to say "call X on the QString" instead of "call
<QString>.X".
Also, the constData() link in the expression ('X' in the previous
paragraph) was unqualified, so resolved to QString::constData(), but
the result of toLocal8Bit() is a QByteArray, and it's thence the link
should point to. Redirect it manually whereever we fell into that
trap.
Amends the start of the public history.
Pick-to: 6.8 6.5 5.15
Change-Id: I2204522351976be0f045bfd60a30c82c9e784dd6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ab1ce95c8ce38683477373cf84ba5686ea00efed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These files process raw end user provided data and
apply structure to it, through layout and Unicode algorithms.
Extra care should be taken when reviewing changes to these
files.
Pick-to: 6.8
Change-Id: Iba86aec1a185bbbcd40aa2b8d4d0d839bb99ba0d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 2198cdc40630713670064334fb34dc2255980800)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These files process raw font tables from untrusted files.
Pick-to: 6.8
Change-Id: Ie7fbfb667984e2d003b343a2ce011ad0e5aa04d2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 6704e55a9c04014097cc2e90fd75b20ae5da56c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This makes explicit that the only thing that should be changing is
displaceFrom, which tracks the hole-filling process.
Requires rewriting of the dtor a bit, to skip the nInserts
modification.
Pick-to: 6.8 6.5
Change-Id: I1f0ce17cbeb171704f789624ad1be6ef70e58245
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 75df3a250d84a7e2680a8f229d11eec20b2d3ff0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since the ctor is now the only caller of displace(), we can inline the
latter into the former, using ctor-init-list to initialize the
members.
Also fix decltype(bytes) to be size_t, which is what memmove(), the
only user of the value, expects, and ptrdiff_t * sizeof(T) yields
(found by GCC -Wnarrowing complaining).
Pick-to: 6.8 6.5
Change-Id: I3f93e28eebc6deefee8a182eb71a3b0958718ba0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 82d4a81df19fe9aff9d3b1790c2b371a3efc0a99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While QTabBar is created by the QTabWidget and therefore doesn't
need to be guarded, QTabBarPrivate::init calls QStyle::styleHint
which might result in QStyleSheetStyle querying properties on
the QTabWidget while its QTabBar isn't assigned yet.
Pick-to: 6.8 6.5
Change-Id: Ic832d3253c5dc54d8d718760c63f34f0b8bde000
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 61c2d3f10124dbf4c6ddb44bc9790431bd389567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is almost always the case in a typical Quick or Quick 3D rendering
sequence, since there is almost always a uniform buffer, which is almost
always a QRhiBuffer::Dynamic buffer, thus triggering double (or triple,
whatever max_frames_in_flight is) buffering and using multiple
descriptor sets.
This breaks down e.g. when using a compute pipeline and a
texture for imageLoad/store in the srb. If the texture is rebuilt
between frame N and N+1, then in frame N+1 the srb sees that the
descriptor set needs to be rewritten, but that's wrong since frame
N might still be in flight, using that descriptor set.
From now on, pretend that an srb always needs double buffering,
regardless of what kind of resources it references.
Also drop unused code paths. The updateShaderResources function's
argument was never -1, for example, so no point in keeping that logic.
Pick-to: 6.8
Change-Id: If8abb42fd9a2de5aad59ab6ceab3c8086aebae68
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 30dc9ed13fcc2691ed656f6f36d419133856c8cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Have two pipelines that are used with the same srb:
setPipeline(a);
setShaderResources(s);
draw
setPipeline(b);
setShaderResources(s);
draw
If this is repeated each frame, then on the second an subsequent frames
the uniforms for the program behind pipeline b will not be set,
i.e. the glUniformxx calls will be missing.
This is due to the pipeline's own srb tracking
(currentSrb/currentSrbgeneration) works: in the second frame
setShaderResources(s) for pipeline b will do nothing, since
the command buffer's tracked current srb is already s, and
also b's currentSrb is already s.
The problem remains hidden usually because Quick or Quick 3D
does not generate sequences like the above (same srb with different
pipelines).
Pick-to: 6.8
Change-Id: I56b962f0ba12370e0de7c87fb7178a0b9e4b0178
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit e9fa3e42444faec33a33f4c6ce673f08db2280eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The expectation, based on what the other backends do, is that all array
layers and 3D texture slices are exposed (i.e., the whole texture).
Same for cubemaps (all six faces), that at least was in place
already.
This is what the odd-named 'layered' argument of glBindImageTexture
controls. Set it accordingly.
Pick-to: 6.8
Change-Id: If6808069dfc9f3df124e508e40abf8c3423289da
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 25394fab9a3a501311601e45af310b3949dff2c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When used with load/store, it is already correct due to using
glTexStorage3D. On the other code path however, individually
calling glTexImage3D for all the mip levels requires adjusting
the depth for each level, as it is done for width and height.
Pick-to: 6.8
Change-Id: I440cc10303687b686d78da4c614da4325840803a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit efc911aa58195d2538be7b0343154038f3a2c3b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These files should not have executable permissions.
Fixes: QTBUG-125534
Change-Id: I893d4d373ee098864b64200dc6c88b57d05d6209
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ba103a6fee8e66748e2f3c52ce9f9e19ff89a850)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Introduce symbolic constants for the magic numbers 3 (= log10(base))
and 10 (= log2(base)).
- Add and use QtPrivate::log2i() instead of manual bit fiddling. This
makes the two cases nicely symmetric now.
Amends 9d23aebb271ea534a66cb3aceb2e63d9a1c870d6.
Pick-to: 6.8 6.5
Coverity-Id: 474294
Change-Id: I657f34878bc3a9b67b03a4d014b91e6d4de31e13
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 9fee7cdfcce00ce6500b8eebf67f4a6c91be98bd)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Hold 'fbo' in a (const) unique_ptr instead of a raw pointer, so it is
deleted even if a following QVERIFY/QCOMPARE fails.
This shows that the leak (cf. QTBUG-134557) is not due to the test
itself.
Amends dcbb16a45212d263496df1e5875da6205e4f5f53.
Pick-to: 6.8 6.5 5.15
Task-number: QTBUG-134557
Change-Id: I2f854d5ff036b7ca5e51d2e9ecb1d04bf7a39a61
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b615c477f6472f0e3935aea05c099966c1d3ef47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That's what asan reported for a run of this test executable.
Create `ctx` on the stack instead of the heap to fix the leaks.
For `fbo`, use a std::optional.
After these fixes, the test still leaks 64 bytes in 2
allocations. These seem to be QOpenGLSharedResourceGuards in a
QOpenGLFramebufferObject. Created QTBUG-134557 to track the issue.
Amends
- 68974d8e647febb80a47d9cf6ce9452f3ce4fa21 (fboHandleNulledAfterContextDestroyed())
- bb760d9514ed617ee8e7344152b3fa697b2c4171 (bufferMapRange()/bufferCreate())
- 0541516907da117c391b6c8d9820209673fcd9cd (vaoCreate())
Pick-to: 6.8 6.5 5.15
Task-number: QTBUG-134557
Change-Id: Icc318cd76b9f3ddf71bc294cb96d88485c42d7bc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 7a1cd692e0b36acfc005332b50d7ef3e11b94e71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
clang-cl does not support -ftemplate-depth. so we should not pass it
when MSVC is defined.
Pick-to: 6.8
Change-Id: I7f411187c476fa275b677f96a19f782262dc4545
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 39015c049b3f39a27737236b6740f7f5038ab75b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On CI an Android emulator with SwiftShader software graphics
implementation is used. SwiftShader implementation is unable
to emulate this OpenGL functionality.
Blacklisting removed. QSKIP the test if it is run in Android platform,
OpenGL and SwiftShader sw graphics implementation is found.
Task-number: QTQAINFRA-6330
Pick-to: 6.8
Change-Id: Ib0832f35b63540d57a273fc6dba1e310de917439
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
SH_EtchDisabledText is not widely used in fusion style and where it is
used it
- does not make any real difference for light mode
- makes the text look like one missed the glasses
Therefore disable this hint for fusion.
Pick-to: 6.8
Fixes: QTBUG-134533
Change-Id: I42fc20349603cf610ee725802f1095008eafd183
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c8338d8e77699d1b8d239a4cba30adf22f15acf2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
clang-cl does not warn about return after unreachable, but would warn
about the unused variable after return.
Pick-to: 6.8
Change-Id: Ia0fcff4f536d51d56eb915a9130cc3f72437d8d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1bdf5059ceae7b202f015728bf8817b644e2e5fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Turn the charAttributeFunction array of function pointers into a
switch. This has two benefits:
- The compiler now warns when we introduce a new QChar::Script value
and statically forces us to think whether a new attribute handling
function is needed.
- A table of function pointers requires relocations. A switch might
not. GCC uses a jump table to implement this switch, jumping to
distinct lea instructions fetching distinct function pointer values,
and thereby removes relocations, while Clang actually forms a
function pointer table and turns the switch into an indexing
operation (with compiler-generated guards). I didn't check whether
Clang's table actually requires relocations, relinfo.pl doesn't
report any reductions, but it's become unreliable over the years,
because it doesn't for GCC, either.
Difference:
qunicodetools.cpp.o:
- 0000000000000000 l O .data.rel.ro.local 0000000000000108 QUnicodeTools::Tailored::charAttributeFunction
0000000000000000 l d .data.rel.ro.local 0000000000000000 .data.rel.ro.local
See
https://stackoverflow.com/questions/19067010/finding-where-relocations-originate/19338343#19338343
for the script to generate this output.
See https://www.akkadia.org/drepper/dsohowto.pdf Section 1.6 for why
we care.
Instead of collapsing identical return statements from adjacent case
statements into one, keep the per-case return statements for now, to
aid review, and clean up in a follow-up commit.
Amends dd7d8304bbe599320b163b94e9a4ad9a6f35b740.
Pick-to: 6.8 6.5
Task-number: QTBUG-100536
Change-Id: Ic5b6bd29e3a3a88f0d194fa7d76272a4770b9840
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 74765ebe65b8b67b2d2bbe3f4fa3eb1879d030aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complained that ~Inserter() will access at least displaceFrom
and displaceTo uninitialized, which is correct, if none of the
insert() overloads have been called in-between. This is a brittle
construct, even though, currently, all users of the class comply.
To help Coverity (and other readers of the code) understand what's
going on, move the displace() call that creates the hole in the
container which the insert() overloads then fill from said overloads
into the ctor, original-RAII style (ctor acquires the hole, dtor closes
it, if needed). This means all fields are initialized in the ctor now.
This is safe, as displace() cannot fail by itself (just a memmove()),
but requires moving the (pos, n) (= hole) information into the ctor
instead. The displace() call in the insert() overloads now becomes a
read of its return argument, displaceFrom.
(Incidentally, that shows that we have maintained the same pointer
twice in the insert overloads, something we'll clean up in a
follow-up.)
In order to verify the insert() post-condition (ie. that we filled the
whole hole created by the ctor, or threw an exception trying),
continue to pass the count to insert().
As a drive-by, rename the insert()-overloads to insertRange() and
insertFill() to match the existing insertOne() function, and to better
express what their purpose is.
Pick-to: 6.8 6.5
Coverity-Id: 378364
Coverity-Id: 378461
Coverity-Id: 378343
Change-Id: I1a6bc1ea0e5506d473f6089818797b02d09ba13e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit aa8e8ffd321dc96650c11ebe3cd4017e7cc8edac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On CI an Android emulator with SwiftShader software graphics
implementation is used. SwiftShader implementation is unable
to emulate this OpenGL functionality.
Blacklisting removed. QSKIP the test if it is run in Android platform,
OpenGL and SwiftShader sw graphics implementation is found.
Task-number: QTQAINFRA-6332
Pick-to: 6.8
Change-Id: I241a2c6772291795d26b9c2a563f4f9412605cf6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Amends 8e5ce9cd369230256045864d6fad38dbd8bee413, which introduced the
QtPrivate::equalStrings() call. At that time, equalStrings() had already
required equal lengths (see 1560e0161af70b5cf88a70e55c0b502612d433cd),
so no excuse.
[ChangeLog][QtCore][QCborMap and QJsonObject] Fixed bug that could
result in a crash or failing to find a entry in the map/object with non-
ASCII keys.
Manual conflict resolution for 6.9:
- Port from keyView() to key(), because the former is a 6.10+ feature.
Pick-to: 6.8
Fixes: QTBUG-133744
Change-Id: I6b0f8b0a2e47d3ef905afffda6c4c079814a0914
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 54daec43a041cb69cff31cbfd1dd0b7127e8ba87)
QGlobalStatic has a warning suppression for -Wtsan because of its
usage of std::atomic_thread_fence, which TSAN doesn't support.
That header is included in QtCore's PCH, and that triggers a GCC bug
that causes the warning to be emitted despite the suppression [1].
In a developer build, the warning turns fatal.
We could either disable PCHs in such a build configuration
(TSAN+developer-build+GCC < 15), or: simply make the warning non-fatal
on earlier compiler versions.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117
Pick-to: 6.8 6.5
Fixes: QTBUG-134415
Change-Id: If80a4acdb1372d00804a60361f6c3d6893b96106
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a72077a88903fe532f6a749677eb4da4ea99f79f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we encounter a normal, monochrome glyph in a color font, we
go via the normal glyph rendering code path. But since we are
drawing into a color-capable glyph cache, we need to make sure
the image we draw has an alpha channel.
This was inadvertedly broken by the refactoring in
1b85143d217042876209794bf8d0361b7ce8834f, causing black
backgrounds on all such glyphs. Since the default font in Qt Creator
is a color font, it was noticed when upgrading this to 6.9.
Fixes: QTBUG-134473
Change-Id: Iee7eb73a5727324e2ff3bacc2d9ae45cb64fd0b9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 54555755f8780e4e7c665a1502309da9fa807066)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 81bbbc3fc47e47b9cd77248bbaaf35477f562895)
qtwasmserver accepts a positional path argument which tells where to
serve the assets from. The argument wasn't actually used, and this
resulted in always using the cwd.
In addition add a check for the path directory existence. Otherwise
this becomes only visible as a 404 Not Found error.
Amends: 156e5c8b690d01ad3043d2163168c4ea3608a046
Fixes: QTBUG-134393
Change-Id: Iacfafe8a2fb2409169b09a17dbc9ffed0ad16fdf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit fcada7c5c395a7006ecef184c3ca43fff1023616)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QRect QRect rect and tableView are not used and clang-cl warns about
that.
Pick-to: 6.8
Change-Id: I35ae933b437952c6748e4b09d139cc06c9ce33cb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 1d83bffb291192f04db6f33313291147472f7014)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implemented for lldb and gdb. MSVC comes with lldb.exe (it doesn't work,
but maybe some day). I couldn't find out even how to install cdb.exe, so
that's left as a task for someone else.
Pick-to: 6.8
Change-Id: I9d93747476531d4cfd53fffddecc5b3339d2fd7c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0f9860618ff9d045c8371338274f633e38994e3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of having to make changes to both tst_qcoreapplication.cpp and
tst_qapplication.cpp.
Pick-to: 6.8
Change-Id: Ib451048e40b163c2c3a3fffdf7b39bcb28c9cccf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b03921eb9fad7a71dc13d92af2e0e994fcc1ca67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By adding a way for the apphelper to let the caller know that it must
skip this test.
Pick-to: 6.8
Change-Id: I750e7188b8f54cea7278fffd584f8fbf433f496b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 00a30f4312876f6f2919b6a47ff404d503255e2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The class is unsafe for copy, as it would double-delete m_array,
and the move operations aren't implemented, either.
Found while fixing CID 11295.
Pick-to: 6.8 6.5 5.15
Coverity-Id: 11295
Change-Id: I8a615aaea3a8a4ad6abc8a5a9990c2dba5cfa65d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d429fceeebff24c112df3cf202e48bc338551554)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of a static constexpr QL1SV object (which force the compiler
to allocate storage and therefore causes relocations), use a mere
automatic constexpr object (which doesn't). There never was a need to
make this object static, as constexpr is enough to force the compiler
to constant-fold them. The lambda doesn't have access without a
capture, of course, but that is easily solved my moving the object
definition into the lambda itself.
See
https://stackoverflow.com/questions/19067010/finding-where-relocations-originate/19338343#19338343
for the script to detect these issues.
See https://www.akkadia.org/drepper/dsohowto.pdf Section 1.6 for why
we care.
Amends 18aff2b424577b4560b32698038e9bcf68a54b88.
While at it, remove the static from the lambda, too. While it doesn't
cause relocations, it might, on weaker compilers, cause a thread-safe
static prologue to be emitted, and it's not needed, either.
Pick-to: 6.8 6.5
Task-number: QTBUG-100536
Change-Id: Iaede4d02a84ea2e49b42f3da93a77cb8391df5bb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f8647f8951207b66e3a2d7130fd5f75c3b14b5e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Only a small early part of tst_QTimeZone::utcTest() actually needed
access to internal APIs, so only apply the #if-ery to that part.
Pick-to: 6.8 6.5 5.15
Change-Id: Ifebd70005f87bbef5d03fa24fe33134fd802e2e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 92ec27e461ef3d3567cad11c5ca83368b985669d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Saying the code should produce no warnings is all well and good, but
testing it produces no warnings is obviously better.
Pick-to: 6.8 6.5
Change-Id: Iafa82027fde9ef6c7157b42ff3bbcccb3d097230
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 0b67d446566005e6409f816a6f223f26ef1994ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously it was displayed as if it had been constructed from its
language, script and territory; but it is distinct from the locale
constructed in this way and may produce different results.
Report the system locale as QLocale::system() with its language,
script and country within /*...*/ following it, instead of as
QLocale(...) with these as its parameters. Add a test of the debug
output, verifying that it has the form intended.
[ChangeLog][Important Behavior Changes][QLocale] Message logging now
distinguishes the system locale from the corresponding locale -
generated from its language, script and territory - based on CLDR
data.
Fixes: QTBUG-133922
Change-Id: Ic6fb137821fb7bf29d0f6446a46225cadd54b82a
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit e323d46cdaecffebb3f9fa55934e4eb4868611cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 315210de916d060c044c01e53ff249d676122b1b.
The change was not correct. If the newly-inserted reserve() call
actually grows the string, and `after` aliased a part of the old
string, it will now reference deleted data, as the q_points_into_range
check now comes too late.
Change-Id: I2e016b8b90f74126dfc7126800b7b7fde96a091e
Pick-to: 6.8 6.7
Task-number: QTBUG-127549
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit d1539331dd813c83916a323f6cdc7fd6aacb0043)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Several \fn signatures were either incorrect or missing qualifiers
required to make QDoc match the documentation with the declarations.
These were not caught in the CI when testing documentation builds due
to a bug in QDoc.
Task-number: QTBUG-134250
Change-Id: I7a4af11d9bc3687597b348cc2d4ee15212e0281f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b6a01d7d22583263a16242af604e74bbe694d766)
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QGtk3Theme remained unresponsive to programmatic color scheme changes,
after QPlatformTheme::requestColorScheme() had been introduced.
Add functionality to QGtk3Theme.
Fall back to qt_fusion_palette, when the requested color scheme isn't
supported by the current GTK3 theme (e.g. Adwaita-dark doesn't support
light mode).
Functionality has to be manually tested with the widget gallery
example.
Fixes: QTBUG-134022
Task-number: QTBUG-132929
Pick-to: 6.8
Change-Id: I1160c7afc1f1fcb6ec93d65ef54cb45a65a63863
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 738c180c4f03bf82efce04dc4c751cd6eb0043c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>