Commit Graph

66543 Commits (2dc78efbe4366b243c3d617850dcfebb6ec86cef)

Author SHA1 Message Date
Giuseppe D'Angelo 2dc78efbe4 QIcc: re-add an extra check in parseLutData
Change-Id: Ifce2dc720e4e4cae54a00147049edcf369ae8190
Done-by: Allan Sandfeld Jensen
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 23:11:50 +01:00
Christian Ehrlicher 9873f4b283 SQL/ODBC: don't escape a driver string
We must not try to escape a driver string, the user has to make sure
that everything is correctly escaped when passing a complete driver
string. This fixes a regression from QTBUG-122642.

Pick-to: 6.7
Fixes: QTBUG-123444
Change-Id: I43316c7a09060f5c8117fdc3c464d239e37d9cdf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2024-04-04 23:43:02 +02:00
Christian Ehrlicher 5a03e5c51b SQL/ODBC: don't create temporary QStrings
... but use QStringView instead in setConnectionOptions() and the
dependent functions.
Also remove the (undocumented) ability to pass the connection options in
non-uppercase - this was never supported and all other plugins don't
support this either.

[ChangeLog][SQL][ODBC] All options must now be upper-cased as documented. Lower-cased options are no longer supported.

Change-Id: I822db1ddf205c22fe939299c4ab741bbe9b56d65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 21:43:01 +00:00
Christian Ehrlicher 1dd3f46570 SQL/SQLite: use categorized logger
Use the categorized logger qt.sql.sqlite

Change-Id: I70880fca579df56500ddc94a72bc6c616c475e67
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Christian Ehrlicher d99d355e49 SQL/MySQL: use categorized logger
Use the categorized logger qt.sql.mysql

Change-Id: I7e6529025dceb81c47571c65b7aea9bd274814e2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Christian Ehrlicher efd26cdb2a SQL/ODBC: use categorized logger
Use the categorized logger qt.sql.odbc

Change-Id: I1411e80fa33582857bafdf77baee75b293df56af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Tor Arne Vestbø 1bd755465e widgets: Invalidate RHI swapchain when window moves to new top level
When a QWidget with an associated RHI swapchain (via its QWindow) is
moved to a different top level window, that top level window has its
own backing store, and QBackingStoreRhiSupport, which doesn't know
anything about the fact that the window already has an associated
swap chain in the original top level window's QBackingStoreRhiSupport.

As having multiple swap chains for the same window is not supported
on all RHI backends (Vulkan and DX in particular), we need to throw
away the swap chain when detecting that the window is moved to a new
top level.

We do this by hooking into the existing WindowAboutToChangeInternal
event delivery to renderToTexture children, which now delivers the
event both to renderToTexture QWidget children as well as QWindows
in the hierarchy. The condition of when to deliver the event has
been updated to reflect whether the top level uses RHI for flushing,
instead of only including renderToTexture children, as the former
also includes setting QT_WIDGETS_RHI=1 explicitly.

The event is then caught by QBackingStoreRhiSupportWindowWatcher,
and handled the same way as for SurfaceAboutToBeDestroyed.

Renaming qSendWindowChangeToTextureChildrenRecursively would make
sense at this point, but to make cherry-picks easier we keep the
current name for now.

Fixes: QTBUG-120276
Pick-to: 6.7 6.5
Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-04 21:42:14 +02:00
Assam Boudjelthia 0a45996376 JNI: check for pending exception first in getCleanJniObject()
returning early if the object is null will not clear pending exceptions
from the previous failed JNI call, and that will crash the app on the
next jni call if an explicit exception clearing is not done, wish mostly
the case. Checking and clearing for exceptions has to always be done
under this call.

Pick-to: 6.7
Fixes: QTBUG-122135
Change-Id: I0d42d012a4d1305fa07147fd22860d7c005f9b83
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-04 19:12:55 +00:00
Shawn Rutledge 14610fb174 doc: Remove deprecation of the supported QTouchEvent ctor
Amends 111115bf88

Change-Id: Ibc557fdde9c894a3a58bb58835e11be9180e6e6d
Pick-to: 6.2 6.5 6.7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2024-04-04 20:05:10 +02:00
Axel Spoerl f54953a0ab Android notification example: Correct connect statements
The example breaks building 6.7 with examples on Android, due to
QObject::connect() to a lambda without context object.

Add context object.

Fixes: QTBUG-123989
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 19:29:23 +02:00
Giuseppe D'Angelo a07519f51f QColorTRC: code tidies
* Unexport the class (it's fully defined inline)
* Use QFlags instead of "manual" math on an enum class.

The latter requires some extra minor syntax adjustements (making
the enumeration public, so that the operators can pick it up; and
explicitly wrap a couple of usages of the enumerators as
the operators on them are defined *after* the class itself).

Change-Id: I176558de2d5e75697d62790d8783c417997206a9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 18:11:14 +01:00
Edward Welbourne 612ed28985 QCollatorSortKey: Rule of Five: add missing move constructor
It has move assign, so should have move-construct. This turns out to
need QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT() and
QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QCollatorSortKeyPrivate).

In the process, make the move assignment and constructor docs in
qcollator.cpp conform to the usual pattern.

Fixes: QTBUG-123326
Change-Id: I6fc9ed254dc396ff6130df09826b993e98dcf101
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-04 18:11:14 +01:00
Matthias Rauter 7d5646c02e Fix range-loop-detach warning in qhttp2connection.cpp
Pick-to: 6.7
Change-Id: I0b02e2f79ab7828858da3b4ca9840ad07d39a70a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Matthias Rauter 88f034e556 Remove unused variables in QHttp2Stream::internalSendDATA
Pick-to: 6.7
Change-Id: I13c546c7dc4cc3d15d8d92b62f053e438b5d6b64
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Matthias Rauter 5e19f4a8b2 Fix fully-qualified-moc-types clazy warnings in qhttp2connection_p.h
Pick-to: 6.7
Change-Id: Ia5cda794989757a501e83c15d1ad348a48ac4923
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Allan Sandfeld Jensen a07cb53c23 Fix a regression when painting CMYK over ARGB32_Premultiplied
With the introduction of CMYK32 the old logic of assuming depth
meant compatible alpha version no longer works. So change the logic
to more explicitly return compatible opaque or alpha versions and
remove the now invalid qt_maybeAlphaVersionWithSameDepth.

Change-Id: Ib1f7b76b0ce0eae7d49a0dfe369918a746bbe2b4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-04 18:27:41 +02:00
Giuseppe D'Angelo 7f72a93e87 Port QImage::Format_CMYK32 to CMYK8888
Follow the established convention that byte-oriented image formats
have the "8888" suffix, not "32". The old enum name is temporarily
left to help port other submodules.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I4b6f10cb22312b614cb9cf4b0ac439907276c538
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 16:08:22 +01:00
Martin Storsjö adb49d65e0 QTypeInfo: Add a missing include
This header uses std::is_trivial_v, which requires including
the <type_traits> header.

When building with PCH enabled (which is the default), this
dependency does get satisfied via the PCH, so no issue is
visible.

This fixes building with recent version of libc++ when configured
with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (which removes unnecessary
transitive dependencies between the libc++ headers, a configuration
which may become the default in the future), with PCH disabled.

Pick-to: 6.7 6.5 6.2
Change-Id: I5e3ae20e366ed3028b1156cee05bcf2908d6e845
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-04 18:08:22 +03:00
Axel Spoerl 58d5d4b7c2 Abstract QWidget focus chain management
The focus chain in widgets is implemented as a double-linked list,
using QWidgetPrivate::focus_next and focus_prev as pointers to the
next/previous widget in the focus chain.

These pointers are manipulated directly at many places, which is error
prone and difficult to read.

Build an abstraction layer and remove direct usage of focus_next and
focus_prev. Provide functions to insert and remove widgets to/from the
focus chain.

Add a test function to tst_QWidget.

Task-number: QTBUG-121478
Change-Id: Ide6379c0197137e420352a2976912f2de8a8b338
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 16:13:29 +02:00
Axel Spoerl f7a809ab73 Stabilize tst_QComboBox:popupPositionAfterStyleChange()
Wait 2x double click interval, to make sure a double click is safely
avoided.

Use QTRY_COMPARE at the end of the function, to cover cases where a
synchronously delivered mouse click causes posted events.

Wrap the test implementation in #ifndef QT_NO_STYLE_FUSION, as is the
declaration.

Skip the test on QNX.

Fixes: QTBUG-123798
Pick-to: 6.7 6.6 6.5
Change-Id: I73f4acb241a8c77a542152288c65f3d07582e075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 16:13:28 +02:00
Tinja Paavoseppä 02bab22fde Android/QtView: Move resizing of the QWindow to Qt thread
Since any window resize events originating from Qt side are ran in the
Qt thread, having the one originating from Android run in the Android
thread can lead to race conditions especially during orientation changes.

Pick-to: 6.7
Change-Id: Iebebec2fffdaf9181b01fc1e8f539c7bc232996d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00
Tinja Paavoseppä d45ce58778 Android/QtView: Set also x and y of the wrapped foreign QWindow
Previously, we have set the size of the QWindow to match the QtView.
Also set its x and y coordinate to match, just to keep the window and
the view in sync.

Pick-to: 6.7
Change-Id: I0ea89a11e4526a0a996e7b62ac126808358b6bc7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00
Tinja Paavoseppä e9edd3db52 Android/Embedding QML: Resize also parent window
The parent window created from the QtView had an
empty size. Also set its size when creating the window,
and when resizing the QtView. Replace parent window show()
call with showNormal() to avoid switching it to a fullscreen
window.

As a drive-by, use setGeometry() instead of setting the width
and height separately to trigger only one geometry update
for the platform window.

Pick-to: 6.7
Change-Id: I91e350c1748a9e76879faa8bfcab7575f6155f02
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00
Tinja Paavoseppä c4a98a7298 Android: Make QtView extend ViewGroup instead of QtLayout
QtView should only have one child, the QtWindow, and that should always
match the QtView's size, so the handling for absolute layout is
unnecessary.

Task-number: QTBUG-121516
Task-number: QTBUG-123306
Pick-to: 6.7
Change-Id: I77024ab9619e68ab98357518ad07535a2ff9614c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00
Tinja Paavoseppä b3685743f3 Android: Make QtLayout support MATCH_PARENT layout params
QtLayout did not properly handle resizing child views to the parent's
size when their layout params width or height were MATCH_PARENT. This
was mostly visible when embedding QML to a normal Android app, as
there the Android view hierarchy is responsible for setting the size,
instead of Qt setting it every time the QWindow size changes.

Task-number: QTBUG-123306
Pick-to: 6.7
Change-Id: I08cbfa8e352d0cb2ca5b6e5aa40e891a62b82eb4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00
Giuseppe D'Angelo 7eb69e0f7a QPdf: do not switch to file-backed storage if we can't open it
In case creation of the QTemporaryFile fails, keep the data in memory.

Change-Id: I9933571259a26ee990609010763a1ef57877338a
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-04-04 13:21:12 +01:00
Zhao Yuhang 90217f37ca QSqlField: fix missing deprecation macro
Change-Id: Ia544da629d495abdfdd0efe0e0991124a9f5d7ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-04-04 12:21:12 +00:00
Marc Mutz f67f63c2f3 Use properly-aligned float[4] as _mm_store_ps() output buffer
... not a QColorVector.

While cccda0e62d, successfully worked
around the problem that QColorVector does not fulfill the
_mm_store_ps() function's alignment requirement (by using the
unaligned version, _mm_storeu_ps()), it failed to address the problem
that the code writes into a QColorVector object's member variable
(float, a 32-bit storage location) when the function is asking for a
128-bit storage:

  /// Stores a 128-bit vector of [4 x float] into an aligned memory
  ///    location.
  ///
  /// \headerfile <x86intrin.h>
  ///
  /// This intrinsic corresponds to the <c> VMOVAPS / MOVAPS </c> instruction.
  ///
  /// \param __p
  ///    A pointer to a 128-bit memory location. The address of the memory
  ///    location has to be 16-byte aligned.
  /// \param __a
  ///    A 128-bit vector of [4 x float] containing the values to be stored.

The treatment of a struct { float x, y, z, w; } as a float[4] is not
allowed by C++, and even if it was, we'd have to pass the address of
the struct object, not that of its first member variable.

It seems like Coverity has recently learned about this kind of thing,
at least there are tons of such new issues listed in the March scan
and while I can't find a report about this particular instance in the
current build, that probably just means that the Coverity build simply
doesn't see this code path due to the #ifdef'ery.

To fix, replace the QColorVector with an over-aligned float[4].
Because we're over-aligning the float[4], we can go back to the
original _mm_store_ps(), which is, presumably, faster then the -u
variant. We don't lose any expressiveness here, either, because the old
code never used any of the member functions of the QColorVector object
used as a store target.

Amends f944651e3d.
Amends cccda0e62d.

Change-Id: Ia0f8202bf4266b8b19b3de897a897de58b7a6d94
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-04 12:24:19 +01:00
Giuseppe D'Angelo 62e91d0025 QBenchmark: abort if we can't open the output file
Change-Id: I6391bb8e6fb0a336d1df82c30eb07ec931cfc053
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-04 12:24:18 +01:00
Giuseppe D'Angelo 3c6598c359 Add CMYK image output support to QPdfWriter
If the user gives us a CMYK image, save it as such.

[ChangeLog][QtGui][QPdfWriter] QPdfWriter can now save images in CMYK
format directly.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I4e5ba93970a545987e38d9a3b2e15b0d64bb72b6
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-04 12:24:18 +01:00
Jaishree Vyas a3fae5faa0 Doc: Qt Data Types Documentation
Updated the list

Fixes: QTBUG-73386
Pick-to: 6.6 6.7
Change-Id: If913a26d32a39c71fb7fba815bdafa924da69457
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-04 11:24:18 +00:00
Giuseppe D'Angelo 7bd9aa191c QPdf: assert that we can load the files from the resources
These are files under our control, but still, may get moved/renamed/...
by accident. Assert that we can open them.

Change-Id: I46987f2f12e04a8d7292652eb6440fa0f345175a
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-04-04 10:49:23 +01:00
Giuseppe D'Angelo 0fb2e27710 QCupsPrintEngine: handle a possible failure to open the cups fd
I'm not familiar with CUPS APIs, so missing better judgment or a
code comment, handle the possibility for a failure.

Change-Id: I6f9afa9fdccaadbe199ce307f79e1d6050aa2939
Reviewed-by: Albert Astals Cid <aacid@kde.org>
2024-04-04 10:49:23 +01:00
Mitch Curtis d72d7945d4 QTest: expose API needed for Qt Quick Test to print crash backtraces
As discussed in QTQAINFRA-6146, there were two potential approaches to
enabling backtraces in Qt Quick tests:

- Either via a thorough refactoring of quicktest.cpp so that each
testcase is a Slot in a programmatically-created QObject-derived class,
which will be executed via QTest::qExec() similar to the documented
QTest way. This way the pre-existing code in QTest::qRun() will setup
the fatal signal handler.
- Or as a quick fix, modify quick_test_main_with_setup() to setup a
FatalSignalHandler class and invoke prepareStackTrace() like it's
already done in QTest::qRun(). This would require exporting these
symbols in the private header.

This patch enables the implementation of the latter, as it has a
fairly light footprint, is easily revertable (should we need to),
and allows us to immediately gain insight into crashes in CI.

Task-number: QTQAINFRA-6146
Change-Id: Iedffc968acb3e570214df34884ab0afcb6b30850
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-04 14:09:03 +08:00
Mitch Curtis c0014becca QTest: move crash-handling code out into qtestcrashhandler_p.h
In preparation for reusing it in Qt Quick, which currently doesn't
print backtraces upon crashes.

Task-number: QTQAINFRA-6146
Change-Id: Ib0384f514b348a398f53529ff3bcc7d4ac2daba7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-04 14:08:57 +08:00
Mitch Curtis baa44b9ddf Qt::ApplicationAttribute: static_assert that we don't go higher than 32
Because we can't support it on 32 bit operating systems.

Task-number: QTBUG-69558
Change-Id: I406ecccdf039d7d4f4c24268c92c91e367655cba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-04 11:31:51 +08:00
Mitch Curtis 907181cb21 Fix Qt::AA_DontUseNativeMenuWindows being unsettable on 32 bit systems
f1bb9cfbf6 added this value, but it was
only when a test in qtdeclarative tried to use it that it was
discovered that it couldn't be set on 32 bit operating systems (armv7,
AKA imx7) due to overflow as a result of the bit shifting that is done.

Fix it by using an old, deprecated value. If any old codebase using
that older flag tries to build against a newer Qt with this change, it
shouldn't affect it, as setting the flag does nothing in Widgets, and
native menus didn't exist in earlier versions.

Task-number: QTBUG-69558
Change-Id: I520154d02e9ccf007ebd73807685212a19fbee1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-04 11:31:51 +08:00
Volker Hilsheimer 8424a64014 Fix warning: remove unused parameter
Pick-to: 6.7 6.6 6.5
Change-Id: I5794e38e1e9871f14c9a8df6483e57c1922dace2
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
2024-04-04 00:51:46 +00:00
Volker Hilsheimer 1752405f44 Font icon engines: reverse implementation to avoid pixmaps
Draw the glyph directly in the paint() override, and use that
from the scaledPixmap implementation. This avoids a pixmap
creation just for drawing an icon with an existing painter.

Pick-to: 6.7
Change-Id: Iece0083a3a9f3625d843bc6e9d836baf9b5d84f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-04 01:51:46 +01:00
Volker Hilsheimer 9d8c5bc718 Apple icon engine: reverse implementation to avoid pixmaps
Instead of implementing scaledPixmap() to rasterize the
vector image we get from App/UIKit, and calling that from
paint, implement paint() to draw the vector image directly
through the painter, and use that in scaledPixmap.

Pick-to: 6.7
Change-Id: I2c62826f29406543bc8d8c7fa71199e91586d83b
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-04 01:51:46 +01:00
Giuseppe D'Angelo 72c242c7a2 CMYK: remove unnecessary qPremultiply calls
Although the output of these functions is premultiplied ARGB, we know
the alpha is always going to be full (1.0) because the source is CMYK 32
bit (without alpha). We can therefore avoid calling qPremultiply.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I129b601f5c93a1c444ab06c3325f946d2bcc6efc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 01:51:46 +01:00
Tor Arne Vestbø 697e1b0397 Decouple rate-limiting of paint-on-screen widgets from top level widget
As part of eacd58d4e7, a mechanism was
added to prevent posting redundant UpdateRequest events to the top
level widget, managed by QWidgetRepaintManager. The mechanism relied
on a boolean that was set when posting an update request event, and
reset when processing the event for the top level widget, as part
of QWidgetRepaintManager::sync().

However, for paint-on-screen widgets, we don't post an update request
to the top level, we post it to the paint-on-screen widget directly.
And when processing that event, we don't paint the widget though the
normal QWidgetRepaintManager machinery, but instead call the paint
event via QWidgetPrivate::paintOnScreen().

As a result, an update() on a paint-on-screen widget would result
in never receiving updates for non-paint-on-screen widgets, as
we assumed there was no reason to send further update requests.

We could fix this by clearing the updateRequestSent flag as part
of the paintOnScreen() code path, but that's incorrect as the flag
represents whether the top level QWidgetRepaintManager needs an
update request event or not, and would lead to missed updates
to normal widgets until the paint-on-screen widget finishes its
update.

Instead, we only set updateRequestSent if we're posting update
requests for non-paint-on-screen widgets, which in practice
means the top level widget.

The paint on screen logic in QWidgetRepaintManager::markDirty
still takes care of rate-limiting the update requests to the
paint-on-screen widget, by comparing the dirty area of the
widget.

There is definite room for improvement here, especially in the
direction of handling update requests via QWindow::requestUpdate
instead of manually posted events, but for now this will have to
do.

Fixes: QTBUG-80167
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 01:26:56 +02:00
Tor Arne Vestbø 2e97906593 cmake: Selectively enable -no_warn_duplicate_libraries for Xcode 15+
We can't make the choice of whether to enable no_warn_duplicate_libraries
or not based on the Xcode version Qt was built with, as the target flags
will propagate to our cmake integration tests, which we run on platforms
where we don't have Xcode 15.

Pick-to: 6.7
Change-Id: I241a950a3d2e70652a3a6386e5dd86c681d1c13f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
2024-04-04 01:26:56 +02:00
Giuseppe D'Angelo 58ff4e22f7 tst_qnetworkreply: verify we can open the local file for comparison
... except for bigfile.

Change-Id: Ide04a9c80b438272e868a6d2b410a507c76d6239
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-03 23:57:45 +01:00
Giuseppe D'Angelo 4285f0dfa4 QPdf: remove two unused functions
Never called from anywhere.

Change-Id: I76480586b5eca6b450a6cd36429cdc6e264849cc
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-03 23:57:45 +01:00
Thiago Macieira 73003f3b41 QStorageInfo/Linux: remove dependency on linux/mount.h
It was introduced in December 2018, which is apparently too recent for
some Linux distributions. So remove the dependency that was there only
to give us MS_RDONLY and revert to the old statfs.h / sys/vfs.h flag.

We still don't include <sys/vfs.h> because it is absent on some old
Android versions.

Amends ea6abe583f.

Pick-to: 6.7
Fixes: QTBUG-123932
Change-Id: If1bf59ecbe014b569ba1fffd17c29cc448d16358
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-03 14:15:43 -07:00
Thiago Macieira ce2585d0e9 QObject: add check for Q_OBJECT macro to findChild(ren)
We can't fix the underlying reported problem, but we can warn that the
user has made a mistake.

[ChangeLog][QtCore][QObject] The class template parameter passed to
QObject::findChild() or findChildren() is now required to have the
Q_OBJECT macro. Forgetting to add it could result in finding children of
the nearest ancestor class that has the macro.

Pick-to: 6.7
Fixes: QTBUG-105023
Change-Id: I5f663c2f9f4149af84fefffd17c008f027241b56
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-03 14:15:43 -07:00
Thiago Macieira 43cefd882e XCB: remove dependency on QtOpenGLPrivate
We don't use that in the XCB library or plugin anywhere.

Pick-to: 6.7
Change-Id: I5f663c2f9f4149af84fefffd17be8c7f3bd7bd14
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-03 14:15:43 -07:00
Thiago Macieira 60417a265a QLibrary: fake RLTD_NODELETE by not calling dlclose()
On systems without the RTLD_NODELETE flag, simply don't call dlclose()
and leak the handle. Amends ef5ab6e006.

Pick-to: 6.7
Change-Id: I01ec3c774d9943adb903fffd17b76673562daa8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-03 13:15:43 -08:00
Giuseppe D'Angelo 9828ddadfb JPEG plugin: CMYK code tidies
Remove unused code.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I3db7705b3963d7a7669f8c9b284d3d35a2a7da92
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-03 22:15:43 +01:00