A recent update [0] to the IANA timezone database has improved the
historical accuracy of transitions in Mexico. It turns out that the
transition at the start of 1970 was not a real event. The only actual
change then was that Mazatlan has followed the main Mexico zone rules
since then, having ignored some transitions of the main zone in
earlier decades.
[0] 812aff32b3
Picking to 6.8 got a trivially-resolved conflict due to dev having one
more BackendKludges flag to take into account. Removed 6.5 from the
destinations for picking because the removed test was added since
then.
Fixes: QTQAINFRA-6757
Change-Id: I65d8ea1dfa76ce635bf11ffcc1ded8c9ceaf9fec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 8a27c310b1e4ebc74999e09551ca5eab4570a68e)
(cherry picked from commit d5bb57060be98993f78417d0234346a4a8ab8d1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a Qt dependency that the user cannot influence.
Change-Id: I6efbfefb5901588f4c99b4edfa05b21b68ab01a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit cfefce57a4ff446305cd1f839e7c5203bac7a6c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9dc063e7de5906ff5d3a9ffb5057a1fc170689fe)
Call d->deleteExtra() in dtor of QWidget to make sure it's cleaned up
before QWidgetPrivate calls it which might access the already deleted
QWidget through deleteTLSysExtra() /
QWindowContainer::toplevelAboutToBeDestroyed(q).
Amends 006cbf658ea1f5986bbe1baafa7c146780320661.
Task-number: QTBUG-130932
Change-Id: I9109072a457cc01abd5d1b4e844a3ed3309d942b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 482c41fb6187f3ee1df11e7936fb60f65d12995a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a6a0a38343fba73b12e63777cf7cd5817e65f7d5)
The rect of an empty widget (i.e. 0 width/height) will, after adjusting
by -1, be invalid as it will have a width/height of -1. In turn, calling
contains(p) on that rect can return true even though the rect is empty.
Fixes: QTBUG-131001
Change-Id: I604f5942589f1c1079cae90bd0d3b104344d2c55
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 1731d8af741a0a6cc6cd293be4aef52103d0899b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4a27d0fe0ade67938bb9ecb9bf2525dc3553e11c)
QWinRegistryKey::stringValue is more readable than
key::value<QString>().value_or(QString()).
This patch also adds developer documentation for the function.
Change-Id: I6a760db77a50ca9fa810196e14af14068df8aee3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 16ca13e148445b5a18ea768c096dfedfbacce3c4)
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>
Android allows to explicitly chose the 24h format even when the selected
locale would not usually use that.
Change-Id: I6181d343a12d8d264c369341ef753d872f573121
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e1f83e0ffbbd079b41e5a903e35d6cd6a62e6f99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove an outdated paragraph which mentions some 'important inherited
functions' - the list is outdated and therefore wrong, and no other class
has such a paragraph.
Fixes: QTBUG-130916
Change-Id: Ia1d98da35564d542ca2758070cc1d5b5525b6faf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 423496dcfbcd3a779653a4186a3b49ef8b5d2d7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The size calculation for CT_SpinBox was out-of-sync with the rects
calculated in subControlRect() for SC_SpinBoxUp/Down.
Fixes: QTBUG-115451
Change-Id: I140346fa1980e0cf95e0a07499f43467b721f01e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 60c665d0b320324affa76702b5e5de3d37117809)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't load the pixmap used for PE_FrameGroupBox on every call to
drawPrimitive(PE_FrameGroupBox, ...) but store it in the QPixmapCache.
Change-Id: I5be6ce8a18cfc17c72dd5217efd5f446ba10ea64
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 12e8a7173569d03a98fcd47c593a09e55a96801d)
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>
QCocoaDrag stores the last NSView that received an input event, which
becomes a dangling pointer when the NSView gets destroyed. Inform the
QCocoaDrag when NSView's destructor runs, so that it can reset the
pointer (and reset the NSEvent pointer as well) when the destroyed
NSView is the stored one.
With this change alone we'd end up triggering the Q_ASSERT later on in
QCocoaDrag::drag, as m_lastEvent is now nil so the NSWindow will be nil
as well. QCocoaDrag::drag cannot do anything useful if m_lastEvent is
nil, so exit early.
Pick-to: 6.5
Fixes: QTBUG-116554
Change-Id: I5949d728d05adcf3d4a32c91f7e181393bef0422
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 720ce9b97b767fdf36eaf78107b23bd017e191f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake 3.31 introduced CMP0177 that warns if an install destination is a
not-normalized path. Fix this by normalizing the offending paths before
using them.
Change-Id: I1586bf192a4fd26108aa0448431f19e69df8aacd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 14fc7f0852903109fed8357e2df9edc851f31b65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake 3.31 introduced the policy CMP0174 that triggers a warning if a
single-value argument is passed to a function without a value.
We did this doing this when forwarding arguments in code that doesn't
use _qt_internal_forward_function_args yet, e.g. in qt_internal_add_app:
qt_internal_add_executable(...
TARGET_PRODUCT ${arg_TARGET_PRODUCT}
...)
Forward the warning-triggering arguments with
_qt_internal_forward_function_args now, because that only forwards used
arguments.
In the future, we can offload more forwarding work to the
_qt_internal_forward_function_args command and simplify the forwarding
code in qt_internal_add_app and qt_internal_add_tool. This patch only
fixes the worst offenders for now.
Change-Id: Ie786691e4b236decf4c62f4dd0751ed76b721177
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 18a217af4a50afd707ed2caed4880d0da19ee120)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QComboBox dropdown doesnt render when its added to a
QGraphicsProxyWidget and any QGraphicsEffect is added to it.
Fixes: QTBUG-128916
Fixes: QTBUG-128329
Change-Id: I7f9b7ceea9afa819fcd4785250859ea7b7c85f69
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5fc968ade3120fe7f9d0d01988254fd1fb855262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The usage in manifest was accidentally removed in
963a31c0f4b48c3734352706fbbdae69f19b59eb. To avoid this warning
more explicitly we add "tools:ignore" to the XML files. This
is a false positive because we use it in
src/android/jar/src/org/qtproject/qt/android/QtActivityBase.java.
Pick-to: 6.5
Change-Id: I2fe1d0930b81b3c33e7b6b1ad6f6e152dc3e0740
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 709eb77ff0f32792beb18d3edea9e0aa4436f481)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Re-shuffle the way logcat is handled, so now fetch the logcat by
default after the test run, then manually filter out the test pid
logs. Then try to look in the logs for potential ANR cases, if
found, add also logs belonging to the system_service pid which are
responsible for printing ANR details and usually the reason for the
ANR as well. At last, look for logcat crash marker that ndk-stack uses
and pass only that portion of the logs to ndk-stack command.
Fixes: QTBUG-130818
Change-Id: I162d9d884a977e8f66a3253e33eebad4453c95cb
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 5c68af9e1481f56fae962e865a9600dc64c465b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove string "unsupported_android_version" from string.xml. The
resource `R.string.unsupported_android_version` appears to be unused.
The usage was removed in b8e404f6d0631e04d30a864dc68b0574bfca90f1.
Pick-to: 6.5
Change-Id: Ifc936c070dabe4bc31d45bbb6b261890d5c2e536
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0534a566a7d79a674931aefa6cc96a8e9343a1b3)
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>
The drawing of QRadioButton in QWindows11Style was performed with
overdrawing, leading to problems with the transparent background color
for QGraphicsWidgets. This patch draws the ring of the RadioButton using
QPainterPath, to avoid overdrawing.
Fixes: QTBUG-130828
Change-Id: I4b278f7f720b55e11c550977b666410d85b65382
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 57361de3a9814808bb575f8d01c1b12cbed9dbe9)
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
4a5f3c8b930d319ce2ecc802a0868164f18034db, so the skipped code ought to
compile.
Amends ac6a9f9bfae88e21b3e589cc25e4632a69f67a50.
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>
The AT-SPI2 XML spec for all signals/events [1] that Qt emits
specifies the DBus arguments signature as "siiva{sv}".
Qt however was incorrectly sending arguments with an "siiv(so)"
signature instead, by sending the QSpiObjectReference as last
argument.
Fix this by sending the events with the proper signature, using an
empty QMap<QString, QVariant> for the properties (that translates
to an "a{sv}" type for DBus).
[1] 33b45aea12/xml/Event.xml
Fixes: QTBUG-130843
Change-Id: If023763626be3d17b091466b17829d62d29fdede
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fdf87fdce1c8b926b1c1ee9254aa4b0fc1840d82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This code predated the existence of the currentThreadId() and
isCurrentThread() functions. Our implementations are slightly faster.
Change-Id: Id2b20a7f06e0c2a1bc35fffd4fb4dcf3f20769cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8a8e91a7c141994c331d2b9da7d9c5e2129c70b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a corner-case scenario but valid because we tell users they can
destroy the QThread object right after finished() has been emitted. But
emitting finished() does not mean the launched thread has actually
exited: it may still be in Finishing state for an arbitrarily long time.
Completely aside from what else may run from other libraries, we only
destroy QThreadStorage and the thread's event dispatcher after
finished() has been emitted.
This commit avoids the unnecessary mutex unlocking in the destructor,
then QThread::wait() locking again, only to unlock yet again so that it
can perform the necessary low-level wait calls. The same for the return
path: wait() locked again to check the state, then unlocked, only for
the destructor to lock again. Now, QThreadPrivate::wait() is responsible
for returning with a locked mutex.
Change-Id: I87adffb89f275accea18fffd6b4293861ea7cf39
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 6bd271cf74d6d57816531f688c82c51d29f1be91)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Commit 1ed0dd88a32cd2c5ae100b48e14ff55bcbb652e6 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 1f22fc995a36193cd67e8190858bb33614d149f4 introduced nested
functions without properly checking their return status with
QTest::currentTestFailed().
Later, commit 855c4484693015cb6498f2183d95de1377d49898 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>
As pointed out in the qcocoadrag.h header, we need QCocoaDrag to record
the original event and view when handling an event in QNSView. For that,
NSView's handleMouseEvent implementation called setLastMouseEvent.
This was not done for tablet or touch events, although both of those
event types might initiate and participate in drag'n'drop operation. Do
that consistently now, and rename the setter accordingly to
setLastInputEvent.
Task-number: QTBUG-116554
Pick-to: 6.5
Change-Id: I9646adbec3a2301ebca123f0f25328db63c782a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0a40266788021aaa2f501aeef6db2e222669c6e9)
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>
Windows that have only set the WS_POPUP style do not take the WORKAREA
into account and maximize to fullscreen geometry. This patch maximizes a
WS_POPUP window to the size of the current working area, which can be
smaller than the screen geometry.
Fixes: QTBUG-129791
Fixes: QTBUG-130865
Pick-to: 6.5
Change-Id: I4c5beb0cd69c7ea4c585785a579a9d66bab12cc6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 90be6609bdfc14df6aec52cbbba6adb4a610301e)
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)
When calendarPopup is enabled, a QComboBox instead a QSpinBox is drawn
but the size hint for QSpinBox was used which resulted in a too small
width for the widget (depending on the underlying style). Therefore use
the size hint for CT_ComboBox in this case as it was already done for
mac.
Fixes: QTBUG-11967
Change-Id: I817bdc99ae5d1189b9f0451a857022abe64b3bf8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0a1c1711453697a88eee7fdb6f4cf082bfd433e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On log-in this may be disabled and only enabled later; that prevents
clients like plasmashell to enable a11y features.
We need to watch changes to the org.a11y.Status properties and enable
the a11y integration on-demand.
As the in-line comment said, qdbusxml2cpp does not generate NOTIFY
signals for DBus properties, so use the raw PropertiesChanged signal
to receive those notifications.
Downstream bugs:
- https://bugs.kde.org/show_bug.cgi?id=495096
- https://bugs.kde.org/show_bug.cgi?id=495098
Pick-to: 6.7
Pick-to: 6.7
Change-Id: I4d0adf61af875464d3cd47759631d2a3aac664f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 38251c36edf11316a2467169b1d491bf13520fd3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is, because it only compares a pointer and a string, both of which
are nothrow_equality_comparable.
Also remove the unused (even in C++17 mode) inequality operator
instead of marking it noexcept, too.
Pick-to: 6.5 6.2
Change-Id: I0ce62df02ffc98252d17cef659cc6dc2a90ae2cf
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3fce04157dbba1232d96821dbb166c6a5dc467a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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>
Remove some unused variables in CE_TabBarTabShape - they are not used
since the initial Qt4 import.
Change-Id: I2ec4ee8ac9bfdde9d40587c50eb6d57bf38419ac
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4c0b45553862d3eff35906d02ea5e2afd9252bbd)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If a popup (such as a context menu or combobox) is open, and the user
presses any mouse button outside the popup, Windows users expect the
mouse event to be sent to whatever is under the mouse, while the popup
closes. (So the popup must close on press, not on release.)
QPlatformIntegration::ReplayMousePressOutsidePopup requests this
platform-specific behavior in general, and the WA_NoMouseReplay
attribute can disable it on specific widgets.
e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9 removed this feature which was
added to Qt 5 in 1f456b4cbb93e3fea699878d117900b703146213, based on
doubt that we really needed it: and if we did, maybe we would need it in
QtGui. But so far it seems the main excuse for doing it this way is that
popups are sometimes opened with exec(). If the nested event loop
handles the mouse press completely, and the QPA event is discarded, the
outer loop has no chance of seeing it after exec() finishes.
In Qt Quick, we don't use exec(); so let's assume that this continues to
be needed only for widgets.
At least we don't use extern sharing of a global bool in this version.
Fixes: QTBUG-130138
Change-Id: I95b5d24ee9bc8608655ed5c585d1d91a891fbad3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 601924cce57ee564ec149a170f1987b13924e0ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Negligent omission, since empty() is constexpr, and so is everything
else in the QSpan API.
Amends 03e78e5d624d9752d76c7448d58c9d9d15a4dc18.
[ChangeLog][QtCore][QSpan] Fixed isEmpty() to be constexpr (empty()
already was).
Change-Id: If1e1e72422d68b0c35c37354067098332e6e4e10
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0576c2b7266003d8f17e9af896de15cf7184b858)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace usage of QPointerDevice::setType to constructor.
Fixes: QTBUG-129981
Change-Id: I757ec3cde7815363539b8cfe3fd7ae46993ce33e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cc24213bdb286b200ad1c637ed244c48a2a32495)
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 385f0732d927f0eba8ecf990ee9bc19936475edd 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>
This fix addresses a customer suggestion to clarify the QThread()
documentation. It now states that started() is emitted by the newly
started thread, so any slots connected to it will occur by queued
invocation. For clarity purposes, an additional sentence has been
added to state that whilst the event may have been posted before
run() is called, cross-thread delivery of the signal may still
be pending. A link to 'Signals and Slots Across Threads' has also
been added.
Fixes: QTBUG-112221
Pick-to: 6.7 6.5
Change-Id: Id502eb4bf48b745af4d9906d7cd05de73d2b6418
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 371872af23c1c9f9b3b56dd191fb13f850615dd4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In 438837ce274fdc1457b66179b25df40f33b23a15 commit, we stopped to copy
all dependent libs that are kept in plugin directory. This change sounds
reasonable, as we do not want to deploy unused libs.
Due to the mentioned change, when dependencies.xml contains *.so
libraries, they are not copied at all now. They are added to localLibs
(later pasted into libs.xml), but are not shipped with the apk.
So at the end we have dependencies in libs.xml on some libraries that
were not delievered.
This commit cleans up the localLibs to not add dependencies to the
libs.xml file as they will not be satisfied
Fixes: QTBUG-129946
Change-Id: I7157e2e65cb928adbe9d7c077e50b2ebcac94490
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7499fd0229d63f969bf6ca58d3b764b96395bed2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Sync the rect used for painting a CE_ComboBoxLabel text with QLineEdit
which is used for an editable QComboBox.
Task-number: QTBUG-130824
Change-Id: I9f3a31d68c6abed7e9cba4235847df3fa0d51ad1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit dc1ae86bad0b4eaa83909f663777c09fb2f2376b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit b492582b9c4cf679109ed4875aff912e186263cb.
The fix made Qt Quick applications work correctly, but it caused
all text in bitmap fonts to disappear on Qt Widgets. This needs
a deeper investigation, and until a proper fix is found we will
revert.
Transformed layouts with bitmap fonts will still look incorrect,
but they will at least have text.
Fixes: QTBUG-130586
Change-Id: I7429ddd183527f2ed5d1c00009a0c3df0e3246c8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 2f9b02acd4cbca5d8c0d7504df4c9e7bcbbb03ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends commit 52909797accd850126802dcc66d00327eb1e50a5, whose conflict
resolutions inadvertently incorporated the movement of IANA IDs from
the list table to the IANA table, a change only done on dev (6.9), not
picked back to 6.8, but tagged with a # TODO comment in 6.8 that, none
the less, is not to be done in 6.8.
Restore writing to the correct table.
Change-Id: I70fd133eb54526efecae189306b3ae07c1c638db
Reviewed-by: Mate Barany <mate.barany@qt.io>
The size hint for QComboBox relied on the vista style but the painting
was completely different. Therefore swith to the base windows style and
add the extra margins used in the windows11 style.
Fixes: QTBUG-130824
Task-number: QTBUG-11967
Change-Id: Ic533140793cdd4e640c49f6d73e9bb73bcbb83da
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b6ca35f65372cc8519a418d6a5291cafd809f7c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify converting a QUuid to a rfc4122 representation by using the
built-in toRfc4122() function and don't allocate a temporary QByteArray
when converting it back from rfc4122 to a QUuid.
As a drive-by make sure to not detach when converting a QByteArray to a
blob.
Change-Id: Ib8fc7744952377d14ef39c0d901a6a8419eb018d
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 814e4e1cbe6e4a625625942c70b394aa6455fb19)
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 size or DPR of the window we're drawing to with QOpenGLContext
changes we need to call [NSOpenGLContext update] to recreate the backing
texture.
We were doing this in QCocoaGLContext::makeCurrent(), based on the
assumption that clients would always call makeCurrent() before drawing,
which is a documented requirement of QOpenGLContext:
"To be able to support certain platforms, QOpenGLContext requires
that you call makeCurrent() again before starting rendering a new
frame, after calling swapBuffers()."
However RHI doesn't follow this rule, and skips makeCurrent() from
QRhiGles2::ensureContext() if the context is already current.
This was causing issues when moving a window between screens with
different device-pixel-ratios, as we were correctly rendering to
the window with the updated DPR, but we had not resized the target
texture to match.
Changing QRhiGles2::ensureContext() might be an option, but nowadays
we have QPlatformOpenGLContext::beginFrame(), which is guaranteed
to be called (by RHI, not by generic QOpenGLContext clients).
To cater for RHI we now call [NSOpenGLContext update] also from
the beginFrame callback.
Fixes: QTBUG-114873
Pick-to: 6.5
Change-Id: I9461135109fb1473ef9965f72f52beeb41b03680
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 48c176e1b891428af504087b117a72bcaa806930)
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>
Create a script that allows running an app or a test easily similar
to running on host. This improves development workflow and time by
allowing quick runs without having to manually call the various adb
commands to launch, get a pid of the app and then print the logcat,
let alone passing parameters or environment variables.
For normal apps, the app package name is retrieved by the script, run
and live logcat is printed as long as the app is still running.
For tests, the script calls androidtestrunner, allowing test parameters
to be passed to the test.
For CI debugging, this would save quite a lot of hussle and frustration
trying to run or debug a test app.
One other benefit for this is enabling running Android tests from Qt
Creator's testlib plugin without big changes to Qt Creator to support
androidtestrunner explicitly.
Because file(GENERATE) would fail if called twice for the same file,
I use file(WRITE). This is used because at the time of calling the
target executable finalizer, we don't know if the target is a test
or not, so we rely on writing the script first as a normal target,
then call it if the target is a test where it overrides the script.
For this also, parameters passed to the runner or androidtestrunner
can't handle generator expressions.
[ChangeLog][CMake][Android] Add wrapper scripts to run Android apps and
tests with ease from the host.
Task-number: QTBUG-129889
Change-Id: I84e85ce2bbf6944c8aa20bdc2c2b6d7b956bc748
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a905d26f14da1cf86b8490331c0cc41c2a45b283)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
Add doc_tools and install_doc_tools custom targets.
These are meant to build and install documentation and code generation
tools that participate in documentation generation.
Such tools should be annotated with the IS_DOC_TOOL option to their
qt_internal_add_tool call.
In qtbase, such generator tools are qdbusxml2cpp and qvkgen.
Task-number: QTBUG-91243
Task-number: QTBUG-128730
Change-Id: Idebffc6f50d8547ce76c1102a20d60d436e44cfd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3066e9e38deada5f99a47449e4ef84eebc5219f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QScrollbar is a widget and not a window, therefore there is no need to
set the FramelessWindowHint
Fixes: QTBUG-128518
Pick-to: 6.7
Change-Id: I687c708cd4f59c6f09d0ad3c2d3ddcf62c33b11a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7b146e530adc913a1ed49b4d2ba17de787089261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changed the number, which caused the problem of showing the snippet.
Two of the same numbers were given to the different snippets.
Fixes: QTBUG-130565
Change-Id: Iba738a1bdaf5821df48bf5e222bee911c5ddf1fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b3e5b134eeaae85025879cd0309664ce0ba1f6de)
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>
Don't disable the separate_debug_info test but mark it as successful on
Apple platforms and MSVC. This enables us to simplify the condition of
the separate_debug_info feature. Also, we fix the error on MSVC when
passing -separate-debug-info to configure.
Fixes: QTBUG-108015
Change-Id: Ifb1f18b2be8a0b5693a3448c1b8198f773f94ffb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f663a08f2067f7890e4b71fd1137791a7e96c613)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The patch that introduced the deprecation lost '!' at the beginning of
the comment block. As a result, the documentation for the deprecated
method was not generated at all.
Amends cbc6ee0eb9ef42c7024fa527bb94ac89953709a6.
Change-Id: Ief2f4aae7e21363224fa44ef42847aa132ea769a
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit 4ce7235fdd6183478eebfcf2f1d6058a172b285a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was duplicated across a few public API.
Splitting it will also allow it to be be reused in a future change
in another function.
Also add the ability to use the poor man finalizer approach for
CMake 3.16, but only via an opt-in that will be set by the qt build
process, so that the finalizers can be used for tests in a future
change.
Task-number: QTBUG-93625
Task-number: QTBUG-112212
Change-Id: I097faf5e3db98457acfdfb3ae2011efb6640f35e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 2bbc0bda30e0c34ea63f0b6836c34c765a06e049)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We offer a build target called 'host_tools' to build just host tools
and their dependencies within a Qt build, but it was not possible to
easily install the built tools.
Add convenience custom targets called 'install_tools' and
'install_tools_stripped' to install the host tools when building
a static Qt build.
The convenience targets will be useful for qdoc static builds, to
easily be able and install the tools, without having to specify each
tool's install target separately.
The current approach doesn't work for shared Qt builds because it
would necessitate tracking the libraries that the tools depend on, so
those are installed as well.
So for now, this is limited to static builds only, where there
are no shared library dependencies that have to be installed.
The implementation passes 'host_tools' as an installation component
for qt_internal_add_tool installed targets. The custom target then
just calls cmake --install with the component name.
Task-number: QTBUG-91243
Task-number: QTBUG-128730
Change-Id: Ic047ec3b8683043f496b4b2c3cf883a3e70440b3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c64190caa7d515e0efc60a3c435d9d779efd5ac3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Backstory.
The current approach for building documentation in the CI is that we
build a static qdoc in a Jenkins job, manually provision it in
qt5.git, and then build qt documentation using that somewhat
old qdoc version.
Updating the provisioned qdoc is a very slow process, because changes
first need to be merged into qttools, then a Jenkins job needs to be
manually run, then provisioning needs to be updated, and sometimes it
also depends on a full qt5.git submodule update or has to wait for
other unrelated changes to qt5.git.
The new approach.
This change adds CI instructions to build a static qdoc (and
other relevant tools necessary for documentation generation)
using the latest qttools/dev/HEAD sha1 in a specific host platform's
qtbase build instructions, and then uses those tools for documentation
generation and doc warning checks in each repo's TestDocs CI test
phase.
To enable these new instructions, the host platform and the doc
checking platform need to be tagged with the 'DocsGenerationV2'
feature.
The built tools are cached in a separate archive using a new Coin
feature, which is then extracted during each repo's TestDocs phase.
Pros and cons.
The benefit of this new approach is that we will always use a mostly
up-to-date qdoc from qttools/dev/HEAD when generating documentation,
making the documentation team's life easier.
Specifically, once the doc tools are built in qtbase with the latest
qttools/dev/HEAD sha1 that was available during that integration, the
resulting built tools are then used for doc checks in dependent repos.
A newer qttools/dev/HEAD sha1 will only be used for a particular
repo once the qtbase dependencies.yaml sha1 is updated, or when doing
qt5.git changes that cause a rebuild of qtbase.
Note that while new tools are built due to dependency updates, the
used qttools sha1 is not recorded in any way in any of the
dependencies.yaml files.
qtbase doc checks will always use the latest qttools/dev/HEAD sha1 at
the integration time, because the tools will always be built from
scratch.
The downside of the new approach is that, by default, the doc
generation will not use a pinned version of qdoc anymore,
but rather follow the flow described above. This has a chance of
introducing failures which are unrelated to integrating changes.
This should happen rarely because the doc team usually tries to fix
doc warnings before changing qdoc's code.
If temporary pinning of qttools or qt5.git is required when testing the
docs of a specific repo, it can be achieved as follows:
- set the QT_CI_BUILD_REPO_DOC_TOOLS env var to "1" in the repo
coin/module_config.yaml file build instructions, to ensure the doc
tools are built in that repo, rather than reuse the ones built in
qtbase
- set the QT_CI_DOC_TOOLS_PIN_GIT_REF env var to the desired qttools
sha1 or other git ref, in the same build instructions phase
- optionally set the QT_CI_DOC_TOOLS_TOP_LEVEL_PIN_GIT_REF env var to
the desired qt5.git sha1 or other git ref, in the same build
instructions phase, if a different version of qt5.git is required
- optionally set the QT_CI_DOC_TOOLS_USE_CI_TOP_LEVEL_BRANCH env var
to ON, in case if the module branch that the CI job computes should
be used as the qt5.git branch
- set the QT_CI_FETCH_REPO_DOC_TOOLS env var to "1" in the repo test
instructions, to ensure the just built doc tools are fetched instead
of the qtbase-built ones
Test running this new approach will allow us to collect some feedback
on how often breakages happen, and how much easier it makes the
documentation team's work, or how much harder it makes the life of
regular integrations.
The abundant amount of optional pinning options should be enough to
avoid any permanent integration dead locks.
Task-number: QTBUG-128730
Change-Id: I8606cb3076036a4a0ec652d0fa74d270e8f5dfdf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 1f646bb978ed94c25f6224e801779c929096c0ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Introduce a new QT_OPTIONAL_TOOLS_PATH cmake variable that can be set
to a path where some of the documentation generation host tools might
be located.
This allows using specific builds of qdoc, qvkgen, qdbusxml2cpp and
qtattributionsscanner for documentation generation.
QT_HOST_PATH wouldn't be sufficient in this case, because it requires
all host tools to be installed for the given path, otherwise
configuration will fail
In contrast with QT_OPTIONAL_TOOLS_PATH we can specify the paths only
for the tools listed above, while continuing using other build tools
from the usual locations, either built or found.
As a drive-by, fix the usage of CMAKE_EXECUTABLE_SUFFIX to be based
on the host platform.
Task-number: QTBUG-128730
Change-Id: I2796be3a9772b106788ce63a4aed890516e8b716
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit aab8b7727d8acff989dbdf9b01ca7fb2b12da541)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a new coin_test_docs_common.yaml file that contains the common
instructions for configuring a documentation warning build.
Task-number: QTBUG-128730
Change-Id: Ifc86570f3c98e64364f3c2c2bb71f45eaaee0c19
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 3da46b5fc2ea04be85c458f9eac88dbe1f091757)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A new QtBuildStaticDocToolsScript.cmake script is added which:
- clones qt5.git
- initializes required submodules for building doc tools
- checks out qttools/dev/HEAD
- syncs the dependency SHA1s as specified in qttools'
dependencies.yaml file
- configures qt5 as a top-level static build
- builds qdoc and other tools required for documentation generation
- installs them into a custom prefix under a subdirectory of the
repo's root build dir.
The script is intended to be used as part of qtbase's CI build
instructions. See the follow-up coin change for reasons on why we want
to do that and how to configure optional ref pinning, instead of using
dev branch always.
Task-number: QTBUG-128730
Change-Id: I836fc2f1b47c07171d2a2bd54a85bc2145212e46
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f7f02c791bcbee44597f1fe24570ebdf352ec648)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 8d5e7d50d8dbf1ad79bd8ff9f6ef6028eba481c9.
Reason for revert: Arm packages should be sign-able now.
Change-Id: I6a896bfd84927da9c15647d207a6ad5024a27949
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit a33811ee8d746d70a7eba4ba8b1d321ace96f741)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The full set is needed, on all platforms, so that we can use them
during documentation builds.
Pick-to: 6.5
Change-Id: Ie555094a8e365fada7e43da6899e312d774eadb2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 179982a81a292bfe3f9dc16888f7c9777f1b2251)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Allows us to pick up these defines when building documentation on
non-Apple platforms.
Pick-to: 6.5
Change-Id: Icd1029e87a56ecfa81875f024a7d959250cd9bbe
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 0c1c3dfad2cf435bde81c11545ad28b73956253c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Useful to base documentation on data known to the build system,
such as the macOS minimum deployment target.
Pick-to: 6.5
Change-Id: I280f3b34e935c878321c24936a52dce406fdf014
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit db9bd4ab3ba80d8bd31fcdb3fc6f93ed8332a9f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Let the size for CT_SpinBox be calculated by the base style when
QStyleSheetStyle does not draw the spinbox. This makes sure the returned
size matches the size needed by the style which draws the spinbox later
on.
Fixes: QTBUG-130642
Change-Id: I99aca7440c4ce9800d78f76a209097a93f320cd2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 96adebed606cdbc73c73778917d777dc04c6e93e)
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 385f0732d927f0eba8ecf990ee9bc19936475edd.
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>
When the font size gets to a certain size (at some point
after 1200 pixels), DirectWrite will just return an empty
rect as the bound for it and does not want to render it. At
this point, you might want to consider other ways of
rendering the text, but since the same did not happen
e.g. with the Freetype backend, it was an unfortunate
platform difference.
As a fail safe, we detect when this occurs and fall back to
the QFontEngine base class approach of drawing the glyph as a
QPainterPath instead.
[ChangeLog][Windows] Fixed an issue where glyphs might be missing
for very large fonts.
Fixes: QTBUG-126671
Change-Id: I13cc1e5d71fae114e2a7933a7c5f7b9980237390
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit a5ddcbb76b674470f0c3d1d5e0bb7697a2828d25)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 474af0a61d6154006966a775d186687aa8881708.
The code had an error showing when the QGraphicsView was not at 0,0
in the window.
Task-number: QTBUG-128913
Task-number: QTBUG-52507
Change-Id: Ic228cc7e71ef54dd23c946b9d90f9c45aac793d9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 733459637e10edca006b0ad9b68299496e1b4ebd)
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>
Avoid unneeded calls to rowCount() in a for loop as this might get
expensive for large models.
Change-Id: Ic949ba64f5068b4e6ca0d0c9bc51f181e220da70
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4280e4c12e289aeb0ed28f07b0036e89bc8fb35f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Break out the offset-specific code (partly in preparation for handling
its localization better, but also) to ensure we try more candidates
and, when using the system locale, only use QTimeZone::displayName()
if we must - as it may oblige us to instantiate the system time-zone
instance. Tweak ordering of #include headers while I'm about it.
Change-Id: I183ddd1bcb181120df5561bfdc4d89a218292ee0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1b909695a66500b3cceb0fee668b12a663ed3b8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
so also we can call it directly from extended classes
without using get() calls.
Change-Id: Ie0aa7509620e3d675816b9efb1db8b092e1c4a8f
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 48f9ab09464a3e8259ceb75ff13b55901cd74760)
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 bf3fc5c95cb4e6acedf242c00b7a1c3b455062bb (but really
1f22fc995a36193cd67e8190858bb33614d149f4 and
855c4484693015cb6498f2183d95de1377d49898, 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 385f0732d927f0eba8ecf990ee9bc19936475edd.
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>
The test incorrectly failed on Linux because of a linker error
(unresolved symbol pthread_create()).
Fix by adding Threads::Threads, which provides -lpthread, where
needed.
Amends ced943e936e335a16e9b479a2010e5bbee1af4f1.
Fixes: QTBUG-130621
Change-Id: I25f7a5d6528576700628a85953c2e5c1a88dfe41
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 129523280cb7a6c9af5c6edc2da09bb333bc7833)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So that we don't rely on building/running Qt auto tests just to
build the docs.
Change-Id: If3939717c57e8d4074afe0d611a1d04e65da7d36
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 876622c3e2702610ff8e26adc773441c07afb52b)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Text insertion from an input method such as Writing Tools can come in
without there being any marked (preedit) text. In this case, if there
is a selection, Qt's input-method protocol specifies that the receiver
should remove the entire selection before processing the range of the
input-method event. But we were not taking selection into account when
computing the range passed to QInputMethodEvent, resulting in inserting
the text at the wrong location.
We now consider both marked and selected text when sanitizing and
computing ranges. For now we assume that there can't be selected
text and marked text at the same time, and we also assume that the
incoming replacement range is not a subset of the selection range,
as this would mean we would need to extract parts of the selection
into the commit string up front.
Change-Id: I8948735a10265f92c01bc4e01870a7870fb1081f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 500d19bb54c8fff58b169bb3c5a9aaaa5277151f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Interface implementations related to child navigation might be
called while the object is getting destroyed, in which case the view
might already be degenerated to a widget. In that case, qobject_cast
will fail and we would dereference a nullptr later.
Prevent that by adding more nullptr checks. As a drive-by, reuse the
down-cast pointer in more of the implementation.
Pick-to: 6.5
Fixes: QTBUG-129582
Change-Id: I06a80576a5d71150787f493e2b6c9a58696eac99
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dheerendra Purohit <dheerendra@pthinks.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9965f9a191a426e65e32b3f833f2aedcc19ef405)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Separate them with blank lines from the other ctor sets, remove an
internal blank.
Pick-to: 6.5 6.2
Change-Id: I5cb165930520681b68a85b57d05a86c0ca440805
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f68443d981babe9e2d98b9e7cad53b287d8229c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drawing a CE_MenuItem with icons when some entries don't have an icon
resulted in a misalignment of the text for the entries without an icon.
Fix it by honoring QStyleOptionMenuItem::maxIconWidth which is set by
QMenu depending on whether on if it's entries has an icon or not.
Fixes: QTBUG-130704
Task-number: QTBUG-127536
Change-Id: I826cdce5ead5da0d1e5fdd8a5e2a6972306457b2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 44634c58ceb79a63102592ec4e1b8a7399a8a660)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The widget might become nullptr, especially after delivering events to
it. So consistently test for nullptr before calling the event function.
Fixes: QTBUG-128478
Pick-to: 6.5
Change-Id: Ieed4e8b68b41488fafd9946d718c1d77fad39a44
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6b86d9d08b407a56bad2d37f65169e36356b0741)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 7a7f2547f3e9ddf4e50decd85189200033193177, 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>
Similar to the display manager and the input delegate, keep the
accessibility delegate under the base class. Also, following the same
pattern as in the parent patch, assign a default instance for this in
the delegate in the constructor, and initialize anything later when
needed. Also, make sure calls for various objects under the
QtAccessibilityDelegate are safe and guarded.
Task-number: QTBUG-129704
Change-Id: I14a57d8e0916127ae8fa00acb3265b92803087dc
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit af73c7a99eeea346efb65bed1d6e643e74ef33a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While interfaction sounds like an interesting term, here we want to
use the more appropriate word interaction.
Fixes: QTBUG-130720
Pick-to: 6.7 6.6 6.5
Change-Id: Idbbe2176d8c3b68df80ba652312b60359d67e839
Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit aa701532f63d0bb6b335e1ccd3acb55f682478a2)
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>
"Different" meaning here "different from the target's directory scope".
Consider a qt_add_resources call in a directory scope that's different
from the target's directory scope. Then CMake's AUTORCC would pick up
the generated .qrc file. This leads to duplicate symbols errors in the
linking phase.
The reason for that is that we add the .qrc file as source file to the
target, and the SKIP_AUTOGEN property is ineffective, because we're
setting it without the TARGET_DIRECTORY option.
This situation occurs, for example, with a qt_add_translations call in
the top-level CMakeLists.txt on a AUTORCC-enabled target that's defined
in a subdirectory.
Fix this by adding the TARGET_DIRECTORY option when setting SKIP_AUTOGEN
on the generated .qrc file.
Pick-to: 6.5
Fixes: QTBUG-130056
Change-Id: Iedc847eb85d918c5a1df20cb477e3192d1138b7f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d516a452232bd9b969db19a62586e969dfc54b39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Strangely when a QTreeview is put in GraphicsView using
QGraphicsProxyWidget, QTreeView header splitter cursor does not appears
though section can be resized without that. This change forces
the QGraphicsProxyWidget to take header splitter cursor from lastwidget.
Fixes: QTBUG-128912
Change-Id: I783e8357ae8386af70d28a1495e3b2367921df76
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 769392c3a8055af996f593dccd85ca3f775b1640)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the same value repeats many times the values y1 and y2
can end up being the same cauing an assert or division by 0.
Fixes oss-fuzz 42535976. Credit to OSS-Fuzz for finding the case.
Change-Id: I30afd5cd61163c51949a8c13d4034f4bc11d27a7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit aa1293f043f5df34ee7501efda6a6a2e8da5fa99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change 0990bd49407aac4f96acf78761af1070ff934215 introduced a runtime
crash where callback object was being referenced rather than copied,
causing it to go out of scope and causing a segfault. This patch
captures the callback by copy explicitly.
Change-Id: I9670041273ec8f7bb53108cbaf816e895225cf02
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 05b4b1e1250843155d91c929b25d8a8e188315fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Making it easier to read following the conditions being
checked, and less temporary variables. Also, call it at
the end of onCreate() once all other operations are done.
Change-Id: Id16fb1a75ac5429e5132712a7824656ad16cbac1
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 42790db73ee5dff1dbdf3a18a516d806be3fa0ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A menu separator can contain text which is rendered by some styles (e.g.
the fusion style) so the text width should be considered during the size
calculation
Fixes: QTBUG-13404
Change-Id: I6bf0b727919d6d281df48623f0be2ca89822e85a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e45d78ecba9cfcb620b5e6815a87cf99b0f25128)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If QT_QPA_EVDEV_MOUSE_PARAMETERS=abs is used to force qevdevmousehandler
to use absolute coordinates, the first event coordinates are incorrect
(0,0)
Fixes: QTBUG-86104
Change-Id: I9352e809a4a62b15adcf279b00f2d07a72257012
Reviewed-by: Janne Roine <janne.roine@qt.io>
(cherry picked from commit de2706fa35fa0d9f43d97b7aa6a7c30d1bb22e33)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a manual cherry-pick from
2c1506b1bd551249852d43250d7919f5e3ac7ac1
With minor documentation modification (6.8.1 instead of 6.9).
Users may use their own AndroidManifest.xml and define permissions.
However in case the manifest defines a permission that a Qt module also
sets when the <!-- %%INSERT_PERMISSIONS --> template replacement is
done, an error will occur during the application build (duplicate
permission definition).
This patch prioritizes such manual permissions and removes any
previous ones a Qt module might have set.
Task-number: QTBUG-129944
Change-Id: If94c218928aa5672686dd468a8d66995508d591f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2c1506b1bd551249852d43250d7919f5e3ac7ac1)
This is a manual cherry-pick from
87cc6bb8c81b93b5c806a821e22332c80c0c37d5
Android permissions may have additional attributes such as
'minSdkLevel' and 'maxSdkLevel'. When generating the default
AndroidManifest.xml there may be duplicate permission entries, stemming
for example from two different Qt modules.
With this change the permission without any additional attributes is
given priority. The underlying assumption is that such permission is
likely the most permissive.
Task-number: QTBUG-129944
Change-Id: Id0416290780b68289c2cca0bc03dde40997d3c16
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 87cc6bb8c81b93b5c806a821e22332c80c0c37d5)
This is a manual cherry-pick from
bb8cf72233e05c88424d525ca578cbf21d66c938
With minor documentation modification (6.8.1 instead of 6.9)
Since Android-12 / API-level 31, the ACCESS_FINE_LOCATION is no longer
mandatory for Bluetooth usage. Removing it will avoid unnecessary
location permission query (user prompt).
There are less common use cases to derive the location too. In these
cases the user must override the BLUETOOTH_SCAN permission so that it
no longer asserts neverForLocation, and also request the
ACCESS_FINE_LOCATION permission separately (QLocationPermission).
This change relates to QtBluetooth change, which adds
android:usesPermissionFlags="neverForLocation" attribute to
BLUETOOTH_SCAN permission (in default-generated AndroidManifest.xml)
[ChangeLog][Important Behavior Changes][QBluetoothPermission]
ACCESS_FINE_LOCATION is no longer requested if API-level >= 31
Task-number: QTBUG-129944
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: I774d0aada4c08829860d252a616fd0c3992a853d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit bb8cf72233e05c88424d525ca578cbf21d66c938)
This is a manual cherry-pick from
5efbfcb032d801c7083d4a850d0279a075de7f1a
The function allows setting additional permission attributes like
minSdkVersion and maxSdkVersion. The function's implementation is such
that it should work alongside the older way of directly setting the
QT_ANDROID_PERMISSIONS target property.
Task-number: QTBUG-129944
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: I0f40692574848fccdf65f9baedd14351917ce4bf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5efbfcb032d801c7083d4a850d0279a075de7f1a)
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
A missing update of a "last" variable meant the loop inevitably did
nothing useful. Include type-annotation for last, while doing this.
Thankfully the check still doesn't find any duplications, now that
I've fixed it so that actually would, were any present.
Pick-to: 6.5
Change-Id: I672e6570359a3ff102a364d8af98c5c8c0bdc4d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 98db7a35d2ee56f5da11b4a8e745f2ee6a965077)
QTimeZone::displayName() may return empty if it has no
suitably-localized name for the zone. So QCalendarBackend's
dateTimeToString() can't rely on its tzAbbr() returning a string that
starts with UTC (and it may now, with proper L10n, start with some
other prefix) or indeed has length >= 3 (so sliced(3) could crash).
Rework the handling of offset name (mainly for the pick back to 6.8,
as I'll be back to get rid of the kludging in 6.9) to at least not
crash on empty return. In the process, use decreasingly appropriate
forms as fallbacks if we don't get what we want.
Fixes: QTBUG-129696
Change-Id: Id4f42778ca9a4806ac5dba23ce7068261a90500b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9e749df879a5bc76fa416c96f73378d81608801f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added a comment to the suppression, to make clear why it's justified.
Change-Id: Ibc8aea809a8e9467b3a194a142296ea6b79e1971
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b460d0bd809b10705d2658bfb62cb0d04835c015)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Q_GLOBAL_STATIC docs repeatedly used MyType as the name for an
illustrative type but staticType as the name for the variable of that
type. While this was surely meant to mean "static of MyType" it made
it sound like it was the name of a type. So rename it myGlobal.
Pick-to: 6.5 6.2 5.15
Task-number: QTBUG-130613
Change-Id: Ia1bb1dbdb27e45ea84daad5bd5ec77313a53236f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 60962e7a9cd765ac114de3c2eeee4ca2a7a6d21a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation claimed that exists() would return true even after
destruction. This was not true when this implementation of QGS was
introduced by commit f7eff7251786186ca895c8fc537b304bc89977b3. The
docs in commit c0860d26a1b87f42842faeda3e6043a775916594, however,
claimed it and no-one seems to have noticed the error until now.
Both commits first landed in Qt 5.1.
Pick-to: 6.5 6.2 5.15
Change-Id: Ic92c8ead25faed0125ff583cb76420a4154af9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e9226e6e44419affb13ebdd9c624ea8ef357dc2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Seeing just "Enable thread support" sounds like an imperative, which
is strange to see because it is only shown if thread support was
explicitly enabled.
Reword it slightly.
Change-Id: I37596118dfc66204aa3ff81397caa818a5a91e66
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit 649caf962f6ff9edf9bd01f5f48c32f713ba773b)
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>
The _qt_internal_finalize_batch function had a bunch of problems,
style-wise and function-wise:
- it called find_package(Qt6) in its body, which broke when
configuring qtbase with in-tree tests
- it constantly rewrote the merged blacklist file on each
reconfiguration
- it used file(WRITE) to concatenate content
- it was in the public API file
The changes are:
- Move the function to the internal test helpers file.
- Change it to use qt_configure_file instead of file(WRITE).
- Call it at the end of the qt_build_tests for a repo, or at the end
of configuring a super build, instead of relying on a finalizer.
- Remove the find_package call. The reason this was added in the first
place, was to populate the __qt_core_macros_module_base_dir variable
so that qt_internal_add_resource configure_file call doesn't fail in
standalone tests build.
The variable was unset because the finalized function was called in
the top level directory scope, whereas the very first find_package
call was in the tests/ scope, meaning the variable was empty.
This is still a problem in the top-level build where the tests scope
and the top-level scope are different. Work around it by relying on
a global property to reset the value if it's empty.
Amends 6a9e89121d7766a34c4281d298057bfbe8af36b3
Change-Id: Id6fe41ee86d09b8118bea52cac8a59965d7ecb9e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c997e3bb8b4a35a729f1c207b01385d1323cad2b)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
The qHash implementation for QModelIndex is not very good resulting in
hundreds of collisions in the hash table. This means most lookups in the
table essentially becomes a linear search. This was 'generically' fixed
for Qt 7, but couldn't be fixed for 6 because of the qHash
implementation is inline and would result in different hash values for
the same QModelIndex in different translation units.
To work around this for this particular instance, we wrap the
QModelIndex in a struct that has the fixed qHash implementation.
Fixes: QTBUG-130309
Pick-to: 6.5
Change-Id: I586fb10cadf73900f3d644f421c37b381224a419
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1558811a8485f6dcc51a50a2bba0846091ca8bf6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It should allow a through f for hex digits as well.
Fixes: QTBUG-130119
Change-Id: I79a13d4e5dfee5c4c229eb64c26a5530928d0495
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ff5bc9266a39dc1d63ca02f592089bd4c2d9c4f6)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
This makes tqtc/ branches to use the public branches.
Amends 2a0e89981a52633c497f62bad0c7d26c466493cb
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Task-number: QTBUG-125569
Task-number: QTQAINFRA-3935
Change-Id: I1098165c3122befabc503d38c46d476920d835a2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
(cherry picked from commit 701f688d9909c45f37d497746a6d6d893be4a5f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If an item's shape() path described a rectangle not starting at the
top left corner, the code setting up clipping would correctly identify
and attempt to use it as a rectangle. However the conversion to a
QRectF would produce a non-normalized rectangle, which could lead to
unexpected clipping results. Fix by ensuring the rect is normalized.
Fixes: QTBUG-128488
Change-Id: Icbd17a95dde46a1969994f5eac021ac7b8ac5689
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 0cba6115605f586109a9b167a7d220670c5cda03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since all it needs is Qt::HANDLE qglobal.h is an overkill.
Task-number: QTBUG-106722
Change-Id: Ib000532bae3500a06c548b3c308e28bf0abf80d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dee05596d3ef95572e97a84191f9141e9231e75f)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The code tells that it was deprecated since 6.2, but the docs were
incorreclty mentioning 6.1. Fix it.
Amends fe9d7bf759d116f99131d14ac8b1fb44b2bc62fd
and a2c8184b6b241b063e9af005edf082e653dfd8a6.
Pick-to: 6.5 6.2
Change-Id: Icff14ccc5d581d27d721241e8d594ac9fad8e7a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65e9c215ff25f7b97520a2b502548c5f5af0e589)
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>
Due to increased menubar height, an attached menubar to QTabWidgets was
shown as >> indicator. This patch reduces the size of the menubar, in
case it is attached to a QTabWidget.
Fixes: QTBUG-130399
Change-Id: I0e71156cacd6acc51ede353b3b4ddf09d9c0260f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 9a06060e9ba0711ed458c19c274b7903f3d89d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It causes the SBOM to be non-reproducible, as the path is different on
each machine.
Embedding just the compiler id and version should be sufficient.
Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: Iad66ac3f90c4969d27307c77bef46d2eba15c175
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d7fb9bfb800a3bae41a5f6a73c598f859848b98c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Filter out source files that are not actually sources, like pkg config
files and json.gen files.
To make the output more reproducible, replace the absolute source and
build directories with relative paths prepended with a marker like
/src_dir/ and /build_dir/.
Apply this to source file paths and to qt attribution json file paths.
Genex wrapped sources still need to be handled, but that will come in
a later change.
Amends 37a5e001277db9e1392a242171ab2b88cb6c3049
Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: Ic38cd9df827c1da770c1f337bc4725748bed5560
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 6e7f871edfd35174b40c7eb7386282bfe019f276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The typedef was deprecated in 6.0, but the docs were missing this info.
Amends 557623cc4f22295e5e89462dfdff20d78b3b9cdc.
Pick-to: 6.5 6.2
Change-Id: I634d946e54302c9ca06c1a91c5b63c3fc6a07aa3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b85d704c4bf762a9a5965661835d711f1d00435d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To avoid any potential null access on the delegate from various
paths like onResume(), onPause(), etc. where the delegate or some
of its member or delegates might also be null, make it final and
assign it a default instance in the Activity constructor.
This applies the same way for QtDisplayManager and QtInputDelegate,
which are final and assigned an instance at the QtActivityDelegate
constructor.
This means also, that each of those delegates or classes should
ensure any of objects used under them are safely called or not
in null cases.
This should help us reduce the amount of potential
NullPointerExceptions.
Fixes: QTBUG-129704
Change-Id: I36861c95d3b389fd88822aac0ae3616ccb3e304d
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 64f152d52a8720de71c7440ca2979345b919c58c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 1fb0dca140c1dbf3e66b322af837b7bf650f2e77, which removed the
last QVLA use from the TU.
Pick-to: 6.5
Change-Id: Ia1848c1e4bb1336706aadb72b864d788aed8f2fe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2c7910cada7668ab55ad0edac82cf9c215ff4adb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Its definition triggers QTCREATORBUG-28838, which has been marked as
Won't-Do.
By moving the class into its own header file, we limit the fallout of
said bug, which otherwise makes working in qcryptographichash.cpp a
nightmare with QtCreator.
Task-number: QTCREATORBUG-28838
Pick-to: 6.5
Change-Id: I12b8069ab77bfaee33b5df1b09757d617b142a44
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d36835f0e3cb58a9858dc6cc13fbdec9ded7c227)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is in preparation of moving the type into its own header file.
Amends 29050fa65b7c755ec3238ff0cc238c626832bc8c.
Task-number: QTCREATORBUG-28838
Pick-to: 6.5
Change-Id: I9dd35c1adc9b1ea32d8616ace89975c07a380ae4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4a1e0ddeae566ab730c1505bb654471509ba0cfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Those two commands don't need to print info that is not necessarily
needed.
Change-Id: I0a76c08848786ee9a9aa9e3cb876c66a79acaa3a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 31dfb55bdda9fd248dcb3f956e18454e9fbebfa6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid using two processes where one is the input of the other and
having to do any dance to safely terminate each one in case the
other fails.
Do the following instead:
* Get the crash logs output first, if it's not possible return.
* Get the abi for ndk-stack command, if getting the value from
the device fails, we still get it from the build dir if the
emulator doesn't repond for some reason.
* Fall host architecture if failed to get ABI
* Call ndk-stack with the already obtainted logs
* Override the output only if ndk-stack gives back some output
* Print the output
This would avoid errors/warnings like this:
QProcess: Destroyed while process ("/opt/android/sdk/platform-tools/
adb") is still running.
QProcess: Destroyed while process ("/opt/android/android-ndk-r26b/ndk-
stack") is still running.
QProcess: Destroyed while process ("/opt/android/sdk/platform-tools/
adb") is still running.
Change-Id: I2f508998c0376d901947b169632b22a1bbba74b9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit e70dae69a544c7061ef03885b1defc3989552268)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It appears that the VxWorks linker behaves similarly to GNU ld, where
the order of link libraries on the command line matters.
Our plugin linking system is not ideal (due cycles like Gui -> plugin
-> Gui, or Qml -> qml plugin -> Qml), and can change the order of
the linked libraries on the command line.
Due to that, some of the qtdeclarative tests fail to link with
undefined symbols in Qml.
Apply the same workaround we did for Linux, which is to increase the
LINK_INTERFACE_MULTIPLICITY of Qt modules to 3, effectively ensuring
that each qt module static library appears at least 3 times on the
link line, given the linker more chances to find relevant symbols.
Amends 58a7e4f0bc5e9290cc205762d51adc5806b034fd
More in detail reasoning explained in commit message of
69b27e09f55e63a713ca8b14f162d4f449c8dfff in qtquick3d
Fixes: QTBUG-129113
Task-number: QTBUG-83498
Change-Id: I7ac5665d4dd2865584ba1c96d51fd311ef224d10
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8c49dc9bfc388f7a850d33201f0165949481a18f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The m_views hash holds Views and not int ids.
Change-Id: I680da55f6a38940368b4c15fbd0537263bd604ae
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 7260214fcd656a525300d74f238c49e0a17134b4)
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 8420d3e0b205d0ef2367224afd3040c68e28bcc9
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)
The socket message comes in too early so add an additional
postEvent when registering the socket notifier.
Fixes: QTBUG-125874
Change-Id: Ie951b7a1b858d12927478e071157780ac4fc320b
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9b01f1bdb7e4107de3f898446fa087efa81e029e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes an issue where a stream isn't active _yet_, but will be.
So it also needs to know about the adjusted window size.
Change-Id: I752760e4c99bac36580b3b8d0ed510baf2905529
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 2201b54ee3bd43280f3cd4a1754ba06bc86382ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found these while adding type annotations.
Task-number: QTBUG-129566
Change-Id: I51c8e5676f958094946c0e6f396b98c083fd9de0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit ba9d6b261b04119b15d27f3f57dcfe0aadad5012)
This change ensures that the correct model index is passed to the sourceModel()->data() function when retrieving the DateRole value.
Pick-to: 6.5
Fixes: QTBUG-70792
Change-Id: I66c9f2404533625f05dd51db2d9263287db6ee91
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit f0d6bfb2426392060575dc61bfa698df7964bf5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On device, use proper file names the same as the one passed
to the test. Also, along the way, make sure to also pull the
output of the same format of the stdout result. Currently,
it's not the case, for example, if we pass `-o name.txt,txt -o -,txt`,
the name.txt is not being pulled from the device, and
with this patch it will be.
Change-Id: I5ecd22e6c37e5abfbe68b19ae102a852b01dd7e0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 61468b3411c6f88180a9b22535f420beada97495)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And leave non-zero possitive exit codes to reflect the
number of test fails.
Change-Id: If2871be14cdf46812471c9d2f5409dd8f3ddd3d9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 29e2bada37bb5d1616d36fe9d4a6d6e05504bee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The testrunner was always printing the results only at the end of the
test run. If tests are long, it means waiting long to have any sort of
result. With this, the results are printed to stdout whenever they are
written by qtest on the device.
Fixes: QTBUG-129975
Change-Id: If4315eb74e73f6274a735e56be7e6989563bb514
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 7545e7c921f364cdb037f8e967f012351c2eb3ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After being able to return the real return code for the test app,
we don't need to rely on custom parsers anymore, because qt tests
already return the number of failed tests in the return code.
This also, would allow using the -silent qtest option where it was
not possible before because the test fail/success was dependent on
getting full test results to stdout.
Change-Id: I75ecddd49235fcf25e1c0856b639228884a8cfba
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit aa4fa0159f1f5ebb290a5089ad37914b858cf5c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Write the exit code for qt tests at the end of the test run where
it would be available to androidtestrunner to find out the exact
number of failed tests, this would make the custom parses in the
androidtestrunner redandant.
Fixes: QTBUG-129976
Change-Id: I3c2ea9780505f1d4a2a46ae94534cd1e4f07334c
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 8d4022187b660de6c81c09ea7a4864048aa94978)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move common args to function and add user Id to
info struct, also to be used more in upcoming patches.
Change-Id: I14fd07f7daa52ef0369df16aceca05f0fa96f473
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 0c6827702075284ae344fd66590225a1af70c5f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't need to enable nospace() if we stream but a single element
(nullopt). As a consequence, delay construction of the StateSaver
until we have determined that the optional is engaged.
Amends b7657ddccbe0a5ab1cdfc61ae6b7f0501dbfb24a.
Change-Id: Id974dff078cb989b92f84b63bf14956a2fba32b2
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 25931bf2181706e1cba416b0530f07959182f074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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)
If it's empty and the command didn't fail then there's no
crash so no need to print anything.
Change-Id: Id9045138a6535220abf819b8d334c629765a6547
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit a9db240111e454331770d3def95f60eec3c368be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use colors only for non-ci environment since color characters
just make the output noisy and they are not rendered correctly.
Change-Id: I14c5f9c215fbbe9a020011943455d2df615d9bee
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 5a07f6ca4e7f00fada0db7f21892500831d537bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Try to pull result files for 3 times in case they fail,
just to ensure less flakiness.
Change-Id: Id052fe2359d190fe87e304bbd22fc2096d50cadb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 488f30e4a0a13a90f14883d1b511d3c21db8402e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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>
androidtestrunner should've used ANDROID_SERIAL adb env var, instead
of introuducing the new one ANDROID_DEVICE_SERIAL, but for now
support both.
Change-Id: Id0fc75fc64d7d3dd033c60e6ba9c6c3350ddd899
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 252550877dff358b02a5be773d32fe606bff51f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This option is mandatory in code, but it's documented as optional.
Change-Id: I91a664b3dbfec45980f3bfb4313e13321610782b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 667588aa86913c7fe69103666046f01f764e5de5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We only need a snapshot of the crash logs, so pass -d to make the call
non-blocking, this means we we can check right away for start/finish
of that process. This would also, the error:
Error: failed to run ndk-stack command.
agent:2024/10/21 16:31:42 build.go:404: QProcess: Destroyed while
process ("/opt/android/sdk/platform-tools/adb") is still running.
Change-Id: I2314d0b9567865934c2aa8f6d40ace2b4288ebb2
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 2d3334a87955cd54bb47b57a25af2ed0ce6f3a69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Check if any or specified device is running and fail with
appropriate message instead of attempting to run other adb
commands that might fail with other reasons that hide the
actual root cause.
Change-Id: I61078ca988f381e834b41140e36b0e4a5f77714f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit d5491ec2ab5630c95c25c0e4142ddf4af398f083)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Try to check if the device is running few times while waiting
for the app to finish, just in case the adb ps command fails
for some reason while the app is actually still running.
Also, use ps -p <pid> to directly return only pid and avoiding
to filter out all the other processes with grep. grep can be then
used to only filter out the test package name and leaving out the
ps header.
Fixes: QTBUG-127488
Change-Id: I85fe61106381fd1a7a26ef6347f8ab4a4a6678bb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 03006555ec872935d78fbb41f02c4cef3a5cab51)
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>
Back when this code was written, the font matching algorithm
would also match the script of the font, but for multi-font
engines, this no longer happens after this change:
c003a18ee332abf2387172eb0856a176a32a6c8f.
Since that change, we will always prefer the requested font, even
if it does not claim to support the writing system in question.
The normal fallback mechanism in the platform plugin will be used
instead of having a secondary, cross-platform fallback mechanism
like before.
With this change, it is quite possible to get a main font engine
which does not support the given script, since this will
essentially always just be the font the user asked for. Therefore,
warning that it does not is really redundant and just adds noise
to the console output. This turns the warnings into qCInfo()
instead, so it is still possible to get the information if we
need to, but by default it will not be visible.
Pick-to: 6.5
Fixes: QTBUG-129092
Change-Id: I0584ce3d1e37790368cf616c99df077fc07b80a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cd6608e887066db2d9150bf6ea9111e8bd5b8fec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the calculation from Commonstyle and add the increased padding and
horizontally layouted buttons to the horizontal size hint.
Fixes: QTBUG-130288
Change-Id: I7932b782e7873a0178091a51379f17453eb585fd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 96d46cad43517adefa2eb7cb8819a0b2cc9241e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Adjust the arrow rect, so that the arrow is not outside of the combobox
frame in RTL mode.
Change-Id: Ieddda7be4959a37a4c47ab9fe8e4d6bae4e91f04
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d5afa192a32ac7187621f37b5f8baaf2388730dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Horizontal padding for textedit controls is reduced from 8px to 4px.
To align the QComboBox label with the list flyout, the combobox label
got additional 4px padding.
Fixes: QTBUG-130125
Change-Id: Ieb4a8c9dab7fbe594134261b738060acfe7fdcb5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c8fa7408a0c15054a6a50c28c0c21845134a4a13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Disabled widgets were drawn in the same colors as active widgets, making
them hard to distinguish.
Fixes: QTBUG-130123
Change-Id: I723a1d5d3a90d56cc3e82148939ae3eaacd01ed4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 9523b97eb9146e308b25ef19394c48ec636a73ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In case a menu was associated with a QPushButton, draw a triangle
indicator that shows, that a menu will open up.
Fixes: QTBUG-130122
Change-Id: I798499c1484ed66662fa3ce7f3d1aeccd3f40ad7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 1347ca99a30364ca9973448111a9bf40173fd81e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit updates the setNativeLocks function to use fcntl for file
locking on Android systems. Previously, the function attempted to use
flock, which would return false immediately upon failure in some cases.
By switching to fcntl, the function aims to provide more reliable lock
acquisition on Android.
This change is specific to Android systems and does not impact other
platforms where flock is used.
Fixes: QTBUG-116511
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ifb93cb6a8aec801539ba378c23d9b1ada3f069bb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 3b8e8bd081c3d58d9e0e7ef4129b4f27ea0e250f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the width of a checkbox to the starting starting x position of the
ItemViewItemText in case the ItemViewItem has a checkbox.
Fixes: PYSIDE-2897
Fixes: PYSIDE-2906
Change-Id: I233e2bfd28836ae5578aadfe9332193848ac5a7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 877b29a78e38ff7c6af2d63d93e6a554544bf278)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That style hasn't been in Qt for a few releases, no need for any special
treatment.
Change-Id: Ib0d4c7c10515b92267956748db11be00ce85d76f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2553d9709f305c55a133306e40c1930d46737026)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Merge the two translation units into one, there's no reason for moving
the code populating the test data away from the test function code.
Remove some unnecessary QString<->QByteArray conversions in the test
data.
Task-number: QTBUG-114987
Change-Id: I20dc858c6dab683e19e35e5be4ecd4ff6d283164
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ce0a92549e7a4164d60f3b7c723b9f0a8cf28f55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add some type hints to unicode2hex as well, it is used by
ByteArrayData.
Task-number: QTBUG-128634
Change-Id: I86b7ce8567483bf8a4d4db78c9585652526cb90d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit c1ffb6e7515621a953b5ebf19c384b27df785d73)
MS-STL has an opt-out that makes std::byte unavailable.
This causes build errors in our headers in case client code opts out,
so detect this case and provide a clean(er) error message.
Change-Id: Iec0790f4c33eb876a98e2e34afbc9889f42333b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5a3859e0a455d82aea9e7c09b87f0dec91dec4e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The comment to convert a QDateTime to a PostgreSQL compatible string was
outdated. Adjust it to the current state and make clear that the
PostgreSQL documentation is unclear here.
Task-number: QTBUG-129983
Change-Id: I46e45082f2154881ab34278c5e9887cb2274dd64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit d6a7e51fa36c51a39c609ff0b2cd8bc10bd01e86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is to place some special functionality we need on particular
platforms, like peculiar case of TLS working in a special way on
macOS. We previously updated our ST backend to use new properties
when importing a key, but it's possible to run a test on macOS 15 that
was build with older SDK which would still hit the old case with
keychain access dialog.
Change-Id: I3c893d6a3ec199be59104921db7a56b87c62a825
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 02e89640536b59ba299a819d96e97f83e156685f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Document the limited range of datetimes that can be parsed from
strings and the (awkward) consequence of the range bounds being
specified in local time.
Add tests for UTC hitting those bounds and QEXPECT_FAIL() the ones
that (as the new docs say they may) fail. Technically the fact that
the UTC:min one *doesn't* fail is evidence of a bug in the existing
date-time parser. Its replacement should support unbounded parsing.
Pick to 6.8 required removing a QEXPECT_FAIL() specific (on MS) to the
std::chrono::tzdb backend, which isn't present before 6.9.
Fixes: QTBUG-129287
Task-number: QTBUG-77948
Pick-to: 6.5
Change-Id: Ic90558f1a06a62f7d0a947e37802370d1ab4e373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3e25203d4d5ba428309e972367dbdf99c4e70327)
macOS 15 introduced the ability to trigger context menus via a keyboard
hotkey (Ctrl+Return by default). We now catch this hotkey, propagate it
as a normal key event first (in case the application wants to handle it
by itself), and trigger a QContextMenuEvent if the system determines that
the action should result in a context menu.
[ChangeLog][macOS] The context menu keyboard hotkey available on macOS
15 is now propagated as a QContextMenuEvent if the corresponding
QKeyEvent is not accepted.
Task-number: QTBUG-67331
Change-Id: I3a64a9a18d2caf767fc32637d314a06465aae88f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e7c8c2ccc859f8083fb3bf442647b0a315cf1b60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the \brief section, which qdoc doesn't support for functions.
Explicitly use \fn to link the documentation, as qdoc doesn't always see
the declaration.
This makes the function not only public, but also documented API,
similar to QImage::toHBITMAP and toHICON. In practice, this is what
was intended, so fixing this in stable branches as well.
Pick-to: 6.5
Change-Id: Id825e494d13f10064742318d2b3bbd8f8f7a1435
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 26375032c92b8729ca5625c225e99a696d7b6b9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Mark QSpecialIntegerBitfieldZero as inline to avoid the warning.
Amends 38002df2065d3730defe3513f73088b444e68139, but not picking to
5.15, because inline variables are a C++17 feature.
Pick-to: 6.5 6.2
Change-Id: Ib10821f575e1c00061bb02592e4ac5462284d515
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit beda65ba9f4252b83aeeb3099465de7cce005fe2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It should be STATUS instead of NOTICE, otherwise in a non-developer
build where the default logging is quiet (log-level == NOTICE), the
output might confuse builders that those flags are used for the build
of Qt, rather than the architecture extraction project.
Fixes: QTBUG-130294
Change-Id: If2ee50b47d46b00dc55c5423700749ab142bbf7c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 674475887c6e4aeb82000e64657a69366cc9c7a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This brings back and adapted version of the sorting code that was
removed by commit 15f753ca5a60b5273d243f528978e25c28a9b56d. The issue,
as shown in the test, is that we store data1, data2, and data3 as
native-endian integers, so the bitcasts in the new code cause them to
become mangled in little-endian platforms.
Since this is a weird behavior and we'll be changing the sorting order
in Qt 7 anyway, I've left a warning for us to think about it at the
time.
[ChangeLog][QtCore][QUuid] Fixed a regression that caused QUuid sorting
order to change for some UUIDs, compared to Qt 6.7 and earlier versions.
Fixes: QTBUG-130155
Change-Id: I5eeb7b36bfc5ed7218e1fffd6a773c582ad0f6f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 222891d0b6b84bbf995bd75420bdfb55292c0901)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a subwindow before the current active window is removed, the
mapping of window index to index in the activated history needs to be
updated. This was done too late, so intermediate calls (e.g. to
update the layout of the area as a side-effect of calling
updateTabBarGeometry) operated on indices that were out of bounds,
leading to asserts.
Fix this bug by updating the index list as the first thing in
updateActiveWindow() which is always called when a window gets removed.
As a drive-by, make use of the fact that C++ knows about references,
instead of taking the address of the integer in the list.
Add a test case that asserts without the fix, and passes with it.
Fixes: QTBUG-129596
Pick-to: 6.5
Change-Id: I94d78dd49f486ee4aa6ffbddf528d985a206820d
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 665e1ea7a45d4f196958bf2b6d8f15c69d77340e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Have QRhiTexture::create() fail by returning false, as expected, when
trying to create a texture with an unsupported compressed texture
format (ASTC, ETC). Right now there are warnings, but create() does
not indicate failure, and then Quick 3D apps almost certainly end
up in a crash when they try to use ASTC textures.
Change-Id: I09b4bb01b1655788d87a263b1b47ea8856c975cb
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 2bfa2d6b21e807dcf375a82e10c40616e7e475ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because reusing larger buffers for smaller data is very much a thing
in Qt Quick, depending on the scene. It happens rarely for uniform
buffers, for which this feature was originally invented, but when
vertex/index buffers switch over to being Dynamic, this same code
path is hit, and for those, recycling older QRhiBuffers for newer,
smaller data is common.
Change-Id: I41856adf6b8bb5486d05e186d3007f262e7dc987
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 28469b4dfc039601b898a1cdef873d458fbc19eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtDBus has allowed this because the bus would stop the message and
return it to us as an UnknownMethod. But it makes no sense to send it,
so let's block it early.
For practical purposes, this allows the tst_qdbusmarshall test to
continue working regardless of which daemon is running the bus. The
message it was checking against only came from dbus-daemon; for users of
systems now running dbus-broker (like my openSUSE Tumbleweed) the
message was different and the test was failing.
Change-Id: Ia134ca414080cf243974fffd913fdad09d80cc60
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit d19db44d3f8a0ca0c69c6861e2a871de5ae7d106)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was in our docs but we didn't implement it. This failure allowed
QDBusMessagePrivate::toDBusMessage() to proceed in calling libdbus-1
methods, which had the validation and might crash the application.
Pick-to: 6.5 6.2
Fixes: QTBUG-130304
Change-Id: Ibb5d210c03672a363016fffd7b1a2b55c02119bd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f42f5b56140342238c325a014fbe8e179eff4348)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since 9122d826d25b9afab230771dc86e1ff6158e6cbc we're presenting drawables
on the main thread, even those produced on the Qt Quick render thread, if
we are part of a displayLayer call, as we're then presenting the Metal
layer within a Core Animation transaction.
We do this by assigning a block to the layer, that we then call on the
main thread in displayLayer. This block retains the drawable, so when
we're done calling the block we need to dispose of the block as soon
as possible, to avoid stalls due to running out of drawables.
To improve on this we add a local auto-release pool around the clearing
of the main thread transaction block. In the case of displayLayer we
need to take care to also include the referencing of the transaction
block in the auto-release pool, as that makes a separate auto-released
copy of the block (and hence also the drawable).
Task-number: QTBUG-129839
Change-Id: I7663862c63977adab7b1f22a136416c8bc910c6e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 72e4cb96700cd93213d5c3ecb14cd92f4c069c65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coin can now dynamically refer to the current branch of the repo being
integrated in the module instructions.
Change the license checking instructions to use the current branch
of the qtqa repo, rather than the dev branch.
This makes the behavior consistent with what everyone expects, instead
of using a hardcoded qtqa branch for all stable branches.
Amends 2a0e89981a52633c497f62bad0c7d26c466493cb
Task-number: COIN-573
Task-number: QTQAINFRA-3935
Task-number: QTQAINFRA-3878
Task-number: QTQAINFRA-4975
Change-Id: I6575c2868f3a7170570803f620feb5723fbbe6df
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 6c6a63cc8f49918d1059910644bcfaa4554b12f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Our QtPluginConfig.cmake.in files have code to skip loading plugins
unless the repo is found in the QT_REPO_DEPENDENCIES variable
or when building standalone parts.
The problem is that QT_INTERNAL_BUILD_STANDALONE_PARTS is only
assigned a value after all the find_package calls have executed,
which is too late for the qtsvg standalone tests, because the svg icon
config file would already be loaded and skipped.
This code path checked for QT_BUILD_STANDALONE_TESTS, before the
introduction of the QT_INTERNAL_BUILD_STANDALONE_PARTS variable.
QT_BUILD_STANDALONE_TESTS is set by the qt-internal-configure-tests
script, so it is always available.
Restore the previous check for QT_BUILD_STANDALONE_TESTS, while
keeping the new variable as well.
This fixes the tst_qicon_svg test to pass in a static standalone tests
build.
Amends 62905163bf887c2c2c9ba7edcd64c96d237a6e95
Restores behavior of be1ee03a0fafa28efa0c0e45f21f9dc684625957
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I19f620a39fe530bf7f96498cfad1c90621983eb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit c0e07cc3e2817d158d05e69e1254471ff6b074e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When Qt is configured using the configure script, rather than directly
via CMake, we can obtain the full list of configure arguments passed
from the config.opt file.
Add the configure line to the repo project SBOM package comment field
when it is available.
Task-number: QTBUG-122899
Change-Id: I0c5554dcda2f71ec4ba034b14c82a99757dc790c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit b6ee361bc7540db36c334fea0b9d355fbed9a2a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt default has changed to always generate an SBOM for all
platforms in the CI, so we always want to pass the location of the
python interpreter meant for SBOM processing to configure.
Task-number: QTBUG-122899
Change-Id: I1042c97b9133ca37e42eb3efd1689ec1f9f9ab31
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 1f8236236b86aac1a62c405ee8f186cd43e5ff17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was removed in a previous change and does nothing now.
Task-number: QTBUG-122899
Change-Id: I7a84c243c08a65e445cbd657eb281b37e68f1893
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 3acc310f9e90ff3ecd4135a184e8f4b7b366a75d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously SBOM generation was opt-in.
This patch changes the generation of the plain-text tag:value SBOM
to be enabled by default, except for:
- developer builds
- no-prefix builds
- standalone tests or examples
- cmake build tests
The JSON SBOM generation and the verification steps have also been
changed to be enabled by default, but only if the Python dependencies
can be found. If the dependencies are not found, the build will
skip the generation and verification steps.
Four new configure options have been added to control these aspects:
-(no-)sbom-json: Allows explicitly enabling or disabling JSON SBOM
generation
-(no-)sbom-json-required: Fails the build if JSON SBOM generation
Python dependencies are not found
-(no-)sbom-verify: Allows explicitly enabling or disabling SBOM
verification
-(no-)sbom-verify-required: Fails the build if SBOM verification
Python dependencies are not found
There are corresponding CMake variables for each of the configure
options, see the cmake mapping document.
[ChangeLog][Build Systems] SBOM generation is now enabled by default,
when building Qt, except for developer builds and no-prefix builds.
JSON SBOM generation is enabled by default if the required Python
dependencies are available.
Task-number: QTBUG-122899
Change-Id: I6dbe1869f8342154a89ff2ab84ac53c9ef1b2eb7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 96c5e55c111d957bd7b5294d2c2eb1d919cce871)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This will allow us to run only the first, but not the second, if the
second won't have it's dependencies met.
Task-number: QTBUG-122899
Change-Id: I141b4bd3b76a71495c760a118bdf1397ee7e16b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f15b3c864ee47177d4f13cf7a047f245c11c4d00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Introduce a bunch of helper functions to split out the finding of a
specific python interpreter, a specific python dependency within a
given python interpreter, and the handling of dependencies for each of
the possible SBOM operations: GENERATE_JSON, VERIFY_SBOM, and
RUN_NTIA.
In a future change this will allow us to conditionally enable certain
operations, depending on which dependencies are available, without
failing the build outright.
One behavior change is better logging of what goes wrong if a
dependency is missing.
Another is the double look up of python on macOS, to account for the
system framework python not having the required dependencies.
These was previously an internal opt in, but now it is done
automatically.
Task-number: QTBUG-122899
Change-Id: I3054f2649c0092dc5f2d3e299065f0f62dc6c5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 29a435faf84fbe9a80a3054c2dcce4d691b46e20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The DESTDIR env var needs to be evaluated at install time, not
configure time, so the $ENV{} needs to be escaped in the generated
script.
Also improve the error message a bit, to say which path exactly it
expected to read.
This fixes SBOM generation for the debian package builds.
Task-number: QTBUG-122899
Change-Id: I6869f0054601dcb35ae7ad7b55f808df4dc12311
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 08d5d9e9da8a4815be7dd2c952cb45a6597cc077)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the spdx id recording function might fail when trying to
retrieve the spdx id from the non-existent target.
Task-number: QTBUG-122899
Change-Id: I1f6b3d7bc88ff4aa28de1468cd86152747cc3bdb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4e120f265cc5d96399b01402ed53568abecde3d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Due to various reasons, Qt WebEngine needs to be built with clang-cl,
while qtbase and other dependencies with MSVC.
clang-cl does not understand all MSVC-style options, which are
recorded and propagated through the PlatformCommonInternal target
which is configured in qtbase using MSVC.
Guard the flags that are not understood by clang-cl with a genex
condition that checks that the compiler is not clang (which implies
clang-cl, because afaik it's not possible to use gcc frontend of clang
against an MSVC-built qtbase).
Change-Id: Ibf2c96399a8322ce13814c9c6afa5b57fd8885be
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 515ad07a12c4bf190545ae38eff588f7b979d68e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When setting/getting the expiryTimeout.
Negative values mean "never expire", so use duration::max(), which
QDeadlineTimer interprets as QDeadline::Forever.
Amends (and partially reverts) c57027199996d0f0d2ac8ebc4505c78afa54ab5a
Task-number: QTBUG-129898
Change-Id: I8f141cd3fc3c2ff4d21ba2d9663619bc507aeca4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4678d96d874c21b69f4942e3bfdc5fc97128cf4e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code would toggle between expanded and collapsed every time the
mouse moves over the item (after the autoExpandDelay), which was unusable.
As reporters point out (and I fully agree), collapsing the item under
the mouse is never wanted.
I attempted an auto-collapse when moving out of the current subtree,
but that was not usable either: when moving the mouse down, the auto-collapsing
of a previous sibling means that the item we're targeting has suddenly jumped
up, it's a frustrating experience trying to aim for a moving target.
The only behavior that is usable is the most simple one: auto expand,
never auto collapse.
Fixes: QTBUG-2553
Change-Id: I2c56dd668b2df4ec23bbbe829da6e8cdd049f376
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 195a35dbfb2453ae37d9541c82745c5795fe8b9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The \fn was missing in front of the signature line, and the scope
wasn't correct, either (Key:: missing). Add both.
Also remove the unneeded default argument (qdoc figures those out by
itself).
Amends 7fa3267fda6cff720cca44e829f9a39789031a54.
Change-Id: I7732760945ff23c0d83e06a75b3db8213ca020e5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 095340fc1173537ee286f9a37b799ccf2e602508)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Debugging output printed the return value of event->isAccepted() without
information what the value represents.
Add it.
Pick-to: 6.8.0
Change-Id: Ifbef69fed5d4aadd732c234c2ac74495560e65b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 5d028371bd8d775703739db51936cbd582626580)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was kept so as not to break compilation of user code (overriding a
function that doesn't exist in the base class). But as Marcus Tillmanns
pointed out in a qtcreator code review, it can't work because
QDirListing calls the virutal
engine->beginEntryList(QDirListing::IteratorFlags).
Removing beginEntryList(QDir::Filters) and getting a compile-timer error
is better than the code failing silently in user code (all sub-classes
of QAbstractFileEngine in qtbase have been already ported).
QDir::entryList() isn't affected because it calls
QAbstractFileEngine::entryList() which has an overload that works with
QDir::Filters.
Change-Id: I3cb18402f602ac78a6b29be57e59febb2b9db7c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4fecfcc867f8215defaa40b50f0340654a36b4c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
33874a9424cd03c21ca9986a39c383b3689f03d2 corrected a size-contrained
window's position when maximized. Restoring such a window's size
moved the window downwards as well, if the task bar was on top. With
the task bar on the left, such maximizing the window caused parts of it
to be off screen to the right. These bugs affect only Windows 10,
because Windows 11 only allows the task bar to be at the bottom.
Factor out all corrections to QWindowsWindow::correctWindowPlacement().
Correct placement when restoring size of a maximized, size-constrained
window.
Correct width of a height-constrained, maximized window.
Correct height of a width-constrained, maximized window.
Change-Id: I9a1e0cf4708e8c579595fdbdc7f16b927be53b05
Done-with: Johannes Grunenberg <nerixdev@outlook.de>
Fixes: QTBUG-129405
Fixes: QTBUG-129679
Task-number: QTBUG-123752
Pick-to: 6.5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 06fcb3dfe69e175f94d112ecef45b091598f5ae5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The submenu in rtl mode was not placed correctly due to the missing
handling of PM_SubMenuOverlap.
Pick-to: 6.5
Task-number: QTBUG-129716
Change-Id: I0a0d6a9007b4427a95a92b81a3450d65b944189c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 87c6d142d25bec937c0a521830fcb9e06d921114)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The watchdog is not enabled when running initTestCase and friends. We
therefore miss some deadlocks in these methods.
Task-number: QTBUG-128510
Change-Id: I119a1ee04c45df00b62f9d5990075e4bf8814142
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9154bb8f19815acc64b69b85a8c0e5ab8b96ec49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a timer gets unregistered there is a chance that a new timer is
registered again immediately and gets the same ID.
On Windows this is a problem because there may be WM_TIMER messages
remaining in the native event loop that have not been processed.
This may result in unexpected timeouts for newly started timers.
By not masking away the serial/generation from the ID we generate
we will no longer return the same ID that was just freed.
While QFreeList mostly was prepared to be used in this way, one function
was not, and the tests were written with the assumption that the serial
was masked out. So this patch also addresses that.
Fixes: QTBUG-124496
Pick-to: 6.7 6.5
Change-Id: If6784815bfa41e497cbc4e00bef51da3ded5f255
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit 21e9875d62414306fde9738ab255e55f22d1c8ed)
In Android the default behavior is that when a configuration change,
e.g. an orientation change, happens, the Activity is destroyed and
a new one is created with the new configuration.
In regular Qt for Android, this is not a problem as the QtActivity
overrides this behavior and swicthes the configuration without
recreating the Activity. However in QtQuick for Android i.e.
when adding a QtQuickView to an otherwise regular Android app,
we cannot rely on that being the case. Currently, if for example
the orientation is changed with an Activity that has a QtQuickView
in it and the default behavior is used, it will crash, as the
destruction of the Activity will terminate the Qt runtime, and
whne creating it anew the runtime is not properly restarted.
This patch does not fix the underlying issue of not restaring the
Qt runtime properly, but it adds a check so we don't terminate
it when the reason for the Activity destruction is a configuration
change, as in those cases it will anyway be recreated immediately,
meaning a full termination is too heavyhanded anyway.
Task-number: QTBUG-123711
Change-Id: Ia44ab8f55855aa5d54c5fb25e3cca90a9c0feaaa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit aef9fff1d7a0de98cb446a634fdf2812e45f19c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
http and rsslisting compile and can work, the rest are
don't build and are probably too low level.
Change-Id: I031494178d0cace10951c3eb5495fbbf0f73d717
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit d211b2ba7cec6ad5d98f0e2d82af8b350a38242b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The correct link should be QRhiResourceUpdateBatch::release(), not
QRhiResourceUpdateBatch::destroy().
Fixes: QTBUG-127111
Pick-to: 6.7
Change-Id: Iec370f5f4b2c9cc74f8ff96b8d5a027be79e8817
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 93136f7c55e545598a10e617f4951094bdbca9ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The macro sets the Qt related PATHs and attempts to call
execute_proccess command in resulting environment. This command should
be used to reproduce the _qt_internal_generate_tool_command_wrapper
behavior for execute_process. Since we may control the environment
during the CMake execution, there is no need to use a proxy batch
script to configure it.
The use of tool command wrapper in execute_process has a potential
issue related to the invalid command line processing. cmd.exe is
unable to parse command line correctly if the first argument is batch
script containing spaces and the follow arguments contain spaces as
well. execute_process internals use API that has exact same behavior.
Task-number: QTBUG-128420
Pick-to: 6.7 6.5
Change-Id: I2339c85ed611da89176629878db550b7b7976367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b68b3e773c68b577c55db76ca5c211e919ae8136)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDateTimeEdit and the respective header are available only when the
'datetimeedit' feature is enabled.
Amends bfe8ac4ebff7a1e8114068f2f46e73c588735690
Fixes: QTBUG-129481
Pick-to: 6.7
Change-Id: Ia9595bb17b47fd7221742665f1242a5f85ed6c0d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 00bcf5a867d0414cd894e46d085feef94aa317b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Can be useful for non-Makefile and Ninja generators, even if they
are unsupported for building Qt.
Change-Id: I02a622c89f725c3ae5b51ea345a530eaa5529976
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 08d1d113f140b1b4be5a387696a8a35934905d64)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During screen attach/detach, we may end up in a situation where the
window has a 0x0 size, and we end up painting to the window, in which
case we were trying to create an IOSurface of size 0x0. This resulted
in the creation failing, triggering an assert.
We now guard the surface creation with a check for the backing store
size being non-empty, and for empty sizes we fall back to a plain
null-QImage for our paint device.
Fixes: QTBUG-128731
Pick-to: 6.5 6.2
Invaluable-research-by: Viktor Arvidsson
Change-Id: I06ea582c87fb0d359387ef9495451801612701c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 58caa18d2ff1a67e16f960f5bd6b804cdaec4063)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIOSFileDialog emits directoryEntered from its hide/setVisible
after QFileDialog is a QDialog already (in the process of destruction).
This results in an ssert: "ASSERT failure in QFileDialog: "Called object is
not of the correct type (class destructor may have already run)"",
Fixes: QTBUG-130133
Change-Id: I8471a8434f7ea854a91b989bb3a6f3b962143ea8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 2083daf79bc53a65a821e1cd3463638ac0c65f2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add and use the two helper functions
- buttonFillBrush() returning the correct fill brush for a button
- buttonLabelPen() returning the correct pen for a button
Change-Id: I6ee0dbe2490ad5c875b75d13b48371b5e798c290
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 436abff5cce198bb90c90e92104922373a3f99cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implicit load is an acquire, which isn't necessary in any of these
cases, including the two liens changing the store: they were creating a
temporary QAtomicPointer, which introduced the loadAcquire().
I've left the qCDebug() lines alone.
Pick-to: 6.5
Change-Id: If45e068eaaf3cd4d2c81fffd1459a779b4eb4110
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6806391600b5398d4fdb3c4d2d5e442289522756)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Which also lets it return the acceptance state of the event.
At the moment the acceptance state of QContextMenuEvent is a bit
of a mess, so the QWSI acceptance state can't be trusted, but
this opens up the door to using it at a later point.
Task-number: QTBUG-67331
Change-Id: I75b586f90e25122bc9e25880d3787740b025c892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit bbc3a7d7ba683c71de4662a1eeac0b7d3dfa6b11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If an explicit color space has been set, we assume that we can apply
that to the CAMetalLayer or IOSurface we use when blitting our content.
If not we want to reflect the NSWindow's color space, which will in turn
reflect the NSScreen color space.
Task-number: QTBUG-129499
Change-Id: Idc465af39dafc80be0edd014abc55eb501ae1f89
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a3a691c5a359ad1c3f76248c270273ec13fe96fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When making a QWindow maximized or fullscreen we intersect its final
geometry with that of its UIWindow, as in the case of split-view or
floating windows on iOS the UIWindow size will be smaller than the
corresponding UIScreen.
However, after 76ebf51bc08f6af624a8540e7af88b9129b22ae1 we no longer
track UIWindows via UIScreen, and instead manage them as part of the
UIWindowScene. Unfortunately the default scene that iOS manages is
created and connected after returning from didFinishLaunching, which
means that during main() there is no UIWindow. Attempts at manually
connecting this session before main via activateSceneSessionForRequest
were not successful, as we don't support multiple window scenes (yet).
Intersecting the window geometry to this non-existent window during
setWindowState() would result in an initial 0x0 size for windows.
Which would normally be okey, because once we have a UIWindow we re-
apply the window state, resulting in new QWindow geometry.
However the initial 0x0 size can in some rare scenarios trigger
QWidgets into setting the Qt::WA_OutsideWSRange attribute on the
top level widget, and due to a possible bug in QWidgetWindow, this
attribute is not reset once the QWidgetWindow receives an updated
resize event.
As a workaround for the widget issue, and to restore the semantics
of receiving an initial valid size of the window, we skip the logic
of intersecting the geometry with the UIWindow if we don't have one
yet.
Note the for visionOS and iOS applications running on macOS we
rely solely on the UIWindow for geometry, which means that this
issue still exists in those environments as long as the underlying
widget issue is not fixed.
Fixes: QTBUG-129472
Change-Id: Id81c356446f6e69f8a1eda59272ac04f02cc005f
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit b78baf634c6c2b8165432bf1e22a96abb2016f42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes a problem where tooltips only worked for the first instance
activated.
(cherry picked from commit d69348ed4d659f9408ce74f3b08ee7e9104dde00)
Fixes: QTBUG-129234
Change-Id: I45619b1ca8001b74b148b98a8795000630dcacf7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When setting the timezone explicitly to something different to the
localtime (e.g. UTC), the strings returned for timestamptz columns
contain a '+xx' annotation which resulted in a parser error.
Fixes: QTBUG-129983
Change-Id: I4f5e45860e88a5c44b2f1409dae667984ac90913
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 00edd47762df96614a38f1362c2131e539e43abd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The typical use-case is calling hasNext() first before using next, but
the API docs say that calling next() even when hasNext() is false,
should just return an empty string.
[ChangeLog][QtCore][QDirIterator] Fixed a crash that happened if you
called next() after hasNext() had already returned false. Ideally you
should never call next() without first calling hasNext() as that could
lead to unexpected results (for example, infinite loops).
Fixes: QTBUG-130142
Change-Id: If0a8b1fe7dbd13b45793409a7a241e53c7257f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c7691842f743f568a073582c8f0cacd6ee188f98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends commit 7cf39bd785e8ba817960d48b120983cafcc539f3, which changed to
use QDirListing but used FilesOnly. As documented, that does not include
symlinks to files.
I'm updating a few other uses of FilesOnly where they were ported from
QDir::Files and it would be reasonable to expect that symlink to files
would be included. That's why I've left QNetworkDiskCache alone.
Fixes: QTBUG-130109
Change-Id: I1fa195b42fd5e00be157fffd6c861f6ddb1eeed1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 56fa23911c3a0681de39601489d51805e208dc03)
When making a QWindow maximized or fullscreen we intersect its final
geometry with that of its UIWindow, as in the case of split-view or
floating windows on iOS the UIWindow size will be smaller than the
corresponding UIScreen.
However, after 76ebf51bc08f6af624a8540e7af88b9129b22ae1 we no longer
track UIWindows via UIScreen, and instead manage them as part of the
UIWindowScene. Unfortunately the default scene that iOS manages is
created and connected after returning from didFinishLaunching, which
means that during main() there is no UIWindow. Attempts at manually
connecting this session before main via activateSceneSessionForRequest
were not successful, as we don't support multiple window scenes (yet).
Intersecting the window geometry to this non-existent window during
setWindowState() would result in an initial 0x0 size for windows.
Which would normally be okey, because once we have a UIWindow we re-
apply the window state, resulting in new QWindow geometry.
However the initial 0x0 size can in some rare scenarios trigger
QWidgets into setting the Qt::WA_OutsideWSRange attribute on the
top level widget, and due to a possible bug in QWidgetWindow, this
attribute is not reset once the QWidgetWindow receives an updated
resize event.
As a workaround for the widget issue, and to restore the semantics
of receiving an initial valid size of the window, we skip the logic
of intersecting the geometry with the UIWindow if we don't have one
yet.
Note the for visionOS and iOS applications running on macOS we
rely solely on the UIWindow for geometry, which means that this
issue still exists in those environments as long as the underlying
widget issue is not fixed.
Fixes: QTBUG-129472
Change-Id: Id81c356446f6e69f8a1eda59272ac04f02cc005f
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit b78baf634c6c2b8165432bf1e22a96abb2016f42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If an explicit color space has been set, we assume that we can apply
that to the CAMetalLayer or IOSurface we use when blitting our content.
If not we want to reflect the NSWindow's color space, which will in turn
reflect the NSScreen color space.
Task-number: QTBUG-129499
Change-Id: Idc465af39dafc80be0edd014abc55eb501ae1f89
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a3a691c5a359ad1c3f76248c270273ec13fe96fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Which also lets it return the acceptance state of the event.
At the moment the acceptance state of QContextMenuEvent is a bit
of a mess, so the QWSI acceptance state can't be trusted, but
this opens up the door to using it at a later point.
Task-number: QTBUG-67331
Change-Id: I75b586f90e25122bc9e25880d3787740b025c892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit bbc3a7d7ba683c71de4662a1eeac0b7d3dfa6b11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implicit load is an acquire, which isn't necessary in any of these
cases, including the two liens changing the store: they were creating a
temporary QAtomicPointer, which introduced the loadAcquire().
I've left the qCDebug() lines alone.
Pick-to: 6.5
Change-Id: If45e068eaaf3cd4d2c81fffd1459a779b4eb4110
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6806391600b5398d4fdb3c4d2d5e442289522756)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When setting the timezone explicitly to something different to the
localtime (e.g. UTC), the strings returned for timestamptz columns
contain a '+xx' annotation which resulted in a parser error.
Fixes: QTBUG-129983
Change-Id: I4f5e45860e88a5c44b2f1409dae667984ac90913
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 00edd47762df96614a38f1362c2131e539e43abd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The 'not valid after' date was set to the last day of 9999 which the
date time parser could not handle. Set the expiry year to 2050 and
regenerate keys with length of 3072 bits instead of 2048 bits.
Fixes: QTBUG-129504
Change-Id: Iaede785264c1d31b021ccabc9d1aaf949c8922f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a5364a279e9ed9bc69a13698f9b43dbe36d0a326)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This environment variable might be set by some party (not quite sure
what, maybe the host OS), and when androidtestrunner passes QT_* vars
it might interfere with the input tests.
Change-Id: I2a88c78535d6e3a809e8fcee8f8d752f91044a8c
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 26016bc6d42f050b7095579150eee34bc69343f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Forward QT_* env vars to the test same like QTEST_* vars,
this can be useful when debugging, this would allow us to
pass QT_DEBUG_PLUGINS.
Change-Id: I9404ff7c7276f87e3e7d9cf57fa8f5b1eed02eb7
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 574c966ac8ce0527e14e6cb5dc23a4a411fc8003)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The protocol is documented (in the header) to be used for context menu
placement, but is also used for placement of the Writing Tools dialog.
We don't have a way to request the selection rectangle via our input
method protocol, so for now we have to use some crude heuristics based
on the cursor and anchor rectangle. This quickly falls apart for multi
line selections, but should not be any worse than the behavior we have
today where we effectively report the entire QWindow rect, placing
the Writing Tools popup outside the window. With this patch we at least
place the popup relative to the focus widget.
Change-Id: I28053aab93a42133ae2ccc552fcb4172bf55a634
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit ae788f5508a11c8f3f7e3d89b3536f7ec9786639)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And add a note about the missing logic for when the range is non-zero.
Change-Id: I31e8ab55afa022aa4d72c3f23920b3f5beba9fc6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9f326390d91a7c721770d0f8bf7ed88c7fe72d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The text being inserted is not necessarily an NSString, but can also be
an NSAttributedString, as seen e.g. when Writing Tools inserts a
replacement.
Change-Id: I03585008d105332abd3b470f24305664766213f0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c467edcf0ac8d5aa4c36b2f512e3c762cbd5d373)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The lookup into it is done case-insensitively (because user-supplied
names of zones might not have the right case) but I forgot to make the
sorting of the data table case-insensitive in the aliases. Regenerate
data: only the qtimezone*_data_p.h are changed by the reindexing of
zone aliases.
On picking to 6.8, drop the change to QTZlocale_data_p.h, as that's
not active until 6.9; and back-date the QTZprivate_data_p.h to match
the change on dev four days ago, as that might just reduce the risk of
later conflicts.
Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ff58e09c8d5b3f505d5d3fe9a205e35e96de922d)
Reviewed-by: Mate Barany <mate.barany@qt.io>
They were not showing up because the qdoc branch sees them as private.
Change-Id: I8be18c389288ff9b589267dd17fbc16dcd7998c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5be7b99a160a4cc973fcd82e3ab15e4272814b14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qdarwinpermissionplugin.mm:37:35: error: implicit capture of 'this'
with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
Change-Id: I05afd05f43ddceb88cb5fffd85959b494c29ce6a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0990bd49407aac4f96acf78761af1070ff934215)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Two examples were given, one to show "invalid" usage that would, in
fact, work now - producing a date in 2012 - and the other to show
"correct" code which, while correctly delivering the date in 1912 its
author appears to have meant (albeit, giving a four-digit year would
have made that clearer), uses the string API where code should
normally construct dates - much more efficiently - by just passing the
numbers to suitable constructors.
Add tests verifying that the two date-times from the out-of-date
examples do in fact work, even if you tell them the wrong century as
default for two-digit dates.
Pick-to: 6.7 6.5
Change-Id: I8155af019c80729323ba3958fe3942a72bfefc22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 82d85c16d912b25bfa5b0a081e515fcecda1f975)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's a one-pixel horizontal line between two cells where
indexAt(pos) returns a valid index and visualRect(index) doesn't contain
pos, because of the 1 pixel cell border.
So this code (whose origin predates public git history) would turn the
valid index into the root index, leading to an unexpected append instead
of insert.
The only other case I could find where this condition happened was when
dropping onto the branches of a QTreeView, but even there it seems much
more expected to drop on the item (or between items) than on the viewport
(which often means append at the very bottom, far from the drop area).
Change-Id: Ia7c884d3fc925a7536ea3ab75851366c531d8438
Fixes: QTBUG-130045
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f9336a05bccaf8d287f949e3263e07f2e437835c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the SBOM is not regenerated if the attribution files are
modified.
Task-number: QTBUG-122899
Change-Id: I5b3f62e254aa70021ed06fac73f881bcbb110c31
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e579b2884e68292e535bc773502f68ad083860cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After 4dce218ac400afcb54aa2a85a0b27947fec583cb got merged, we started
considering the INTERFACE_LINK_LIBRARIES property of UNKNOWN_LIBRARY
targets in addition to INTERFACE_LIBRARY targets, when collecting
dependencies for pri file generation.
These can contain genexes like $<LINK_ONLY:...> or
$<TARGET_OBJECTS:...>, which are not supported by file(GENERATE),
or special directory scope tokens like ::@, which are not valid
targets or library names.
One such case was in the downstream vcpkg build of Qt which adds
`$<LINK_ONLY:EXPAT::EXPAT>` to the INTERFACE_LINK_LIBRARIES of the
Fontconfig::Fontconfig target.
We strip or handle these cases for prl file generation as part of
calling __qt_internal_walk_libs.
Change the pri generation to handle them in a similar manner by copying
over the same logic.
Amends 4dce218ac400afcb54aa2a85a0b27947fec583cb
Fixes: QTBUG-129471
Change-Id: Id4a574ee2411f6d64179c419f352168fde1914d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 93df3de1f30b6f65b025b33e9cd73ad479295e59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit updates the images used to illustrate Qt Widgets.
The commit also removes old unused images.
Task-number: QTBUG-69988
Change-Id: I89e363c6c854c36bb0d763532d4cb359bdc85a38
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 10e0ce7f8251fb4449152ba9979076930424d011)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a subclass reimplements dropEvent() to accept a CopyAction, then
don't ignore the event again in the QListView implementation. We only
have to ignore a MoveAction event if the handling so far didn't actually
move the data, so that the QAIV implementation can handle the removal
of the source data if needed.
Complex interaction between QListView and QAbstractItemView,
especially in IconView mode, and sadly not generally unit-testable, like
all drag'n'drop interactions (due to modally blocking QDrag::exec on
most platforms).
Fixes: QTBUG-103898
Change-Id: I032c27e2788ec7e652a830383d8400b06b57d8cb
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 690184cf25902e5351189c37ef823a97aaf8135a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This also deletes the compilation fix patch file,
as this has now been applied upstream:
1c01944e93
[ChangeLog][Third-Party Code] Updated Harfbuzz to 10.0.1.
Fixes: QTBUG-130136
Pick-to: 6.5 5.15 5.15.8
Change-Id: Ie250dcaf95ef83b27ae5a681d4245b8b94ae6594
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit cc8a71e211f981b8170a5d6df05486bdb396be03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The systemTimeZoneId() delegated to systemTimeZone() in a way that
worked - but wasn't easy to follow - in the case where the backend's
systemTimeZoneId() failed but its default constructor succeeds. This
went via the QTimeZone(id) constructor, relying on its handling of
empty id (which gets the system zone, unlike the default constructor
which gets an invalid zone). When it gets an empty id, it falls back
to newBackendTimeZone(), which uses the default constructor of the
backend; and we have (and are even accessing the backend methods via)
a default-constructed backend, so can simply share that with
global_tz. This, if nothing else, saves repeating the systemTimeZone()
look-up for the system ID when delegated to by systemTimeZoneId().
There's a risk that this might miss a change to the system
configuration since the global_tz was initialized, but it's only used
in a fallback and backends tend to cache this information anyway. When
we come to address QTBUG-56899, we can have the refresh function
update the global_tz object.
Change-Id: I8541e74f378e92af5a2a7187a49a9eb14a66c744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2068645f07ab9108fc54fa2c499b1b2661a35bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The drawing for CE_MenuItem had some issues:
- it did not work in rtl mode
- it removed 10px on the right to hide issues with e.g.
sizeFromContents()
- the checkmark was not properly centered because the wrong rect was
used
Fixes: QTBUG-129716
Change-Id: Ibe2e5e66367ac0a803788b74175776d95f489c80
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 30d90b4ccad83ab1f23dab7cd72b7e228c299895)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cleanup of PE_PanelMenu/CE_MenuBarItem/CE_MenuItem:
- don't calc rect if not needed
- remove unused code
- don't set pen which is not used afterwards
Change-Id: I5585a7299317d176d94480905aff0567e8f16444
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 804ec477e5532309e61d616e0ea13412ad410948)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In rtl mode the submenu indicator arrow must point to the left.
Change-Id: If483252e3447c1657291a17e47c2f69de5d61839
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 9f7f7e3708c64ab4c693317b0ee117e272f0f442)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's supposed to indicate a thread never expires, but following
a change where it stores the expiry with chrono we no longer considered
a negative expiry as 'forever', but rather it immediately expires!
More directly it is because we end up calling
QDeadlineTimer::setPreciseRemainingTime(0 secs, X nsecs), and it only
cares about negative seconds to set Forever. There are complications to
consider nsecs for this since several nanoseconds may pass between
initially calling the function and assigning the values...
Amends 1f2a230b898af9da73463bca27b5883d36da7a91.
Fixes: QTBUG-129898
Change-Id: I9626de31810fb2751ff6d83165d7dce5258a9baf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c57027199996d0f0d2ac8ebc4505c78afa54ab5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The device serial number is being appended to the adb command which
is being treated as one single command and not as an argument, so pass
the serial number, if provided as an argument instead.
Change-Id: I5c4a0945aca95e8d31f569b5cf99a85a37d22af2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2584abce70f9e5acd9a3daa5aa4b056be189e703)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
by default qDebug() prints to stderr which means any process expecting
the test output under stdout would not get any output, and in any case,
the test output shouldn't be printed to stderr. This also applies to
verbose commands output.
Change-Id: Ifa77757176060f6452172768f3c7950019863775
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6b66bb9a21c3ed6bf94a9fca6a0dc20a9e64c9ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If doc/global/macros.qdocconf were modified, rerunning the doc
generation targets in qtbase or a top-level build would use the old
non-modified contents, because the file is only copied into the build
dir at configure time, and there is no dependency to rerun configure.
Add all the qtbase doc config files to CMAKE_CONFIGURE_DEPENDS, so
that configure is reran and the files are re-copied if the files are
touched.
Add the QT_NO_SET_QTBASE_DOC_FILE_DEPS_COPYING variable as an opt out,
in case this breaks someone's workflow in an unexpected way where they
have to reconfigure too often.
This is an incremental improvement over no dependencies at all.
Investigating whether setting up fine-grained build-time dependencies
is possible, is left for the future.
Pick-to: 6.5
Change-Id: I8f0702aa789b5116ed63a3a78c5d3b19b2177131
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 9c159e6843eb7364f1e270cf62a6d0f1c86baede)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit updates the screenshots for the Qt Widget examples. It also
removes several unused screenshots and adds several minor edits.
Task-number: QTBUG-69988
Change-Id: I23b90fd6c8b798169d158854609c09ef3f1c1a20
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 618b1faf37ddda4cdeff6934f5af7e699c9aad63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The default windows theme does return the same color for enabled and
disabled groupboxes. This patch changes the color to
pal.color(QPalette::Disabled, QPalette::ButtonText) in case
GetThemeColor returns the same color for GBS_NORMAL and GBS_DISABLED
Fixes: QTBUG-129979
Change-Id: I4557040017354323593449df596b8e56784c07e0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit b3971d29c0291b9f69b12000c9158af5e0fb3edf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The base-class abbreviation() falls back to its displayName() which
starts by asking for data() for the relevant time. Unfortunately the
backend's data() was delegating (if ICU version is too old, or the
transition lookup failed) to abbreviation for one field of that. So
short-cut out to how the backend's displayName() gets abbreviations
(and how the look-up of transitions finds their abbreviations).
Task-number: QTBUG-129896
Change-Id: I10f15ad822d53b8292774d7093a531df694bb77b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f38c0fd3fbdd96a2f91bf2890ebe9888fe1ad04c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The definition of QtTimeZoneLocale::ucalTimeZoneDisplayName() said it
takes a QByteArray but the header-file's declaration said it takes a
QString. That was never going to end well.
Fixes: QTBUG-129896
Change-Id: I5c15f88370f2d15efe2055ff73388c22fdc4ef46
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 01219276fdd3c1b6c867e97f6b8337f46ac82e28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In tst_qlocale.cpp there was a #include that caused the static data
tables to be duplicated, violating ODR. All it actually needed was the
ability to iterate all rows of the locale_data[] table, so export a
method to do that from QLocaleData and have the test run that instead
of pulling in a second copy of the tables.
Conflict resolution at 6.8 needed the declaration of locale_data_size
moved up qlocale.cpp, which happened after 6.8 as part of other work
that isn't included in 6.8.
Pick-to: 6.5 6.2
Task-number: QTBUG-128930
Change-Id: Ie5ebdf508a622eeca93f8785bc09b086502aa0e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 96c07655c46afdd3e2da7ef7d339b518d36c83c5)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Windows 11 24H2 has been publicly released already, which can be
downloaded directly from Microsoft's official website [1].
[1] https://www.microsoft.com/en-us/software-download/windows11
Change-Id: I0394e8413c07ec902cadd43bd2fac8a3d4c42c7b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c846db292de94dda9dc58bf5e7697c75a0b0769f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This enables applications to retranslate or otherwise update their UI
when the Android system locale/language settings are changed during
their runtime.
Change-Id: Id482ca146080d9f3e74990f64e686f6b3504887c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 83483b8b200ab5cedf659f418c7296719902ddc4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A recent bugfix introduced a shortcut in text layouting, skipping all
layout when the cliprect parameter is empty, since all will be clipped
away anyway. However, the case when the DontClip flag is set was
overlooked. This commit rectifies that.
This commit modifies c7df8dda8b60b4e4e7b1859f462d65cef5d8c85b
Fixes: QTBUG-129914
Change-Id: Ief44acdd08e5e5f5491241362aacfcd2083f011d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit b587e7143d7f1eeb6686b52727fbb9d7db6a820c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 051f68c2d3a069543dce4d560facff6aa22284bd (Qt 5.2) made it empty
by moving the content to QBenchmarkPerfEventsMeasurer::start().
Change-Id: I65f48d72a9d079f0aee5fffd6abeae9cf7fcdcf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d44b3ad1c8f1e6615e47c4d62b236c57f051b709)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no need for it to be a global variable. It needed to be global
because we configured the event globally before start(), but in commit
4731baf6d3a18857e86cc16de000bc42e84bf6de (6.5.0) we instead introduced
the Q_GLOBAL_STATIC with a QList containing the globally-configured
events.
This is using designated initializers despite their being a C++20
feature, because GCC and Clang have supported them as an extension to C+
+ for a long time. This file has needed that extension since that commit
anyway.
Change-Id: I1c9080d23df9f7ba3cbafffd7eae7bd57cd69b67
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 31b4150dc3a789ffaf3f660151971127ac86510d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
zoom-original can be mapped to "Zoom" (0xe71e) icon as can be seen here: https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
Pick-to: 6.7 6.5
Change-Id: Ia13776d2f6007dada51bb06d2a5472cc9cdbb370
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ab6f11600974c803d807f2550d6dd7723749f75f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename the function argument from size (which is also a data member of
the class) to sz, a common abbreviation in Qt.
The code predates the start of the public history, but
eaa7528baa2e40aea35c9fac9cd8f632fa251ff8 made create() an inline
function. Hopefully -Wshadow doesn't apply to mere argument
declarations, so not picking further than said commit.
Pick-to: 6.7
Task-number: QTBUG-126219
Change-Id: I637d731ba33247b7223b5d796bc170c0b87edcad
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 724a3cab887e4dcc455389e929ac2b97ebedb94a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... pinning the vtables to a single TU each, instead of duplicating
them for every user.
Task-number: QTBUG-45582
Change-Id: I3b7bce14567dc8be89795a48f6871eb24fe908aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2e2f5093912faf612f0be72289180b167d6326a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The name `prefix` is also used for a data member, and the very next
rule actually assigns to it, so using the same name in this huge
switch is actually impairing readability.
Fix by abbreviating the local variable.
This code predates the start of the public history.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: Iece828a9303b5449397ac93e51f540bf890f7d08
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2fda30053dcf13356d72f9a8116413d26bcb14a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
ICU unfortunately requires converter names to be passed as
NUL-terminated C strings. This means that the names that come in via
QAnyStringView have to be encoding-converted (assuming US-ASCII,
ie. Latin-1), and NUL-terminated.
The old code used the convenient toString().toLatin1() methods for
this. This, however, transforms L1 and U8 inputs twice: first to
UTF-16, then to L1. It also always allocates memory.
To fix, first change the temporary string container to std::string
(which has an SSO buffer into which most common charset names will
fit, avoiding memory allocation) and then skip the conversion to
UTF-16, going directly from the source encoding to L1, treating UTF-8
as L1 (because US-ASCII is a common subset of both).
Unfortunately, our L1-to-U16 converter doesn't allow to select a
replacement character other than '?' for out-of-range input
characters, but valid charset names should not contain question marks,
so here's to hoping that ICU doesn't strip them willy-nilly, causing
False Positive matches. The old code had the same problem.
Amends f6c11ac4f20a16d0b2113014e2dac63b95d946ae.
Conflict resolution for 6.8:
- ported from q20::cmp_less_equal to regular operator<
Fixes: QTBUG-126109
Change-Id: If1dd494cf4ee8e2d304a0648c22dc8806718f104
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 62108a08c12abfc1421c283cf34e75ffeded2c12)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When the font database is invalidated, we need to release all
references to populated fonts and clear the lists, so that they
can be repopulated from scratch. This was not really measurable
as long as the contents of the database did not change, but it
was a possible source of errors.
Task-number: QTBUG-129849
Change-Id: Ic7ed4abcb13f13332e8edb77e2039f08da9660fd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ea099b67943634a06bce642e13062f84de7e3be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In ec38f0002de74f343e808c2f5d6363003f5264e8, we introduced a guard
for automatically releasing references to DirectWrite types to plug
a small leak. Unfortunately, this change removed a call to Release()
without putting the pointer inside a guard, hence it introduced
another leak. This was noticeable if the font database was invalidated
and repopulated multiple times.
[ChangeLog][Windows] Fixed a memory leak when repopulating the
DirectWrite font database.
Task-number: QTBUG-129849
Change-Id: I59e3132b6836501b7756679ffac82fb65e3027cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 247cd80abdd5fc0bc6243581e506354a5509518e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The DirectWrite engine had hardcoded a default font instead of checking
the system settings for this.
Usually this will not matter, since the theme will call
QWindowsFontDatabase::systemDefaultFont() to get the default, but when
this code path is disabled by setting
QGuiApplication::desktopSettingsAware to false, the defaultFont()
function is called. With DirectWrite we would always return a Segoe UI
font of size 16 in this case.
The other databases respect the system settings for the default font,
even when desktopSettingsAware is set to false, so this is the expected
behavior. It is also what the GDI font database does, so this change
will appear as a regression for users upgrading.
[ChangeLog][Windows] Fixed a regression where the default font on
Windows would be larger than before if desktopSettingsAware had been set
to false.
Fixes: QTBUG-129832
Change-Id: I959e7a52680678a6ab767b49ee643fade5e7209a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b09fb51e7bb576137f92d4697f9f812f3dcb2b7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt has had a qHash() overload for (also scoped) enums since Qt 6.5
(fb4bc5fa262336504e0f28603658bb2572796ce5). Since the hashed type is
internal to the qicc.cpp TU, it doesn't matter whether we change the
result of the hash calculation (but this author assumes we don't).
Pick-to: 6.5
Change-Id: I58238cc13113157438be0951c471f654a838b608
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
(cherry picked from commit 4f5b48d4c69527e5f2450694219432e84b2af6df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can not use the same blend routines for ARGB32 as we use for
ARGB32PM. It needs to blend transparent colors differently.
Pick-to: 6.5
Fixes: QTBUG-91262
Change-Id: I6b75fa8096b92452655dcad94478ae2a74415939
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit bb854606ec8f95787dfd2a4d1b6bcaddbcf4d042)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a process is being debugged from within Qt Creator, the Qt Core
lldb helper script should not try to load the lldb bridges from each
Qt Creator installation that has been found, because the main
Creator's lldbbridge.py was already loaded, and trying to do it
again would just return early.
In some cases that could even silently break the dumper helpers if a
bridge of an older Creator is loaded, because of the side-effects of
importing lldbbridge.py.
Detect that lldb was launched by Qt Creator via either the
QTC_DEBUGGER_PROCESS or the QT_CREATOR_LLDB_PROCESS variables being
set.
The former is set by Qt Creator 14 and earlier, the latter is newly
introduced in Creator 15.
Add an opt in to force trying to load the bridge if the
QT_FORCE_LOAD_LLDB_SUMMARY_PROVIDER environment variable is set.
Fixes: QTCREATORBUG-31769
Change-Id: Id59ed71f1e59c6c430bc0c72eb30a075db5fa603
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0806aee2bb355e54abcabe87a5fd97504f692ba9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So that it's easier to troubleshoot why a certain bridge might not be
loaded.
To enable verbose debug messages, set the
QT_LLDB_SUMMARY_PROVIDER_DEBUG environment variable to 1 when
launching Qt Creator or lldb.
The informational message to set the env var is also shown if no
bridge was loaded successfully.
Task-number: QTCREATORBUG-31769
Change-Id: I53e7b26950fdd635e51d0458cb5fb90600b158a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 8b01ea5261fdb97c949dc4b3d9a4ea902858bd08)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add test coverage for the bug reported in QTBUG-124898 with
QEXPECT_FAIL to document the failure in our truncation logic in
QTranslator.
The attempted fix in 9a11273b745a30cebb5cd648c89eb224e9704492 then
introduced QTBUG-129434, as we ignored the order of languages reported
by the system locale. Add a test case for that, and use a QSystemLocale
subclass inspired by the QLocale unit test to override the system locale
with a specific one that supports multiple languages for this test.
Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: Iaae80d29e267fd3a2d14df0e73db27ba4c58b31a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 1f2ab46745af12e4776695c1b1a2523ac170368e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Especially for the system locale, the list of UI languages might span
multiple languages, rather than just different variations of the same
language. That was not clear, and not covered by the test cases.
Test case augmentation in a follow up commit.
Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: I39dd7b35778a9ffe0bdce86b2f4c474f275f61b0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8230c7d7af684aa8640c5566f0b19c3dd48c1ef0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add categorized logging to QTranslator to trace what QTranslator tries
to load based on the requested locale and the files present in the
search path.
Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: I32425e72623356820fa9b928418f52fac23fafa9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6a785ce90c1c31e1201c608511a6dc625623ccd9)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Make clear that QTimeZone::displayName() may return an empty string
and that Q(Date)?Time::toString() may consequently skip a zone text.
In the process, fix a typo in the QTime::toString() docs and add the
zone-naming formats to the mention of when applying
QLocale::toString() to the Q(Date)?Time may be preferred, moving the
earlier discussion of AM/PM that it joins to sit just after the table.
Pick-to: 6.5
Change-Id: I313b8b1b452078421252a05aa599bc5f91d43105
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5d18017213c110d5a99abeaf53cc4d29a6bfb660)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Update to reflect changes in reality now that I can more faithfully
describe what's happening (thanks to lessons learned during L10n of
display names, though that work isn't in 6.8).
Pick-to: 6.5
Change-Id: I248c924af598c8e8d6cd84675ac04e1733927355
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 1dd785d10d69b0705f86e1580c058d8cd017798b)
Instead of converting the QStringView into a L1 string (allocating
memory), duplicate the matching code for char and char16_t.
Fixes a ### comment from the time we converted lookup to
QAnyStringView.
Amends b3edce58e5aea76d1d84c868f76171c2b40520a4.
Task-number: QTBUG-126109
Change-Id: I5ae6eb452e68af19b495b3790fe79ee583968d72
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c095f7fbf820ac944c5d3096f48dd18752a218b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After changes in f4050cc5ea7490ba3b8b2bb0a174559d7e72a27e commit, the
keyboard can be opened only when internal m_currentEditText is set (what
is happening only on touch). Because of that, the keyboard cannot be
opened just by setting focus on an item like it was before.
To allow open the keyboard not only after touch, QtWindow needs to be
informed about each focus change.
Fixes: QTBUG-124360
Change-Id: Ic3ca4451f53df55bfb1f3e300078fd1916e77155
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2971dbfe062de6b0be3ed9f251f9506bd45d5854)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure that the Layout parameters are applied to the editText
before opening the Popup (in openContextMenu method).
Without them, it may cause incorrect behavior.
Especially in the case of the error:
"E BufferLayer: dimension too large 212x9957
E SurfaceFlinger: createBufferLayer() failed (Invalid argument)
E SurfaceComposerClinet: SurfaceComposerClien::createSurface error
Invalid argument"
It may cause crash.
Fixes: QTBUG-129770
Change-Id: Ib9ef4b5b77fb1faf196e56431976c2a0e6e4a1e2
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0d4778497ee13f93ecaff9036ee7f5f6d24bb2a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The caps for visionOS are the same as for macOS, so just set the
same for both, including support for multiview.
Task-number: QTBUG-126294
Change-Id: Ie3a551f134d8a8a39d63801bc7fd8dcca1e715c9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 2c2d36fae186a308f4bf2aa799551b74eb24eacb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We never copied the error string so after the call to 'clear' it went
away completely. Additionally, stop clearing the error string in clear()
since we reset it when the encoding is set, in case the object is
reused.
Pick-to: 6.5
Fixes: QTBUG-129697
Change-Id: Ia64e1d13a99b62760f61cac6b67ae3cff5e2c9da
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit f84c83be52462536ce5ae5ba68205e7061369fe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently the commandline and environment parameters (windows:darkmode)
for setting the darkmode handling are ignored when the application
starts. This patch adds a condition to
QWindowsTheme::effectiveColorScheme that checks whether darkmode
handling was explicitly overridden and initializes in the constructor
the m_colorScheme with the result of passing Qt::ColorScheme::Unknown
toeffectiveColorScheme.
Fixes: QTBUG-127135
Change-Id: I365d26c66fdb3a754832cb7c579aeebecab093fd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2ced94b4100c03c5feb7d5b1c0006c9fc451e944)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The background for menu items is not drawn and can lead to a transparent
background when switching from QWindows11Style to QWindowVistaStyle at
runtime. This patch fills the background of menu items with
MENU_POPUPBACKGROUND.
Fixes: QTBUG-125474
Change-Id: I246db15ec821f9bc46ba410293c41b7e24548716
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 3de6d6fd348668ff5179504e950ce20b15075391)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Solaris requires the ssp library to be linked when
-fstack-protector-strong is passed to the compiler.
Fixes: QTBUG-129085
Change-Id: I55396fd9dc102ffd98bef54fc3dfc1aadf18a404
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 73875b8bb5faf9f6ec1064704efaae76e33b0e35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I'm surprised that this passed the CI on Windows, because
Q_AUTOTEST_EXPORT is Q_DECL_EXPORT, which is __declspec(dllexport) and
all dllexport'ed functions must be defined in the current DLL, not
imported from elsewhere. This is similar on Unix systems with the
no_direct_extern_access mode, because then Q_DECL_EXPORT behaves like on
Windows.
That means Qt modules can't call a Q_AUTOTEST_EXPORT function
from another module (only tests can). Solve this by providing a function
that is properly exported with Q_CORE_EXPORT.
Amends commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32.
Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: I2ba317ab34bda8c18954fffd28395f7354cb54f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbe61def33a2708e35e5e6a796e88976b04941f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There is no reason to limit the usage of the windows 11 style to win11
or above - it works perfectly on windows 10 when using the correct font.
Change-Id: I179d2c017cdad130a134f45c2f0dfadc052a39f0
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c9306baa825c4070e37aa46aff00aa1905bf1681)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need to put metatypes in the correct place; this is especially vital
starting with Qt 6.9, given that we need it to query it to figure out
whether we have a 64bit value or not.
As a drive-by, replace some ugly casting when constructing the meta-type
array with a call to QMetaType::iface.
Change-Id: I4b1f42f974e9f7a21f6aa4c87c3f8919f6965d6e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d392d3b22c94f86fea50f26284bc9ac8b35f6851)
StringBuilder has deprecated support for char[], using wide string will
also avoid run-time unicode conversions.
Change-Id: Iff865463fb255acfa55224393807ece9ecb818b4
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
(cherry picked from commit d86224250322550169dd72bb04987a73aca74e69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This stops confusing the 'reuse' tool when trying to generate a source
SBOM. The tool considers all files in the source dir as source files,
and because we placed the build dir inside the source dir, all build
files were considered source files. This caused errors saying the
files don't have copyright headers.
Change the build directory for cross-compilation jobs to be outside of
the source directory, similar how we do it for the native builds.
Augments ae62d908a5945900b11451d694e0c784e635b987
Task-number: QTBUG-82820
Task-number: QTBUG-96513
Task-number: QTBUG-122899
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: Ie82a6c55aa5326f7e9cc5c0e09342f3405e78d17
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit fc08a07a0035b3398cf009fef1ab4956ab4b60ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't build a host Qt during a cross-compilation build for a few
years now. Instead we reuse the prebuilt host from the platform
dependencies. This was left over to allow gradual porting to the new
way of using platform dependencies, which is now long done.
Remove the code to ease maintenance.
Amends 684fea131433dcbb6d24feaf261404d1d9cf69b4
Change-Id: I9988da6f33f9d9b98d304316317d39c3dfb7c633
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bb3ce6989eb90c0a8142c158a05eb237dfa8f032)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The property observer reference used during binding evaluation can
become invalidated as the container used to maintain the
the observer would invalidate the existing observers during its
resize, leading to referring to invalid memory.
Recognize that we do not need to store the observer, but only its
binding - the observer itself is not used later.
Therefore, change the PendingBindingObserverList to become a list of
QPropertyBindingPrivatePtr to avoid the issue.
Fixes: QTBUG-127596
Original-patch-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Pick-to: 6.5 6.2
Change-Id: I8c97721ca563083d6280194175f8a915dac2ff04
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 275202215376238bf414d5008d3c727085e58a4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When dropping at a column > 0, the deserialized data wrapped around,
leading to multiple rows being inserted instead of just one (and
column 0 remained empty). Very weird behavior from the user's point of
view.
Drive-by whitespace changes due to clang-format.
Fixes: QTBUG-1387
Change-Id: I8d1dc14c124e468454e98ea6a14f33e3bef6e41a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff8068deb45e45eb683745486956d3c6c795a708)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a native/foreign window is used as a parent, its WS_CLIPSCHILDREN
style should be enabled. If it is not, the parent will paint on top of
the children and cause flickering. It is not Qt's responsiblity to
adjust the styles of foreign windows, so instead we document this in the
manual test.
Change-Id: I84bc25668d702c3475dfbd75a94dd3ed43a1695c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a645128c296756ea6c7e70259958a0d000d029e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the stamp files of 'configure' step to ensure that we re-run
cmake for android ABI projects, otherwise the per-ABI projects do not
consider the changes in CMake files when re-running the build.
Task-number: QTBUG-129358
Change-Id: I5b5c682358052044a9e550587ed0457694857e09
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 87930bb568018cc40ccd30babb42c8701e1d030c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the selection behavior is SelectRows, we're dragging full rows,
so it was very weird that the drop indicator was showing a single
column. Instead, expand the drop indicator over all columns.
This is typically for QTreeView but it also works for a QTableView where
a single row represents a single underlying object (otherwise, why use
SelectRows?).
Since we're testing the selection behavior of the drop side, not
the drag side, only do this when inserting rows, or (for OnItem) when
they're the same widget.
There's a use case for dropping single properties (from a different widget)
onto specific columns of full-row objects (there's also a use case for
overwriting the whole object but we can't know which one it will be...).
Fixes: QTBUG-1656
Change-Id: Idde0f4f8592970339f19dcc11ba667cf12677438
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a818326985295ba1cf1b31043b24e9f089b1d834)
Changing color themes did not work since the results from
qt_fusionPalette is cached by default.
The solution is to track changes and call qt_fusionPalette
when necessary.
Fixes: QTBUG-129399
Change-Id: I77824098349be5e5264fa9e230a949e3ccd6f14f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ff645479e7489de5a88c71c0215748d84be3de9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Similar to other Android file engine handlers.
Change-Id: I63591e09312e439eee1e7bdd71a65d3df4cefbae
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit cd5d30fa3368ab9cf995ed934ea737f3e569e9ce)
When drawing the chunks for the progress bar, we now have to pass at
least the State_Horizontal bit because the orientation member of
QStyleOptionProgressBar was replaced with this state bit.
Pick-to: 6.7 6.5
Fixes: QTBUG-129386
Change-Id: Ibc8b6b315609cdd1a6f949ae2116728b7c6bded8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d399bdddc6e71617e045fc77e70abef3ed2ee006)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Even though we set foo_ROOT in the provisioning scripts and CMake is
picking it up as the base dir, we should also use it as CMake variable
so we can look in other directories below foo_ROOT.
Change-Id: I193d8ff1c216a669162569d71891c3eb7b9b030f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c68277c41b99d6791e3c1a5998b70c6cbbf6dc15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QButtonGroup::addButton() automatically assigns a negative id when no id
is given. This logic did not work out when a button with a positive id
was added beforehand.
Add a check to make sure to always return an auto-assigned negative id.
Pick-to: 6.7 6.5
Fixes: QTBUG-129398
Change-Id: Ieadfa44c4b145184a5473713591f4c111a5dafa4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 772d374ce715de9caaae4f026594d49f6da28dec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the user calls setPath() or refresh(), we are going to stat the
storage again. But neither retrieveVolumeInfo() nor initRootPath() unset
the flag if the storage became invalid.
This can't be tested automatically.
Fixes: QTBUG-129689
Pick-to: 6.5 6.2 5.15
Change-Id: I8d4c5b4ed563e89f5723fffd2f550b169bb20884
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit e55d7fa1e09efc86e797efdf00656891f640d81d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cleanup CC_Scrollbar:
- call subControlRect() only when it's really needed
- use QStringLiteral to create static strings
- calc rects only when really needed and then directly in one step
Change-Id: Ibe7944feb813ef3e7f6aea976579d192bafbcce9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ffa0e9c19c3cdf3b299357dd263e7413010a62a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cleanup CC_SpinBox a little bit
- avoid unneeded QPainter::translate()
- avoid uneeded QPainter::save/restore()
- don't modify frameRect when not needed
- merge up and down drawing to avoid code duplication
- use QStringLiteral to create a static string
Change-Id: Id8bc8d5085b6681b48ea3388941d21a11c0345ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5cd4434389870d43baa1325ba97c5776baff65f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The only place where we call qRandomCpu() in qrandom.cpp is guarded by a
check using qCpuHasFeature():
if (qHasHwrng() && (uint(qt_randomdevice_control.loadAcquire()) & SkipHWRNG) == 0)
filled += qRandomCpu(buffer, count);
static inline bool qHasHwrng()
{
return qCpuHasFeature(RDRND);
}
Since qCpuHasFeature() also checks if __RDRND__ was defined, we ignore
the result of checkRdrndWorks().
Users of CPUs without RNG must compile with an -march= flag that doesn't
enable it or must pass -mno-rdrnd to keep the runtime detection code.
Task-number: QTBUG-69423
Task-number: QTBUG-129193
Change-Id: Ib7819f80041fe330d033fffda7e7c160141d7dd8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6543f50536f3547b43a27b32af59d68f28a60247)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If you right-click to open a context menu, followed by another
click to close it again, without moving the mouse, it can
happen that the menu item under the mouse will trigger.
This is especially prone to happen if Qt has a large scale
factor and the number of menu items is high, since then the
menu has to move a bit up to make room for as menu items as
possible on the screen.
This patch will reuse the already existing hasMouseMoved()
function to avoid triggering a menu item if the mouse hasn't
moved. This will make sure that the user won't trigger a menu
item by accident when instead trying to close it.
Fixes: QTBUG-128359
Pick-to: 6.7 6.5 6.2
Change-Id: Ie4d73ee2031d1159dd6c003124869004b4928d18
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit dc1d3abd7e852829b9bc81c1ba9565f40147402d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A view cannot have two parents. If the view already has a parent, you
must first call removeView() on the child's parent.
Fixes: QTBUG-129524
Pick-to: 6.7
Change-Id: I6a8340ed8db58a77626be17366d5c71bdfc8c762
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ecd4623f05abf419db6f0c3bdad406c1883b6509)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some reason the suppression stopped working for me, but using the
viewAt function is better in general as it doesn't depend on null
termination.
Amends da84941375d8301d9f22df1fa3753571de005c64 (viewAt() was added by
2c2c6de85ae41d09063f3c68a42522e3d74ad8fa for 6.3, so we can use it in
all affected branches).
Pick-to: 6.7 6.5
Change-Id: Ic71bd559929a2cd0cdea4ed1cc1edcfc583865ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cec64aaf2a8e110421d61478b9ad0cb177ee0d1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Actual dependency chain doesn't consider the changes in Android
ABI-specific targets. To make sure we rebuild per-ABI targets this
changes the dependency chain, which looks as following now:
- <target>_make_<apk|aar|aab>
- <target>_copy_apk_dependencies (new proxy order-only target)
- qt_internal_android_<abi>_<target>_copy_apk_dependencies
- qt_internal_android_<abi>_<target>_copy_apk_dependencies_stamp
- qt_internal_android_<abi>_<target>_build_stamp
- <target>
So the <target> dependency on the per-ABI build targets is reversed,
to guarantee that per-ABI targets react on source changes.
Fixes: QTBUG-129358
Change-Id: Id4d5fb0d45a213cd49c8a6aefa72c5db6609d714
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
(cherry picked from commit 44149f9d8b62b5343a5d06628b0c9588f035ccc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Platforminputcontext is needed for Qt Virtual Keyboard to work thus it
needs to be enabled without to condition to PPS. PPS is removed in
QNX 8.0 and the condition would never be met. It is safe to enable
platforminputcontext without condition for QNX 7.x as well since it is
needed for Qt VKB anyways.
Fixes: QTBUG-129436
Change-Id: I82230d1411e54713a2dabadf5a8dff3ca5455fbb
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 4d908a3b5e305462bf7e234db0fe1e42e866e8ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When calling QWidgetWindowPrivate::setFocusToTarget with Prev or Next
target parameter, we were just setting focus to the
next/prevInFocusChain() of the window's focusWidget(). This will bypass
focus proxies and focus policies of the widget, which is wrong as it
can end up giving eg: tab focus to a widget that does not have such
focus policy.
To fix, we should instead call QWidget::focusNextPrevChild which
determines the right next/prev in the TAB focus chain. As this is a
protected member of QWidget, implement a "wrapper" for it in
QWidgetWindow which is a friend class of QWidget.
Task-number: QTBUG-121789
Change-Id: I1f4f5d85e7552926580906fdef6f0a456fe7486c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
(cherry picked from commit 926d3287aba9fe2b67c25d0c0c5b606f3f41803e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously the screen create event was only handled for window.
With QNX 8.0 there seems to be also screen create events for display
and device. The property query returns ENOTSUP (Not supported) so we
simply ignore other than window create event.
Fixes: QTBUG-129213
Change-Id: Ia7da693f06f6590d349595ecde6b303fab145bc0
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 11d5792774e921a7d6e296b1238f9e9c96ddfd96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
on Ubuntu 24.04 GNOME Wayland
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-129361
Change-Id: I5291439dd9e1ba78cf403a0272ecbd8c83d2f94f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 649794fddf9c1d1c96b271de3b29b3b67593dff6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This depends on 9eb06a2848257d054447777c645231afa87429c2 .
This follows bc7821764b4d50fbb4e0ca1b84f85980ce15eeb0 and
5709baea2c261f77f955ab76c074a39c9c3993aa.
There are lots of work to remove QApplicationPrivate::setActiveWindow()
in test code, see also QTBUG-121488. We need to adapt them for Wayland.
Task-number: QTBUG-125446
Task-number: QTBUG-121488
Change-Id: I093568c1d89de31c3893d3c7b139f1db33579633
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit f42979cf6937c78c412fcfa25ec011fb66b48132)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QListView::styleOptionViewItem()
* tst_QTreeView::styleOptionViewItem()
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-127920
Change-Id: I4136a97441870a769814a483c0f91aeacd830651
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5d71f4680df30674b8615b9b9a6b418f0a1c0864)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit b71be292780b858f2c55ce92601452e2ea946de2, which causes a regression when using mouse wheel and moving cursor together
on scroll bar for some qt applications, like qutebrowser and
qbittorrent.
Fixes: QTBUG-129509
Fixes: QTBUG-129514
Task-number: QTBUG-110841
Pick-to: 6.8.0 6.7 6.5 6.2 5.15
Change-Id: I703158874413a1306ea99217bced4ba38382f543
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5875da6d70303468eab85030a80f54c268f80b79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I don't know why systemd-resolved did have those for me, but it did, so
QtTest complains.
QWARN : tst_QDnsLookup::setNameserver() Duplicate data tag "..." - please rename.
Change-Id: I8df70eb429682b529ecefffd0aca735f94d77225
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1420ee85165c03bac2aa1678b295f7b1ebe44f51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For people running this test who are burdened with a broken DNS server
and for whom the check added in the previous commit fails, skipping the
test.
Incidentally, this is useful for developing QDnsLookup itself, because
some otherwise-reasonable servers are known to fail for some queries.
For example, dnsmasq doesn't like queries of type ANY:
SKIP : tst_QDnsLookup::lookup(any-a-single) Server refused or was unable to answer query; a-single type ANY: Server failure
SKIP : tst_QDnsLookup::lookup(any-a-plus-aaaa) Server refused or was unable to answer query; a-plus-aaaa type ANY: Server failure
SKIP : tst_QDnsLookup::lookup(any-multi) Server refused or was unable to answer query; multi type ANY: Server failure
Now I can get it to pass with QTEST_DNS_SERVER='[2001:4860:4860::8888]':
PASS : tst_QDnsLookup::lookup(any-a-single)
PASS : tst_QDnsLookup::lookup(any-a-plus-aaaa)
PASS : tst_QDnsLookup::lookup(any-multi)
Note for the future: setting a non-default server may exercise different
code paths inside QDnsLookup, so this is not a replacement for having
proper DNS servers in the CI.
Fixes: QTBUG-129335
Change-Id: I81dcd4834972efa84c9ffffdd8aaafb68f20560b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 10fea78bdcad2086c980fa1c1bbcd5bb543e4366)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of failing tst_QDnsLookup and blaming the class for problems,
let's first verify that the resolver can resolve an address. If it can't
and we're not in the CI, then just skip the test.
I chose "a-multi" because a) it required the least variability in the
command-line and b) it has more than one RR in the RR set so it may find
more problems than "a-single".
Output when I forced a domain that doesn't exist:
QWARN : tst_QDnsLookup::initTestCase() Default DNS server in this
system cannot correctly resolve "a-multix.test.qt-project.org"
QWARN : tst_QDnsLookup::initTestCase() Please check if you are
connected to the Internet.
QDEBUG : tst_QDnsLookup::initTestCase() Output was:
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find a-multix.test.qt-project.org: NXDOMAIN
SKIP : tst_QDnsLookup::initTestCase() DNS server does not appear to
work
Task-number: QTBUG-129335
Change-Id: Id2dcc2ce7cfdd83c556ffffddb88a1f1b4339606
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 40986460e3f372cdb42ad80377455dc43b7cdb42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It must for QHostInfo, but DNS servers are not required to have that
label. It appears to be a good practice the majority of admins follow,
but it's not universal, so we cannot require it.
But if it does resolve, then RFC 2606 requires it resolve to 127.0.0.1.
Task-number: QTBUG-129335
Change-Id: Ib3b11de6616665658a20fffd754f2fbd78780b1c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 252bd7c67ce7a0ed3c41059f551f87f0f77b5606)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends commit 46f407126ef3e94d59254012cdc34d6a4ad2faf2 ("MetaObject:
store the QMetaType of the properties"), from 6.0 cycle, which made
QMetaProperty::{read,write}() use the actual enum type in the
QVariant. But it missed the case where the input QVariant contained a
string with the enum's values.
Note this is *not* a type-punning in all cases: if the type of the
property was marked as a Q_FLAG, moc generates code to access it as
int. That is fixed in the next commit.
Drive-by compare QMetaTypes instead of their IDs, which avoids
generating a call to register them.
Pick-to: 6.5
See-also: https://lists.qt-project.org/pipermail/development/2024-September/045636.html
Change-Id: I1cfce869090c96bb41b6fffdc20855cfa7cb2a18
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1f9ab3767ed625a090af45f26dffd10dcd05eef5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUniqueHandle allows us to write RAII types for non-trivial classes. We
can add some specialisations for 2 types of win32 handles, file
descriptors and FILE*
Change-Id: I4d6af274bcc7f84ae009d0cb3a2f3aec1b6bcaf9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0563862e23eda4a7b8def8c8afacf732b9a992ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both APFS and HFS+ can be both case-sensitive and case-insensitive
(the default), and the mounted file system may be any other file
system than these two as well, so hard-coding to case-sensitive
is not sufficient.
Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: Ibdb902df3f169b016a519f67ad5a79e6afb6aae3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When calling setParent for a top-level widget that used RHI it's
not enough to check if the widget's parent used RHI, as that's
always going to be false.
Missing this results in not sending textureChildren events for the
reparented widget.
Amends eb4cb719257d3b57cd801273d4011579d8c81714
Fixes: QTBUG-129299
Pick-to: 6.8.0
Change-Id: I632d8d63ec56243cd6da2b196ad9651c28128f0b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0704eff5617a100634c58177c83ed0d90b6f5525)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To enable adding and managing multiple QtQuickViews,
QtServiceEmbeddedDelegate now hosts a set of QtViews instead of a
single one.
To avoid crashing if the QML view has a TextField, do not allow
QtWindow to create a QtEditText if the service usecase is detected.
Fixes: QTBUG-129412
Task-number: QTBUG-127422
Task-number: QTBUG-128563
Change-Id: I70784657ed6cb2aa853160605f4663e517f0e6db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1656a2f58c759c25e6a89435a65c1d0fceba8a09)
This patch makes it possible to have multiple QtViews
in an Android app, provided they are in the same Context.
Task-number: QTBUG-127422
Task-number: QTBUG-124116
Change-Id: I3d5bef3f789f23c8495c3b7209bbd3e430d439ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0af53d3e87464a0638e4fdb8b68287912281a2a6)
Returning an enum instead of a boolean lets us discern between
differences such as libraries have been loaded successfully, or
they have already been loaded successfully in a previous call.
Later, we could add more values to discern between the different
error cases, instead of relying on logging.
Task-number: QTBUG-127422
Task-number: QTBUG-124114
Change-Id: I66bd95e66772db8b6f940b30a7b121b35ff4390a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1afb82c41c54d6bbe3cd09cffc679fbfa86f75d3)
To avoid calling functions in QAndroidPlatformWindow during/after
destruction of the object, create a mutex and use lock_guard to
synchronize the destruction of the object and native function calls
originating from Android events.
Task-number: QTBUG-118231
Change-Id: I29818386456c6969ca507d74574b722bf8a19019
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0f20feea2112c2391e274dc4e81aa38a738b7023)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clean up any resources using the Android Surface when it
has been destroyed. Previously the resource clean up was done
only after Qt app state changed to Hidden or below and we initiate
the removal of the Surface. However, in the case of QtSurface
which is a SurfaceView, it will destroy its Surface before
we ever get to that part, leading to the resources holding
a reference to a destroyed Surface.
Task-number: QTBUG-118231
Change-Id: I282ddcc2813bf0a4e19cbb906376258dd2b4004f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9343d1ab6e1a5df3166d211809f2eb0e5a3cd878)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QAndroidPlatformOpenGlWindow creates an EGLSurface to wrap
the native Android Surface. Once this EGLSurface is returned
to QPlatformEglContext, nothing is guarding it anymore,
and Android can freely destroy the underlying Surface.
This leads to failed EGL operations when leaving from the app
or returning to it, as that is when Android destroys/recreates
the Surface.
Use the mutex from QAndroidPlatformWindow to guard setting the
Surface, and during the makeCurrent() and swapBuffers() calls.
Locking until returning from these functions ensures Android
cannot destroy the Surface in the middle of them.
Task-number: QTBUG-118231
Change-Id: I614575c42f7f0c2c17022994d3bc542726ebf039
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e5513a9447771dc722ca27e553fd3e966ee7d44a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtWindow is adding QtEditText to its view hierarchy in qtMainThread,
instead of the main thread. This causes crashes.
Fixes: QTBUG-129201
Change-Id: I10a638d281198a82edc7a81e23182b0c66e83a0b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit cc0629a4877ff7609094a29e4a18252c0de057b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a user accidentally passes 'CMAKE_OSX_ARCHITECTURES=x86_64;arm64'
to configure on a Linux x86_64 platform, the build would fail when
compiling qdrawhelper_avx2.cpp.o either due to an architecture
mismatch, or due to not recognizing the -Xarch flag on older gcc
compilers.
Only add xarch flags to SIMD compilation on Apple platforms.
Change-Id: I322316979626b04cb0378f4dbf3cc26ec96183ac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
(cherry picked from commit 3f3d8604e6ed5b6854301f4a3c4799cfa256d8b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 9a11273b745a30cebb5cd648c89eb224e9704492.
Reason for revert: The fix tried to find a sensible order if
the same language is listed multiple times in QLocale::uiLanguages().
Anyhow, it breaks for lists where entirely different languages are listed. This needs more thought.
Fixes: QTBUG-129434
Pick-to: 6.7 6.5
Change-Id: I8c074cbf1ddc2ddf223ec09aef38dfc1ef7fc85f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f3fc7b210f79e5eb427b0ff49c45c5d6d390fb34)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a30c1bcd3c8b8eb4befeb254840224ca7bb52497)
Check the QPixelFormat instead of relying on an easily outdated list of
formats.
Change-Id: I076391ac22bc9d4e70e53232c529d09d7aab13b9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit fdc29cf057e7e2ec095405ff2b07bc082b0d4cdf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make shouldIncludeFs() class- instead of file-static by moving it into
QStorageInfoPrivate. Ditto isParentOf().
Put the functions under Q_OS_UNIX.
Fixes Clang -Wunused-function, and removes a non-q/Q-prefixed name
from the global namespace.
Amends 543ae6e6a43519b9fca6758c4a8c78625fcb2c86.
Manual conflict resolution for 6.8:
- tracked a user of shouldIncludeFs() that needs a QStorageInfoPrivate::
prefix added from qstorageinfo_linux.cpp to qstorageinfo_linux_p.h
Pick-to: 6.7
Task-number: QTBUG-77059
Task-number: QTBUG-126219
Change-Id: I4cc62ae044d74919d73d08f6ce3ad57f2e00b4c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5cd154de63c517728d42ed322cb5f2965ef5f6ec)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Relax the dependency on Cups for PrintSupport module on non-APPLE
platforms. 30bb15e7bf42a07b49700b6e822513f125d9ed4d added the missing
dependency for the PrintSupportPrivate target, but made it required.
In general users not necessarly need the Cups found when linking
PrintSupport on non-APPLE platforms. So we may mark Cups optional.
We also need Cups as the required dependency when Qt is built
statically, since then QCupsPrinterSupportPlugin will require the
library to be found.
Amends 30bb15e7bf42a07b49700b6e822513f125d9ed4d
Pick-to: 6.7 6.5
Change-Id: Ia31d52f7beb9fab6ffa5123147a243f5be6345ef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit cce81f296eeae2d20f4f51e0ec4e0d3491e2f909)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The cycle_p.h header assumes the configure system will set up various
HAVE_FOO defines, which we were not doing. We now selectively use
ARMV8_PMCCNTR_EL0 on Apple Silicon.
This is in line with the upstream change in
https://github.com/FFTW/fftw3/commit/7e92d5
We can't use DEFINES, as CMake doesn't allow function macros in
defines, so we manually use COMPILE_OPTIONS, as we know Clang
supports this.
For Intel the cycle_p.h header already does the right thing based
purely on the compiler-available defines.
Change-Id: Ib3da05c203955a6a377ba0eeb624f1cb430931e1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fd00d5569e738d2536c05b2fc3ef2517f415b272)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The duplicateRequestsWithAborts test was missing this, causing failures
on macOS 14. Instead of adding it to each test function, we now set up
the temporary key chain in init(), and restore things in cleanup().
Task-number: QTBUG-119616
Change-Id: Ia9d80ae632774b8628417ad30d354a22b6a4916e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 882e5d72fc2dcca3c35035564fbb9ce5abc4bc4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QTest mouse emulation doesn't support drag & drop on wayland.
This is why all tests fail, where dock widgets are undocked by mouse.
Move skipping in the qCreateFloatingTabs macro, where possible.
Remove skipping where possible.
Fixes: QTBUG-129362
Change-Id: Ic71529f34b8bc39864c9eccadc2aff7b6d426ca8
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 597f4bd4734e8a165929bc163ac910f44ba7a1e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The helper function shows the main window and uses the
QApplicationPrivate::setActiveWindow() antipattern afterwards.
Use qWaitForWindowExposed() instead.
Task-number: QTBUG-129362
Change-Id: I915c5f8221e4e289950e917ad9c4fc2a7f5b9987
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 899c89c8d71d90b30c21b688cfe6b62868ad1ee9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows QQmlDelegateModel to know if a QAbstractItemModel subclass
is in the process of a reset, which it can't know if beginResetModel
was called in the model's constructor.
As an added bonus, it also allows us to warn the user if they call
endResetModel with a previous call to beginResetModel.
Task-number: QTBUG-125053
Task-number: QTBUG-127340
Pick-to: 6.7 6.5
Change-Id: I7d1fb983e9bf868c48472624ad945ae158115943
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 9d8663c18e88cb0b5a65f86cfd7726f3d31e04d6)
It went unnoticed (by me) the test was disabled via *.pro and later CMakeLists.txt
rather than BLACKLIST I was checking back then.
Fixes: QTBUG-129349
Change-Id: I509485bac9f32d544ef4bec120590a00d85ed608
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e498a076ae035588ed6f29e91a20eb727d608342)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit fixes the broken layout. Wrapping the divs of
col-1 (content) and col-2(sidebar) classes with a container with
`display:flex` does the job.
Fixes: QTBUG-129178
Change-Id: I6867b178e5a1acf6a4fbd5302a857e5f3ca0a62f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit d39c9d37ade8d74e534952e47061168be8904fc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 148f1a5a898bec38cea0593427ed48eb75a629c0)
Types are automatically registered these days, so the remark about
explicitly registering them is out of date and can be removed.
Change-Id: I9c2b4dde8728a1d884ea37f00de919a037b6dca5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit fc28eb4688c36fa5f00867ebf9ae569e031ef446)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindowPrivate::forwardToPopup() sends key events with
QCoreApplication::sendEvent(), which sets QEvent::m_spont to false.
That makes key and pointer events sent to popups appear synthetic,
while they are sponaneous if sent to other widgets.
The method has been newly implemented in the course of moving
popup handling from QApplication to QGuiApplication.
Make current behavior consistent to the behavior prior to
e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9.
Since events are always spontaneous, use
QCoreApplication::sendSpontaneousEvent() instead.
Add a test function to tst_QComboBox to Verify, that key events
- are sent directly to the popup
- not seen by the window
- appear as spontaneous.
This amends e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9.
Fixes: QTBUG-129258
Pick-to: 6.8.0
Change-Id: Iff61b98b290f6483948007b5f12b19393759d9db
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3fbae61ea245291cb4c34e9126562c307741a600)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The YAMA LSM by default[1] prevents attaching the debugger to any
process that isn't a child. Since our backtracer comes from a child
process instead (i.e., tracing the parent), we must grant explicit
permission. This also makes QTEST_PAUSE_ON_CRASH=1 work.
[1] https://codebrowser.dev/linux/linux/security/yama/yama_lsm.c.html#ptrace_scope
Change-Id: Ic19d84a7a730c7f8fc0ffffd64e516447e4b1f35
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 731b1159f9da9d0a5f9871ceaef4b82b657b130c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We no longer support these iOS versions.
Change-Id: Ifcb2d0201ccc5017a088a05e491bcd0f4bfaa0e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 9fbfe72649c6637256766472ac8025dafe4fb778)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Ideally we want to catch if any of our selftests produce errors or
warnings from system frameworks that are out fault, but in this case
the warning does not seem to be something we can do anything about.
The "+[IMKClient subclass]: chose IMKClient_Legacy" warning is logged
via NSLog, so as a workaround we disable NSLog/CFLog output to stderr.
Change-Id: I17b6b83844c4160aa5980d954b70f2582ff94da5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 493fa52e135f73c1496715bb45602d9a4da1ade4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Intel CPUs have had this since 2013 (Ivy Bridge), but some older
Bulldozer AMD CPUs appear to be missing it. This creates a mismatch
between when the __haswell__ macro gets declared in qsimd_p.h and the
runtime check using the CpuArchHaswell value. That in turn creates a
condition where qInitDrawhelperFunctions() in qdrawhelper.cpp leaves the
memfill pointers set to null.
#elif defined(__SSE2__)
# ifndef __haswell__
qt_memfill32 = qt_memfill32_sse2;
qt_memfill64 = qt_memfill64_sse2;
# endif
...
#if defined(QT_COMPILER_SUPPORTS_AVX2)
if (qCpuHasFeature(ArchHaswell)) {
qt_memfill32 = qt_memfill32_avx2;
qt_memfill64 = qt_memfill64_avx2;
It does this so the qt_memfillXX_sse2 functions don't have to be defined
anywhere, so the QtGui build won't carry unnecessary dead code.
This is old code (from Qt 4.x) and several improvements I've made for
QtCore are not applied yet. My work for qSimdDispatcher[1] isn't
complete: it might have avoided this problem here, but it would also
have required major work for the draw helpers to work in the first
place.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/537384
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-129193
Change-Id: Ia427a9e502b0fb46b2bdfffda8e2131b7091c9e9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 54c24313fe1e4ed58b3260189cb623a7c852ab1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends c0014becca2cd376eadd5c8a0265e5cf47c9aa01, which moved the code
that had depended on this.
Change-Id: I602661af164e6da118e1fffd0f9428c98b9ac2fb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit e15543a10a7d302aab05323a325630f1a9633192)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is legacy behavior from Qt 3, before we had QFlags and before
QVariant could support user types. I cannot find any instance of a
getter returning an integer in current Qt or Qt Creator code. And note
this only compiles if the flags type with Q_FLAG - not Q_ENUM.
The content is wrapped as Qt 6.x only so it can be removed in Qt
7.0. The deprecation warning will come in a later commit, for 6.9.
Change-Id: Ie3ddd8025e3b4387866efffd8e8d46c3daa0dff2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 939f7f56227e65c9797d17640a7b9c29166efc44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With the upcoming change to QFlags to support 64-bit, MSVC started to
complain that it can't convert from Qt::Alignment to QFlag and back to
Qt::Alignment. It is correct that this path has an explicit and
shouldn't be taken, but
a) it's worked for years
b) GCC and Clang insert an extra conversion to int (I guess)
In any case, header->iconAlignment is already a Qt::Alignment so we
don't need to go through QFlag here.
qcommonstyle.cpp(1666): error C2440: '<function-style-cast>': cannot convert from 'const Qt::Alignment' to 'QFlag'
qcommonstyle.cpp(1666): note: Constructor for class 'QFlag' is declared 'explicit'
Change-Id: If349995b779be9e3dab4fffd8701af8615ae407b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit dc1f4b742edf469a61eb6067a5a0ca44aac6cd48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Our workaround with a temporary keychain is not working anymore.
Startring from macOS 15 Security framework supports a new option:
kSecImportToMemoryOnly. Setting it to kCFBooleanTrue allows us to
import PCKS12 without accessing 'login' keychain and thus avoiding
blocking system-alerts requesting keychain access.
Fixes: QTBUG-128579
Change-Id: Ic86460b05dbee07194b146cefc45df6a478946b1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 15817e7d29a5c496585ea0e45a8a8139f053f001)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Update QtEditText Layout parameters to match the item sending
the focus event while showing Android keyboard.
Task-number: QTBUG-125323
Change-Id: Ie7f32d66807e4c1d308d49483d1e72dc25eaa76a
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 28df9a49776a88cb1a8e69348ae19a59b16a5b7e)
We need it for the most common operations in this function
(InvokeMetaMethod and all the property operations), so this avoids
duplication and ensures we always compile the static_cast.
Change-Id: I21b199bb5a1a1de632a3fffd45b339c2f3326100
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 69ce741c186c9a1dd4ea9eecb7a51725c4e62342)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit e816f915411a0f517021769abd8919a423f635c3 ("Moc: avoid double
underscores in a generated identifier") added the CLASS..SCOPE..ENDCLASS
mangling to avoid creating double underscores, which are reserved to the
compiler and thus undefined behavior for us to use.
This commit changes that mangling to something similar to the IA-64 C++
ABI because a) that creates shorter identifier names that are often
easier to read if you have to open the moc result and b) will not
collide with a class name by the user that used SCOPE in the name, such
as:
namespace Outer { class Inner { Q_GADGET }; }
class OuterSCOPEInner : public QObject { Q_OBJECT } };
Before:
Q_CONSTINIT static const uint qt_meta_data_CLASSOuterSCOPEInnerENDCLASS[] = {
Q_CONSTINIT static const uint qt_meta_data_CLASSOuterSCOPEInnerENDCLASS[] = {
Now:
Q_CONSTINIT static const uint qt_meta_data_ZN5Outer5InnerE[] =
Q_CONSTINIT static const uint qt_meta_data_ZN15OuterSCOPEInnerE[] =
While I make no promises that this matches the mangling scheme, it can
actually be decoded by the c++filt(1) tool. The main difference (AFAICT)
is that we use the N..E production even for types in the global
namespace (e.g., "QObject" mangling should be "7QObject" but is
"N7QObjectE").
$ c++filt _ZN42QTBUG32933_relatedObjectsDontIncludeItself2NS3ObjE
QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj
Pick-to: 6.7 6.5
Change-Id: I40b756c1ac0f6a986d79fffd14b2e245ac195afb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b020bff6e9a2e45760bab61bdb84efc078c45f7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's an empty struct now, a.k.a. a "tag struct". It used to be the type
of the actual data prior to QtMocHelpers::stringData().
Change-Id: I490a0b19e05103c74305fffd20c71a51e94fc449
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d9b4309f0ec8719b2575bfd8b911d1b950a4d7ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By removing the attempt to write if () {} else if () chains. The _c
variable is a primitive (an enum) local to this function, so its value
cannot change. All compilers in 2024 are smart enough to realize that
if (_c == QMetaObject::CreateInstance) {
...
} else if (_c == QMetaObject::ReadProperty) {
...
} else if (_c == QMetaObject::WriteProperty) {
...
} else if (_c == QMetaObject::ResetProperty) {
} else if (_c == QMetaObject::BindableProperty) {
...
}
is the same as
if (_c == QMetaObject::CreateInstance) {
...
}
if (_c == QMetaObject::ReadProperty) {
...
}
if (_c == QMetaObject::WriteProperty) {
...
}
if (_c == QMetaObject::BindableProperty) {
...
}
Drive-by not emitting some of the unnecessary property controls (which
all compilers would discard anyway).
Change-Id: Ib3e88392d7b960fbf64dfffd83ce636260ff6d7d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 245a1ecb8badaae4979e3fbaa25e8936a85a7428)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The data tables are used to implement the locale-support methods,
which Julian inherits from Roman, so it doesn't need to access those
tables directly for itself - and doing so (potentially) duplicated
their static data in two compilation units.
Pick-to: 6.5 6.2
Task-number: QTBUG-128930
Change-Id: I313c14441c947daeb702aa17d85b4b6d4b5d3636
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 58ddd0ac31c1a9861463a77e31865e6249dfe2c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Now that the maximum and minimum might not be in local time, the day
might not be the same as the local time day. In any case, the "saving"
of checking for being past the end of that day is negligible compared
to all the other wanton costs of the date-time parser.
This is a follow-up to commit b6a11a4ee5319366f14c11c7cf3a4f1dbf33cfd5;
thanks to Tor Arne for reporting the resulting assertion failures.
Pick-to: 6.7 6.5
Change-Id: I1ba443df9340fa63b8765c25004b51467ca5244d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 070ab9e85208c467d2f59f7fdfc7afe627dc37e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Generated moc files contain `using` which shadows the previous `_t`
in the `qt_static_metacall` function.
To fix this rename the `using _t`.
Example.:
In file included from /home/jonas/Projects/strawberry/build-qt6dev/src/mpris2_player.cpp:217:
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp: In static member function ‘static void Mpris2Player::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp:266:19: warning: declaration of ‘using _t = void (class Mpris2Player::*)(qlonglong)’ shadows a previous local [-Wshadow]
266 | using _t = void (Mpris2Player::*)(qlonglong );
| ^~
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp:247:11: note: shadowed declaration is here
247 | auto *_t = static_cast<Mpris2Player *>(_o);
| ^~
Change-Id: I4a7d4e09ea599f3db97e21ae48599423f45885f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1a746e35ec5bef7f9ecf4d0fb7d8812523888d0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test has started to be rather flaky, and QCOMPARE provides better
diagnostic messages when failing, printing both the actual and the
expected value.
Pick-to: 6.5
Change-Id: I262e8e85de596ff3502e02ae26a1dd2724af92de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d736a5e00030058f90a5f83316581e86e434c119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We use pathconf in some of our tests to determine if the file system
on Darwin is case sensitive. But pathconf returns -1 if the case
sensitivity can't be determined, with errno set to ENOTSUP.
The convention in this case is to treat the file system as not being
case sensitive (as reported by NSURLVolumeSupportsCaseSensitiveNamesKey
and VOL_CAP_FMT_CASE_SENSITIVE in equivalent APIs), so we need to check
explicitly for a return value of 1.
Change-Id: I1107e849babd8813da3b148c92494e8e35a32d36
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit bd3aabf38454087a96a17ff0130d7f5c2b2b39a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The command line option is compress-algo, but in XML, it's
compression-algorithm.
Fixes: QTBUG-126953
Change-Id: I5ac631a5f5984d1a80781e8c1a42719686dbf27d
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 766d395f77146d9b08ef8a50d15d21b1e279a9b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Setting the opacity on an NSWindow does not result in a paint event.
Change-Id: I6d2780191ba97082f7ca80e2aa1094ccf796fb75
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3d1ec9ee94bac4222637bc9791ffc4d051c08fbd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test requires Qt::TabFocusAllControls, so Qt::TabFocusTextControls
and/or Qt::TabFocusListControls, which is the default on macOS, is not
sufficient.
Change-Id: Iaf84c7ba67b978b942f396911048716417c38c03
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 283cfe0b80f83833a549d79e2787f5b936d90236)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test requires Qt::TabFocusAllControls, so Qt::TabFocusTextControls
and/or Qt::TabFocusListControls, which is the default on macOS, is not
sufficient.
Change-Id: Ideb673f570125c0d73c67a408f3d144f29052ace
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0a1c5d6e7de13afdb76161a6655d1024df03f454)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The variable is required to calculate the inner CMake prefixes when
building the Qt CMake tests inside Qt CMake tests. Otherwise the prefix
path remain empty and CMake attempts looking for Qt by the system
paths.
This fixes Qt CMake tests when running them as part of non-prefixed
build tree.
Pick-to: 6.7
Change-Id: I8908ab0b47fe37044ccb2a950d8973790e4fd174
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f80c0f1f944ab5af6efef71306692cb1e916930c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 17763a7b31c1f6df6f7725c4b67e5dcc4d3b00fb, but not picking back
further than f8da484d5741d1191504eefddf5134fd7009e16a, to avoid
provoking "inconsistent override" warnings.
Change-Id: I463e391f4acb896641e5d3d120a52143b1a9a8a9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d4348cc9b4cadca3585872ee8632a47c6ec85101)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a RAII class, so it SHALL have a [[nodiscard]] ctor.
QUIP: 19
Pick-to: 6.7
Change-Id: I96728c04be3495d78a5c9c2ef105fbb4e53e58f0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 446e28926cbad9b5ff4b99e222a6bd4473b8c6fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is preparation of applying headercheck to private headers, too.
Renaming the returned value to `result` also obsoletes the need for
the ugly this-> qualification, otherwise easily misread for a compiler
hint to look up the name in a template base class (which here does not
exist).
Amends 4d579851c842e136fbaf7a5d629c249456a91e39.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ib683f3deec492acdd2bc61806a8b0467f18f0fe8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 5cd3fec9f9a2bca8c27bdee6b185714983b5d11e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's what the class is doing, with a bit of convenience on top, to get
from QBindingStatus* to its currentCompatProperty, so implement it
like that.
Simplifies the implementation and fixes a -Wshadow in the constructor.
Amends c4bfd32cca547504ebccfad3da4e73a2b712baea.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: I4ce32e6ae6e6794b578d967c3e22854091470a14
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 97cd2e384960a4e9951bd906ba4c52e07c0ea4c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... its only remaining user.
Amends 71b54cc24431e8bc6e97f5d62132bd5261764c3a, which removed the
only remaining non-qcoreapplication.cpp user of qWinCmdArgs().
In the process, rename the function to non-public-API-looking
winCmdArgs(), and adjust its Q_OS_ protection to what its caller uses
(Q_OS_WIN; was: Q_OS_WIN32).
As a drive-by, change an old-style- to reinterpret_cast.
Task-number: QTBUG-126219
Change-Id: Id37e62e9df2a0c44bb1e446e409fd36e11cb77ce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c59ebcfe72d1416897f251036db34902bbb39b1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This change sets the thread affinity of the
QAndroidItemModelProxy instance to the Qt main thread,
enabling its APIs to be called from both the Qt main thread
and Android threads. Synchronization between threads is
ensured by using the newly introduced
QAndroidItemModelProxy::safeCall(), which utilizes
QMetaObject::invokeMethod() with the appropriate
connection type based on the calling thread.
For void functions, Qt::AutoConnection can be used.
Functions returning values will either use a
Qt::DirectConnection if invoked from the same thread as
the QAndroidItemModelProxy instance, or a
Qt::BlockingQueuedConnection if called from a different
thread.
Pick-to: 6.8.0
Fixes: QTBUG-127701
Change-Id: I214bc43d20d8bdf301fc97920493415d503d26d8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6c30a60a42800dd5d732d2c7018d87e8f3a9c6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The parenthesis ends up without content, and that looks confusing and
broken in e.g. Qt Assistant.
Fixes: QTBUG-120151
Pick-to: 6.8.0
Change-Id: Ib616741bc0463e8bece481c2a37cd7c3992921ab
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 2c9968bee56373f36e6ceb616befdf2657f24859)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the pre element selector, not the .pre class selector to add correct
padding to pre code blocks and non-code blocks.
Pick-to: 6.7 6.5 6.2
Change-Id: I14886f44597354c81840a866c75caa62387a7375
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e01ba1824ee27ebafe8cde79e0e0e0d36dcf3467)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QObject::disconnect does not cancel pending events. This can cause hard
to find bugs in application code, so we explicitly document and unit
test this behavior.
Task-number: QTBUG-127675
Change-Id: I5e94d60c27b9ce2dd2bceb832eb817b7eaa9cdcd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0681e720a9851f1873ce5a5f99b5567d2b418261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we don't set dropEventMoved to true, then QAbstractItemView::startDrag
will delete the rows after the move (after QDrag::exec() returns).
Fixes: QTBUG-129128
Pick-to: 6.8.0
Change-Id: I85e7903a12b13c4b73e34fa1fcac56e50f421191
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d2384783477e88190fb87287bb9af8ea9a46343e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the new `\qtcmaketargetitem` QDoc command to specify the correct
`target_link_libraries` item for items that belong to the new module.
Fixes: QTBUG-121855
Fixes: QTBUG-125994
Change-Id: I76a6ab749fdb349cc014f40bc7e548a0344bc50d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 9a9f5009006e03849242211d831a900e30c39fc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Export QStyleHelper::uniqueName() so it can be used by windowsvista/11
style.
Change-Id: I07c1a63ff27688cba2a3747166f5e93ff61d2cd3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cc3b419855f6d1e62de7013bc8687eb81b41555d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
VxWorks doesn't support local sockets. Since VxWorks clients don't need
support for that, turn it off.
Task-number: QTBUG-115777
Change-Id: Ibd95d375bb89d32e1ff8b9c2488c6e05910b0b92
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit acb97f06c6615b3292db769ea59266f7dc378636)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since we will need to turn off this feature for certain platforms, code
must compile with QT_FEATURE_localserver turned off, which now can't.
Fix this by disabling parts of code requiring QT_FEATURE_localserver.
Task-number: QTBUG-115777
Change-Id: I6d78030db67ee679d6877b48a437db90a6e47a02
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5bbb05c72c8b8f2d33beae722a704a1c293a55ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use "qt.text.font.db" logging category to print OpenType related
warnings during loading a font engine. Also, as a drive-by change,
use qUtf16Printable() to avoid unneeded allocations.
Task-number: QTBUG-129092
Change-Id: If603aa1251c0073aec7bb0ba75d3e5e9e0385ac1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0c7a89f55e216d1f679fedf17f6d014ca722f735)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Removing the slash would be a drastic change in behavior. We can expect
many people to rely on the trailing slash to string-append further path
segments without inserting an extra slash.
Amends commit e7bcf41c0b23d83cfb31f966454945c705589a99.
Pick-to: 6.7 6.5
Fixes: QTBUG-128940
Change-Id: I71dfc957f383e4648b3b47a40aeb796d7237fb00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2addfa635d2f666d18ffc818f76eb673a6c787d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If/when we introduce mutable QJniArray iterators, then iterating over a
mutable array will be significantly more expensive due to the write-back
from the reference type.
Change-Id: I2e8eb357fdb6a9890699f5c61d49b635d303f301
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2d4f4220dd068c1253e701cdf6aefab17ef91c75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
tst_QWidget::render_windowOpacity
- Fails constantly, therefore QEXPECT_FAIL better than blacklist
tst_QWidget::enterLeaveOnWindowShowHide(dialog)
- Known flaky, but doesn't need blacklist as it passes when
rerun is used, no need for actions.
Task-number: QTBUG-128371
Task-number: QTBUG-128372
Task-number: QTQAINFRA-6396
Change-Id: I806419996fedea22628eecf311e977c74066d748
Reviewed-by: Tero Heikkinen <tero.heikkinen@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 975b4c078036427d2bf7026f1ba50ad095d83172)
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
On drop, close the file after write before sending the drop
event to make sure file content is flushed to to the
file system.
Pick-to: 6.8.0 6.7
Task-number: QTBUG-128855
Change-Id: Ide14bfebbdef07eee03ae1bd19d394da537ab123
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 0a37f038bfd7e18d9538dde8212a6c323eb4e70f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test is using QCursor::setPos(), which also fails locally, unless
the user explicitly gives the test permission to control the mouse.
Change-Id: I6c85c8fd194e178d5df92b7b4cf9c222f8b5a066
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 47b9251de1d722674fd08fe907dff09a0f8ae353)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is weird, since Clang -Wweak-table didn't trigger here.
But -Wmarc did...
That's because the virtual functions behind the Q_OBJECT macro are
implemented in the moc file, so are actually out-of-line. And
~QObject() isn't the first virtual function in QObject...
Still define the destructor out-of-line, for consistency.
Amends ad265c55beb596e28d6b28c16700795fa8555ee6.
Task-number: QTBUG-45582
Task-number: QTBUG-126219
Change-Id: Iada95966b7244873390f4c7ad42de9352311ca33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41c5856ffa6cac43c15a6a43261b6693e7b0566f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This depends on 9eb06a2848257d054447777c645231afa87429c2 .
Done-with: Inho Lee <inho.lee@qt.io>
Task-number: QTBUG-107157
Pick-to: 6.7
Change-Id: I9f4521c27ebc847596a94eed0c9116d71905def2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit bc7821764b4d50fbb4e0ca1b84f85980ce15eeb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation text uses Qt6:: instead of Qt::, so let's
also use that in the shown snippet. This is also the style
we promote for targets in other documentation pages.
While at it, print the target names consistently in monospace
font.
Pick-to: 6.7
Change-Id: Ia4d67bad2790d6688ef8d5b4103453c5c40877bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e836f8794403696a8467b69f0ab822d36b01a18c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
iOS 18 added a new enumerator value for contact permissions,
"Limited". This value has not been added for any other permission
enumerator types such as camera. Currently we get compiler errors
for not explicitly handling this value in a switch case. This change
explicitly handles this enumerator and enables compilation.
Pick-to: 6.7 6.5
Change-Id: Idfc45902f9ae2e555fab8ba3d860a58d89651964
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0bc5e5ad0e490a1d8e140855b23abbb087c6f9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename the private member to m_storage. That is more churn than the
alternative of just renaming the ctor argument name, but is more
idiomatic.
This is in preparation of applying headercheck to private headers,
too.
Amends 38002df2065d3730defe3513f73088b444e68139.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: Id638a4c286f7a0ef6649017904ed190aab2631b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 7515c21f4badd80c09982901de8dfadf62401a3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename the data member to m_stream, as is idiomatic.
Amends 327b2ba3b77e7a738ccfbe84c6ca5e9525010630.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I830e90e0a6c88acf95de8394e45cad075d4c924e
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e585b937167b9746091c520e303657fbec2fe221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the constexpr variables inline to silence Clang.
There's another batch of such warnings for the _data_p.h files, and
they are actually pointing to a real problem: If two TUs include these
headers, the static constexpr tables actually get duplicated. Created
QTBUG-128930 to track the issue.
Amends 6d97cf0e573f11ae1fae11441e6fa747c34be21c and
fa9244700e016403b162932211023c65f4bb0d6b.
Pick-to: 6.7 6.5
Task-number: QTBUG-126219
Change-Id: Idb0cd55e424a870be6127fdf8399d01e9f3e9ac8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5064cb6feff6178cf3c307790ba028514c3d3040)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and adapt the whole hierarchy to idiomatic dtors (add override,
remove virtual).
Fixes -Wweak-vtable and all the problems that violating it brings.
Task-number: QTBUG-45582
Change-Id: I180c774a135b1fbf1a7e942c91af25710a4bf5fd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit dee1be0aae30f6d33ad8a7ee51341d3190ff84fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
AFAIU, the resize(1) was merely there to have result.size() return 1
in the initial iteration of the do loop. Since resize(1) is always
followed by another unconditional resize() in the do-while loop,
remove it and use "1 + readBytes" instead of result.size() in the
follow-up resize() call inside the do loop.
Saves one resize() call and the corresponding executable size and
runtime overhead.
Pick-to: 6.7 6.5
Change-Id: I507acab2a6b7d55217cd454ecbbaf1df0e1d18e6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d9579f0043a04e08b3954eb6bb58637fc25fba9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the constexpr variable inline instead of static to shut up the
warning.
Amends fbc491230fe62f739925e8113d05f4108e2738ef.
Pick-to: 6.7
Task-number: QTBUG-126219
Change-Id: Ifa8db14dc28f039d0dc65eb779d715cd4a2c7240
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 743403cb6d9957c1bdb6ef7a1bb6f30377f578a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Unix, if target exists and it is a file, rename silently replaces it
if the user has permission. However, on Windows, if the target exists,
FileExistError will be raised.
With replace, if target points to an existing file or empty directory,
it will be unconditionally replaced.
Change-Id: I2774152fec78a00c4ca6c9d1b927e503df2f2e84
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit eff8e6b885dfa3f26523ca39164725b4932c31bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using the default system encoding cldr2qlocalexml.py and
qlocalexml2cpp.py may terminate with encoding errors on Windows.
Warn the user to set the PYTHONUTF8 environment variable to 1 before
running those scripts to avoid encoding errors.
Change-Id: I315a45072cb6ea516d3e9bb7613c6f251792ec59
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b3ef2fdd8b99c6920a382fbbc417209bf436c3f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The variable ianalist is not really used for anything, it was probably
meant to be ianaList.
Change-Id: Ie9f42bf9716da28ee0017319dda96389c415ef4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 67ec126168b81adc2adc9fdb346c0a913c3c501d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This de-inlines destuctors of classes whose vtables are proven to be
duplicated by -Wweak-tables using the upcoming headersclean for _p.h
feature.
Since these are all private API classes, we can pick all the way back
to 6.2, and we don't need the comment that the dtor must always stay
empty, like for public classes.
Task-number: QTBUG-45582
Task-number: QTBUG-126219
Change-Id: I8c864c0d2ed3ca20d20d5cfc356290eb529edf6c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3af20bd8eb8c75017c5d6d138d7c42914ee5bee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... until a more robust mechanism for adding these generated tables to
the build has been found, cf. QTBUG-128930.
Task-number: QTBUG-128930
Change-Id: I190e04aba345cdd3ca6c94be6d0f7c2550362ecc
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
(cherry picked from commit 0988042c4742a85f1ea50eb1d7acfa84ef8e83e6)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The SetParent() documentation notes that when making a window a child
window the window style should be set before calling SetParent(), while
the opposite order should be used when making a window top level.
We were exclusively doing the latter, which resulted in child windows
getting activated and focused as part of the reparenting. Being the
active window was resulting in the child window receiving WM_CLOSE
and being destroyed if the user pressed Alt+F4, which was very
surprising.
The child window can still be focused later on, via e.g. an explicit
call to SetFocus(), so it can receive keyboard input.
The QWindowsWindow::setParent_sys() logic, used for non-foreign
windows has the same fundamental issue with not respecting the
order of the style update, but the interactions with the drop
site logic makes it harder to update in similar fashion as this
patch does for QWindowsForeignWindow.
Pick-to: 6.8.0
Change-Id: Id88f5981daaf121a39aba9319d02aebefb6aa07b
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a90d99d8da9b2be2e6b8e981cd9dabfb1641e985)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We had a mismatch of the naming of the Qt and compiler defines. Matched
the qt defines to the compiler define, and added detection support for
MSVC (ARM64).
Change-Id: I9abfbe8a96bc8c800e86dac3ab9a7abf9c1f7f9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bbdd20da04dd9d7a9a3250aef005e4549999a312)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Inspected all in-tree callers, doesn't change semantics, but fixes a
few -Wshorten-64-to-32 Clang warnings (which we unfortunately didn't
enable globally upon s/int/qsizetype/).
Amends 48e2c3ac3318d4e3b504aadad5f56dc33be8f50d.
Not picking back further than 6.8, because I don't want to review
historic callers.
Task-number: QTBUG-126219
Change-Id: I53c16d630dfffdba3801bf211f1b80d0346dd375
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4bf1ed802151f8310b9adb56fac6de93f195cc44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Compilers _do_ grumble, after all:
qlocale_tools_p.h:68:14: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
return d == 0; // Amusingly, compilers do not grumble.
~ ^ ~
Fix by using the public qIsNull(double) function, which has
suppressions and was designed for this task.
Amends f645bb8880df3cb7c9e51e6c3398485292926a3c.
Pick-to: 6.7 6.5
Task-number: QTBUG-126219
Change-Id: I33f1fcb4c8c2ee30ad9a36cb46b806ef253e8062
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit aac83724013a1f226d2bf4b923447eb1b0e5c493)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This causes
qsavefile_p.h:28:22: error: unknown type name 'QSaveFile'
Q_DECLARE_PUBLIC(QSaveFile)
^
when qsavefile_p.h is included before qsavefile.h was.
Make the header self-sufficient by incuding the Public class' header,
too, as is customary.
Amends e993df877131cfafbf1a3578dbef233a3041a82f.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I17eb2a357bf1ef7ef5b5e3a3e56c4a921ba30951
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ad6e4df580a2437cc69be416956f6128267ffbea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is preparation of applying headercheck to private headers, too.
Changing the private data member name to m_error is the simpler change
here, since it touches a bounded amount of code vs. the alternative of
fixing an unbounded number of unknown users.
Amends 9f33ad904aa0f43c9599e61afaf8984b3f8a3b1c.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ie0f6b5e711b35a12fadc9d8e642b885ce8b57315
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 9348212be3880ecd93111b7321043a53ab1df45a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the same way that QAccessibleTable::child already
does, also make use of the childToId hash in
QAccessibleTree::child to remember and reuse previously
created child interfaces instead of creating new ones
for the same index every time the method gets called.
When items in the tree view change,
QTreeViewPrivate::updateAccessibility already sends a
QAccessibleTableModelChangeEvent event of type
QAccessibleTableModelChangeEvent::ModelReset,
which ensures that the then outdated cache is cleared
in the base class's QAccessibleTable::modelChange
method.
This addresses an old FIXME comment added in 2013
commit b2ec0da95641d9cec006fa9699e6d082ad35db0b and
fixes the issue reported in QTBUG-128558.
Fixes: QTBUG-128558
Pick-to: 6.7
Change-Id: Ia2a518ac26f3c9b9ba8ab1870bb656c8e9014a77
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3cfabf92b09290f71b7fafa79723dc374b807206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove code which is trying to unset flag that has never been set
before. Subtracting flag on unsigned int "attributes" can cause integer
overlow.
Fixes: QTBUG-128929
Pick-to: 6.7 6.5
Change-Id: I4128819f29a841b73b6a08aeba795dcae9dc2e51
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 21be40019f8adedf1e592b9b8ba0d965b857eef3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use OCIBindByPos2 instead OCIBindByPos where it was not yet changed to
allow lengths > 2^31 (and avoid unneeded casts).
This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208.
Change-Id: I8b6efdfdb0fb349043e9c84ceba17e008882f584
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 911eac26d482b8d63419648d6f735c49e9e17c82)
- As explained in
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
creating dialogs on the stack is a bad idea, if the
application or the dialog's parent window can be closed
by means other than user interaction (such as a timer or
an IPC call). Since we cannot know whether Qt is used to
build such an application, we must assume it is, create
the dialog on the heap, and monitor its lifetime with a
QPointer.
Long time ago instead of using manual resource management,
QAutoPointer was added to fix the crash problem for QInputDialog.
The same fix now is being applied for the rest of QDialog classes:
QColorDialog, QFileDialog, QFontDialog.
Documentation warnings about deleting the parent are not actual anymore. Deleted.
Pick-to: 6.5
Task-number: QTBUG-54693
Change-Id: Ib7cc0575ea25f392a295538e21de9015dc49ebe4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 81d55f772892445686862e49d0a6092668f8c725)
It was outside the QT_NAMESPACE, declaring a class different from
QT_PREPEND_NAMESPACE(QMimeBinaryProvider) in -qt-namespace builds.
Amends 4e9944e6c8a456353d243ab268cb0f01ff006faa.
Pick-to: 6.7
Change-Id: I8dec4d676fd774462ad63418ee8d82d1b0e44d1d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5820d54103d5c432ae8eaae180aefb1988f835ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found by applying headercheck to private headers.
Says GCC:
global/qnumeric_p.h: In instantiation of ‘[...]
{anonymous}::convertDoubleTo(double, T*, bool) [with T = float;
[...]]’:
text/qlocale_p.h:312:51: required from here
global/qnumeric_p.h:390:22: error: implicit conversion from ‘float’
to ‘double’ to match other operand of binary expression
[-Werror=double-promotion]
390 | if (std::fabs(v) > (std::numeric_limits<T>::max)()) {
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since we already checked that numeric_limits<T>::max_exponent <
numeric_limits<double>::max_exponent at this point (see constexpr-if
at the top of this function template), we can assume that the cast of
the RHS of the relational operator to double is safe. Use braced
initialization to statically assert that this is, indeed, the case.
Amends 1e43b64a7a5c3823a6bdcb8d0cd28a17955939a2 and
a14bba6803f674edede596eaeb5a46feed0f889e.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: If2b53d9b8ea7ebfcecec603408681eeffb9aaff6
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c38e58dcb02cd2273ba3c03c65a6f67b37100777)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logic in the isValidSegment() function was failing for 8-bit signed
because for them Integer(SegmentUnknown) is -1, so
(std::numeric_limits<Integer>::max)() < Integer(SegmentUnknown)
was always false (127 < -1) and the function would only return true on
the impossible condition of
segment >= 0 && segment < -1
Fixes: QTBUG-128848
Pick-to: 6.7 6.5
Change-Id: I8d17b93afd6c2982a099fffdcaeccf126b7a9d02
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ddfcc0734875cdee2c169bf2ecb1546bddba6e98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This removes the specializations, which were hiding the fact that signed
8-bit integers produce assertion failures.
Pick-to: 6.7 6.5
Task-number: QTBUG-128848
Change-Id: Ibb4952b0eb50a8c51e05fffd9e88a137ca95bcd8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit a572b4b0780dcc5fcac55737fc4153fca93e6c62)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fortunately, isDirPath() had an extra parameter to tell us whether the
path existed in the first place, making the fix very simple.
Pick-to: 6.7 6.5
Fixes: QTBUG-128800
Change-Id: I81482f87b594933158d0fffdbea0ea2a00494b6c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 329b05739d5d62f37464a5714ad87e7ca05693e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since qt_normalizePathSegments very often modifies the path, pass that
as pointer, and return a boolean with whether the path is attempting to
go up above the root.
Change-Id: I851fcb94db4606a6bd97fffd81910930dea8222a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 0314491abac092b20ebefc05e2e9f27fd038fc38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote
mergePathSegments() but got one thing wrong: that ".." on a "//" should
only remove one slash, not all of them. That behavior was introduced by
commit eaf4438b3511c8380b9b691b656a87a60e342e2 to match what browsers
do.
QUrl will use the local file behavior if the URL scheme is "file",
unlike the browsers.
Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fd3cfde46e25
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e7bcf41c0b23d83cfb31f966454945c705589a99)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote the latter for
simplicity and performance, so copy it over with intent to merging the
two together. In this copy, however, we keep the behavior introduced by
commit eaf4438b3511c8380b9b691b656a87a60e342e2, which made the
normalization match the behavior found in browsers, but didn't apply to
QUrl::resolved (that's the next commit)
Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I2670423f6c6a5339771ffffdf15ebad46fd25cb4
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 78e2d24752d8b6652aac89d1e79f245bc88281c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I had made this change but didn't push it. Amends commit
09055d7211b1f8ba9fdec141a1e919faee1c1676
Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fc87d41dd891
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 01fbb883ad8832808110e74a0c4b2724f1e38d6c)
This can happen in any number of cases where neither the base URI nor
the relative one had a "." or ".." segment. In particular, we want to
avoid detaching in the case where the new path is the same as either of
the base or relative URI's, which can happen when the other was empty
(and mergePaths() didn't have to prepend a slash).
Pick-to: 6.8.0 6.7 6.5
Change-Id: Iac1ff680887641888e00fffd17e14f3927e828ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 09055d7211b1f8ba9fdec141a1e919faee1c1676)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
We cannot use the fancy options in PlatformGraphics since user projects
lack of their evaluation in QtPlatformSupport.cmake. Use the explicit
CMAKE_SYSTEM_NAME-based conditions instead. Those should work if
respective CMAKE_SYSTEM_NAME is specified in the toolchain file.
Amends 3322f585eb5ad11acc1f93ecaafb42e30e37b197
Change-Id: Ifb6ced360e8cade7315b2b238837578bfc9a1bc3
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 43cac6eaa90897e50daf6105b19528b82bf776aa)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add the unified PlatformGraphics module, which looks for either Integrity
or VxWorks platform graphics.
The PlatformGraphics module creates the interface
PlatformGraphics::PlatformGraphics target which links the respective
platform graphics target. It's expected that from the platform graphics
targets to deliver the consistent subset of definitions, libraries,
include directories, compiler and linker flags and also the special
<platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables.
The <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables are
consumed by the PlatformGraphics::PlatformGraphics and stored in the
respective _qt_internal_platform_graphics_required_<type> property, to
access the value without scope limitations. The property then is
checked by the EGL and GLESv2 modules(this can be done elsewhere too)
and is appended to the CMAKE_REQUIRED_<type> variable before running
the respective compiler checks.
Task-number: QTBUG-128455
Change-Id: Id1987c6294327509a14fbeeb7b8bf39aad6f486c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
(cherry picked from commit 3322f585eb5ad11acc1f93ecaafb42e30e37b197)
If the model's setData() emits layoutChanged, it invalidates QModelIndexes
that this code is working with, so we have to use a persistent model
index for 'current' to protect against that. For 'previous', Volker
Hilsheimer had the idea of moving code around so we're done with it
before calling commitData().
Fixes: QTBUG-127852
Change-Id: Ieb6ebc9603e7a753d78aab11ce81ad87d71f5084
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit cbc5b4fbe12b6c4410bf482cd1caac933c8b63ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This should be rather QT_END_NAMESPACE.
Fixes custom namespace build.
This amends 55fc15ce8272073b9b404762b83e3e7acee0111e.
Change-Id: I61d0ea24f8b0e3382fdfb4658b8a514dbaad8799
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e94fefecfc47a6715d90ef8975f65d5702cc2477)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This includes a compilation fix for Integrity which is also
stored as a patch file under harfbuzz-ng/patches.
[ChangeLog][Third-Party Code] Updated Harfbuzz to 9.0.0.
Pick-to: 6.7 6.7.3 6.5 6.2 5.15
Fixes: QTBUG-128763
Change-Id: I84156d38cf131e78e4f0d0d1716aa4e79a8c3a45
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 0d83d8bbb15e3f481b1d8abed4cd29a08499c37f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If there are a lot of shortcuts in the map, the old code
caused the QKeySequence to be copied, which caused notable
delays.
Change-Id: Ia84e02f453301e046bd834b3d670a78c05c5db07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cc5a8689c162ee46a0d488d3d0cb40737905ff6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With IBUS, compositions are processed with "Dead" key.
It is supposed to be processed with input context,
so window's key event will be skipped.
Fixes: QTBUG-117096
Pick-to: 6.7
Change-Id: I179d32d656bd38990de4b656757957e26935376f
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit c494ed87382605bdafa23f15d79c2a44e75cf911)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The firebird api expects the timestamp (ISC_TIMESTAMP_TZ) of a timestamp with time zone is provided in UTC.
Pick-to: 6.7
Task-number: QTBUG-128493
Change-Id: Iacc85ca1141407f5ab73fd0198c7b2db770bf589
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Johann Anhofer <johann.anhofer@meon-medical.com>
(cherry picked from commit 8d8805214df22bf8dccbb30c9ca4a9953f3a1068)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Match to Windows target OS and different target arch, which tells that
it is a cross-compilation.
Change-Id: Iba2d087cda501cd2622a1bd8a8732100b920956b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit b8521b89dfa36519afe8a7c8f02b982d760fc0f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QChildProcess' destructor may unwind the stack, due to the call to
pthread_setcancelstate(), which is why it's marked noexcept(false)
explicitly. To avoid a situation where it causes a stack unwinding while
a stack unwinding is already in progress, this commit makes QProcess
re-enable the thread cancellation state (which immediately processes a
pending cancellation) before calling anything else that may allocate
memory (thus throw). It also guards against calling
pthread_setcancelstate() twice.
The successful execution paths remain under disabled cancellation so C
library calls like close(), fcntl(), read(), and waitpid() will not
cause premature unwinding.
Change-Id: I009cf64012e167321aa6fffd609c603cf18b50e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 6763b9f7ec2a7f8dd0bfc011ccd102316bb95e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This operation can fail and, in handling the failure, we call functions
that may allocate memory and thus throw. If that happens, our destructor
won't be called, so this commit avoids leaving the thread in an
incorrect state by not changing it in the first place.
In case there was a failure but no exception happened (a much more
likely scenario), the destructor will be called by startProcess() or
startDetached(). Therefore, we need to ensure it won't cause problems.
Change-Id: I091193bb945a2637f463fffdd93694e555401452
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 34edfe134403e331f0fa4550a074507a393bdc52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were overwriting the normalization if RemoveFilename was used.
[ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::toString(),
QUrl::toEncoded() and QUrl::adjusted() to ignore
QUrl::NormalizePathSegments if QUrl::RemoveFilename was set.
Fixes: QTBUG-127711
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I8a96935cf6c742259c9dfffd17e8e1f7fec44cb6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c9ff625865c355fb57c824b13f3cb4b26e53fbe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That way we will restore the thread's signal mask even if a thread
cancellation is pending and thus forces an immediate stack unwind when
we re-enable them.
Change-Id: I36589f84c5f4d8929129fffdbb77b2020c6fa5a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7400db0f82632a4bc41c1e6fc628ae4d4c1b9385)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QAndroidApplication native interface wrongly uses static methods
instead of virtual functions, which has lead to client call sites not
using the preferred QCoreApplication::nativeInterface() API to resolve
the interface, and a lack of an implementation in QCoreApplication
for the resolveInterface function.
We now implement resolveInterface for Android, so that the interface
can be resolved via QCoreApplication::nativeInterface(), even if the
interface itself (for now) is based on static methods.
Task-number: QTBUG-128796
Change-Id: Id4d8b9a6fcc7d0e2cc76de07dc0742dc5917f3ca
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 60f07671e1770c4f6fd71bbad7cf88ca35ab4de0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As the QGuiApplication::desktopFileName doc [1] says:
> This is the file name, without the full path or the
> trailing ".desktop" extension of the desktop entry that
> represents this application according to the freedesktop
> desktop entry specification.
Since the desktop entry represents the application, also
use the desktop file name for the accessible ID of the
application object.
This e.g. makes Okular's application object report an
accessible ID of "org.kde.okular" instead of just "QApplication"
as the AT-SPI2 AccessibleId property on Linux.
[1] https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop
Change-Id: I554da7baaf817866db9044128f73a9ea634cddbf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 13b4075093866a497e620bdd388afaf8aa0bc962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
AGP 8.5.2 still throws a warning about not being tested
with Android 15 builds, now 8.6.0 is released and doesn't
have the warning.
Amends b5d8552f2baab56457d3f39f6b2915c72447b702.
Fixes: QTBUG-128648
Task-number: QTBUG-126061
Change-Id: I3d7a4c9c184e1a81f0ebb9431a6e3ca9706d19e9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 8436455e2740000a817e0b8154e13f47e6abb68c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 2e711e47e0fedd636af2116c56622cc7be958808.
After closer investigation, it turns out that menus in Quick before 6.8
does infact forward pointer events outside the popup to the item under
the mouse. Only if the popup is modal will this be blocked. So blocking
this from QGuiApplication will cause a difference between Popup.Item and
Popup.Window, and needs more investigation.
Change-Id: I7d21258cb8fafd7380786fed0d6370e0a9090188
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Completely deleting a row in a QSqlTableModel needs a call to select()
afterwards, otherwise a blank column will stay according the
documentation of QSqlTableModel::removeRows()
Also add albumdetails.xml to the resource file to make sure it's found
during runtime.
Task-number: QTBUG-128434
Change-Id: Ie5cc38edfa27984d186467e3372b05987f78d14c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a28fe86af30bd3293f49ad09ee9c044e06ccbe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the relationModel is updated (e.g. a new row is added or removed),
the internal relation cache needs a refresh to reflect those changes.
Fixes: QTBUG-128434
Change-Id: Ie388c01d545564ad7b1424d70267166ac1e4bfd6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 48753a03de7c9c394fbf4cf69e2c2f3d1048c85f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clang supports q(u)int128, however, MSVC's STL doesn't have support for
it in <type_traits> and <limits>. MSVC's STL is used by Clangd on
Windows.
Fixes: QTBUG-128675
Change-Id: Ic0be6b9d2659477829c7b369385ef885dee8d355
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1f9a660eb2d5c6e3cb9c80dc292f3ec355296515)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QT_DECLARE_Q{,E}SDP_SPECIALIZATION_DTOR_WITH_EXPORT macros make the
destrcutor of the particular instantiations be out-of-line and exported
from the library in question. In many cases, the class name that is
being instantiated can found in a _p.h and this causes syncqt to mark
any use of this class as private API, including this constructor that is
meant to be used from inline (user) code.
This patch marks all such instantiations to be "public" API. That will
include some uses that shouldn't be so marked, but this is easier than
having to do it piecemeal.
The ELF version was changed for thsee Symbols changed in QtGui (for example):
QExplicitlySharedDataPointer<QPlatformPixmap>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QColorSpacePrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QPageRangesPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QColorTransformPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QPdfOutputIntentPrivate>::~QExplicitlySharedDataPointer()@@Qt_6
QExplicitlySharedDataPointer<QEventPointPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QPageRangesPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QColorTransformPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QPenPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QFontVariableAxisPrivate>::~QExplicitlySharedDataPointer()@@Qt_6
QExplicitlySharedDataPointer<QPlatformPixmap>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QColorSpacePrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QEventPointPrivate>::~QExplicitlySharedDataPointer()
QExplicitlySharedDataPointer<QPenPrivate>::~QExplicitlySharedDataPointer()
Task-number: QTBUG-128656
Task-number: QTBUG-117514
Change-Id: I1f25f1e61bb98159f9d3fffd63acbe04098cfef6
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 33707235841981133edfdfcd88cc6e234aa4fc45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Initialize the variables outside the loop to avoid repeating it on every
iteration.
Fixes: QTBUG-128667
Change-Id: I8e2ed0e40bdc4d687060df72f1d45e940e56df98
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 0819f128c5206d5712acce2e86e9eb5d9ba13182)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
AppKit sends the viewDidChangeBackingProperties message
to the view when the backing store scale changes.
Propagate to QtGui via handleWindowDevicePixelRatioChanged.
Pick-to: 6.7 6.6
Fixes: QTBUG-118794
Change-Id: Ia675e84f74dd3c64d6466adc753accbbb650325b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97c12e3f2dc1e2114aeb8abaff4d551b112887ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Deduplicate some API docs.
Mention that it's a RAII class, to make it more appealing to users.
Copied the "RAII" note and link from QSemaphoreReleaser's API docs.
Change-Id: I53ced6eb7c2ab55ffc04e70c250b5f5639406911
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e1fdfe9da8ccdeed9af602897232a513884b0515)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the key doesn't exist yet in the map, we need to be able to create an
actual Key object. Consequently, we require that the type is actually
convertible.
This doesn't fix any broken code, but avoids compilation errors in QHash
internals bubbling up.
Note that the existence of a comomn_reference does not imply
convertibility (so the concept version wasn't strict enough either).
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Change-Id: I4ed46f343817932063084642093cac193fd9554f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a338f67dceed61009375a4a90a7fe32a06b443a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When these iterators were originally added¹, their relational
operators, following the Lakos Rule, were not marked as noexcept
because they have preconditions (lhs and rhs must come from the same
QVersionNumber object).
d292648d0bbac50388dae035dc34782accb3807f then added the noexcept,
disregarding the Lakos Rule. Until the ongoing discussion regarding
the Lakos Rule on the project mailing-list² is concluded, don't add
noexcept. We can always add it in later, but we can't remove it once
released.
Requires manually working around the missing
Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_NON_NOEXCEPT macro that we
don't want to add if there's no other user.
¹ 2188ca2c5df6f21a953c002edbe5b2d2cc2c2d2c
² thread starting at
https://lists.qt-project.org/pipermail/development/2024-August/045544.html
Change-Id: Ie88326519673166afe8cb44267c23944b27c68d2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a84b79df0fb8a92b17a39bbf706714e93de9d6fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After the base and derived classes have been merged we can uniformize
the initialization as well.
Task-number: QTBUG-127539
Change-Id: I3828dc973fd7b3ccd06272e2e26eaae4edab8768
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c3093b3d8f27fa3df14e04245dea9ed1e781f61e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That allows the code to run in C++17 mode - at the expense of
significantly worse compile time error messages, potentially worse
compilation speed and harder to read code.
Adjust the test type to actually model
detail::is_equality_comparable_with (which requires all four
relational operators even in C++17).
As a drive-by, fix the return value of remove() from auto to bool.
Done-with: Marc Mutz <marc.mutz@qt.io>
Fixes: QTBUG-128470
Change-Id: I68df26db579c60812a18e09b76dd5712e73ccaa2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7fe3cee36352c74cbaaff52e863bd0da1170affa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Going from 40 seconds to 1.
The issue is that wait() doesn't care if there was
a signal emitted already, it will just wait 5 seconds for a new
one. But we don't care, we just want to know that there was 1.
Pick-to: 6.7 6.5
Change-Id: I96f1f00bc6171ccc6e5b2f033fa407de5cf0c0c3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 65494fbd3dff16d4476b5ac8c04df830d9fd61e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Our general strategy is to support the latest two iOS releases,
as most people upgrade their iOS devices quite aggressively.
But given that iOS 18 is not out yet, and that people still
spend some time upgrading once it's out, we don't want to be
in a situation where we effectively only support iOS 17.
Fixes: QTBUG-128678
Change-Id: I959794944807e5b6b5e56f22d3c57977bc4f2aee
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit e2c4a1669e5b6496d52e2f55a94bd7d4f4469b98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Call sites of qt_mac_toQColor may not necessarily check the NSColor
for nil before passing it to qt_mac_toQColor, as seen for example
in the QCocoaColorPicker implementation.
Without an explicit nil check we ended up returning a valid QColor
with all color components set to 0.
Pick-to: 6.7
Change-Id: I0cc36049fca05a6b668c0c610bc40eedbc72df3a
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 271bfe4a5405309dc8d48807d6f28d174efb2cc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On some platforms, localhost resolves to both ipv4 and ipv6 addresses.
In that case we might get multiple emissions of the
socketStartedConnecting signal, for Happy Eyeballs.
Pick-to: 6.7 6.5
Change-Id: Ib39a167bdde2089106c89a3e297cbb0ad2f357d9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 13a0f294b5ef2ec8a2057d72365f989ddf6290de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
You cannot direct-initialize a pointer variable with a comma
expression. Need to wrap it in an extra set of (). Instead of that,
wrap with {} on the outside, to make it look less like Lisp.
Amends 0ed039fd134fb8025236847295681f13f1775847. On dev, a follow-up
change has already removed the code in question, leaving only 6.8
affected.
Change-Id: I8d03093849d0bd7b868703218b48b5cb9d2a18f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Now the caller of toJavaObject() is be able to get
an object of Void type when the input parameter is QVariant<void*>.
Fixes: QTBUG-128586
Change-Id: I6eea670788461e4eb0d8f38a4a872c2c4759bdd8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit e02813eeb5e3f3475541b50ba8d21a7bc724e698)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's customary to add such a comment when an inline function is not
defined in the same header it is declared.
As a drive-by, remove the pure attribute from lastIndexOf().
Q_DECL_PURE/CONST_FUNCTIONS are only useful for out-of-line functions.
For inline functions, the compiler sees the body and can determine
that they're pure or const (in the __attribute__((const)) sense)
itself.
Found in API-review.
Change-Id: I27aa5cfaf21b1015a6c8b9e4773a1c2c5134a226
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3b812f0409c50c6a3fd1d66a9c18bc323e0a0ca3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Same result, but less templates to instantiate, so should be faster to
compile.
Found in API-review.
Change-Id: I43ebb94c73c6b4462441a7ae85a67909f6894ba3
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 13d2d55957c52c4f2270248be57dc18bea507236)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a popup is visible, we're not supposed to send pointer events
to other windows than the popup. It doesn't matter if the popup
doesn't want it. But currently we end up doing so anyway, which
mean that we would trigger items elsewhere in the UI.
This patch will instead make sure that always return from
processMouseEvent() after sending, or forwarding, it to the
active popup.
Note: some styles in Controls (e.g macOS) has a menu window that
is actually substantially bigger than what it appears like on
screen (to make room for a drop-shadow). This means that a mouse
press can happen outside the visual borders of the menu, but still
inside the popup window that contains it. And this is also a
reason why some bugs related to forwarding of mouse events only
surfaced on some platforms (Ubuntu), but not on others (macOS).
E.g for a Menu in a MenuBar, the menu window on macOS would actually
be placed on top of the MenuBar and block pointer events from reaching
it (because of the menu shadow). While on Ubuntu, since the menu has no
shadow, the press would instead trigger the MenuItem in the MenuBar.
But by never forwarding pointer events to windows other than the
active popup, such differences will never happen.
Note: we should actually forward pointer events to the window under
the mouse if QPlatformIntegration::ReplayMousePressOutsidePopup is
set (and WA_NoMouseReplay is not set). But this API is currently not
reimplemented after QGuiApplication was refactored to support popup
windows also in Qt Quick. And ReplayMousePressOutsidePopup seems to
be false on all platforms other than Windows.
Change-Id: I55692cf2cae4c8f9e46976b105660bca96bd65e6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit fc9af570507bf067a182ab3f1c2f51a29f59e38c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... since no consensus has been reached about what to do in Qt7 (whether
to fold QChronoTimer back into QTimer or let QTimer be as-is to not
break any existing code and use QChronoTimer in new code).
Task-number: QTBUG-128426
Change-Id: I7d09b803b4f0df3ea7f48a5d900d0ae4be721d7b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 87030778969165a285af2d919d6d7293e8078b6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It effectively was, relational operators should be, and
comparesEqual(), which calls equals(), actually already was marked as
noexcept, so also mark the out-of-line function.
Found in API review.
Change-Id: I3fce2277f328284e098afeee40c319a7ba85fefe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit e358f3158cc2d5c248b5626f15e556414fc0cd6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The inheritance is probably unnecessary.
As a drive-by, initialize all the members to silence the original
Axivion warning.
Task-number: QTBUG-127539
Change-Id: Iba9d8f2cba246616dbb6e8e9b7b21e8589af84d9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit de3dd3878c2305be81d539e768788e2713c81423)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of reading the PE header we can try to retrieve the stdout
handle, and if it's present, we have a console, or redirected output.
This amends commit 639437cf34783573e14d35ceb68ee8d9de495d7b.
Pick-to: 6.7
Task-number: QTBUG-127732
Change-Id: Ib6dd1a37552519fd867e7c39e588a085513f97e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Zhao Yuhang <yuhangzhao@deepin.org>
(cherry picked from commit dfa52e3ae63432c1bfbb70b258ba96f7bfa5d3b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This probably wasn't triggering anything, because the class happens to
be a template, but don't let the poor guy that will de-templatize this
come Qt 7 run into this.
Also add the customary "defined in qstring.h" comment.
Found in API-review.
Amends 3d0eaf863edeed9095b35026974a54cc7d418962,
9b945b381a78b56b14d46ec314f0f69264ac0602,
4c931155043af6bbd9c36475fa8d3cb14e65f644 and
b977ae371a753a82e1d0bb32c5b62099da663721.
Change-Id: I45b2a808dca5ea335a1771df9cfeb4e67bd185f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
(cherry picked from commit 183a775f80a029136416c75a66f74e4c099e0d32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
tst_qfloat16::ordering tests that qfloat16 can be compared with a long
double. When on x86_64, conversion from qfloat16 to long double leads to
a linker error due to undefined reference to __extendhfxf2. This is a
bug in the VxWorks' toolchain. It has been acknowledged by WindRiver and
it's being tracked in ticket 00154117.
Since
- this is a platform problem and Qt has no control over it,
- the conversion won't work for any client code anyway, so not testing it
is not hiding any issues,
mitigate the problem for now by not compiling the problematic test code
on VxWorks.
Task-number: QTBUG-115777
Change-Id: Icf81da405d1392ae3bcacc61745a54d68b849b89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6ef631c7992cc81ead158c5c5801f689b21fc378)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes a build problem on VxWorks because their runtime library isn't
libgcc.a and is thus missing the symbols that the Clang emits into the
test code when the intrinsic is used. This also better aligns the CPU
check with what QtCore does.
Drive-by add a comment explaining what this is and why Darwin is
excluded.
Drive-by clean up of the CMakeLists.txt, especially the no-ops.
Task-number: QTBUG-115777
Change-Id: Ib15e33ce157f7e6d99d0530076de6a1024733ed6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5f522947878690bf7b99ff4b39a6cbaa259b74b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow the dynamicCast/dynamic_pointer_cast implementation for
objectCast/object_pointer_cast since a qobject_cast can fail
just like a dynamic dast.
Also see: https://eel.is/c++draft/util.smartptr.shared.cast#6.2
See commit this commit from 2013 for more historical context:
a094bf5a893c3cccffff10c1420bfbe3a3c02a7c
Pick-to: 6.7 6.5
Change-Id: I9a54af55a7a1cf106cace52e9cf3bc103ae0bd42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7a65abb50eb638de445e24c2746d7f90c1b89f06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDateTime::fromMSecsSinceEpoch(qint64) exists since Qt 4.7,
and Qt 5 had a fromSecsSinceEpoch(qint64 sec, Qt::TimeSpec spe = Qt::LocalTime, int offsetFromUtc = 0);
so writing fromSecsSinceEpoch(qint64) is backward compatible, "since 6.5" is confusing.
commit f46c18c6273897edfd13d68121741ff8fe8f434f erroneously added
\since 6.5 to these overload.
Change-Id: I91027dcc2e4f20bfc7af643c349131a7f53d8367
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 780d5a089c0fe1db8dc59d4c61d5bb86a4d97b5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindowContainer forces a native window if it has a scroll area or an
MDI area as an ancestor. This breaks if WA_DontCreateNativeAncestors is
set, because the window container logic assumes that either there are no
native widgets in the parent chain, or all of them are native.
To avoid this problem, don't turn the window container native if it has
the WA_DontCreateNativeAncestors attribute set.
Task-number: QTBUG-128029
Change-Id: Ifca50c9abd7175a0af5b62b196a86a463a11be31
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 14481614439a2fcb1f7f3d7820334f5af50be732)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a non-polymorphic class, so explicitly export only the
out-of-line methods.
Amends 4503dabfbd11c084c2781a679c9af12d5fb8f763.
Found in 6.8 API review.
Change-Id: I600d355a3b3abd321841dfc33030de9e5707c38a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 81bcff5c78954eab091856d28eca69784c0889c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Small, trivially copyable and trivially destructible types should be
passed by value.
Found by an Axivion Scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I870b276a22dca55eac9afac8713cc81bf8ddcf32
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f6e964d0f67b0f1324986fb63a23cbbac78dc503)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Be more precise in how to pass CMake variables to configure.
Task-number: QTBUG-128424
Change-Id: I0f3e7d049fa861631587a4fb79e93be54319bbee
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
(cherry picked from commit 0a4d023e5fd2bd166503a27591c456991f680823)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a small and trivially copyable type.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: If8efe667f8b7a40038d904386ef2fed15cd8f94d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 9e0c3e85b5d102442ad519a3454d7c63fddf920d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch updates the tika-mimetypes.xml MIME types definition file to
version 5101bc7fb090ed7deffe56837d7633c9485a1e5d, which is currently the
latest on upstream main.
The reason for the change is to include audio/flac as an alias for the
nonstandard audio/x-flac MIME type, which enables QtMultimedia to
automatically determine a suitable file-extension for FLAC audio files.
[ChangeLog][Third-Party Code] Updated TIKA MIME types definition file to
add the audio/flac MIME type as an alias for audio/x-flac MIME type.
Pick-to: 6.7 6.5
Change-Id: Id2596f5aea55041a1cbbdcbfbd7500b652444bad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 265187518d13571ff2b991a00ec0011df61f7ae5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For QRhi this has been done not so long ago, but it seems the individual
classes, for example, QRhiTexture suffer from the same: the genereated
docs list the forwarding header, that does not exist.
Fixes: QTBUG-128548
Change-Id: I6a58caf45fa9bbfdb5b91311d7484c0954ad63e1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 35791751a21f709d00726fb495bebc707f90a166)
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The code implements parts of the event handling as lambdas in
the constructor. This makes it hard to see what the constructor
code itself does.
Instead, move the initial handling of the emscripten::val
event to event handler functions, which then call the existing
process event functions.
Change-Id: I3abc5be47b080c772c699c21f2fe1cc555ff8192
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 3117d88cdf2324a7833cdf9ceecc4cba30e1e090)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The private implementation already uses QByteArrayView, so the fix is
trivial.
Amends c6438054b91b7017b95706677e0194ed4f1e9e7d.
Found in 6.8 API review.
Change-Id: I41a62557ca82d31a814ceb3f5079a60ca8c437c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 525bbfb5dfd1a5f3a6e4a5bc0126714232e20f9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We do have an implicit constructor which allows construction of a
QLocale from the QLocale::Language enum values. It will be used when
doing the comparison.
However, do not rely on the implicit conversions, and provide the
operators that explicitly do the right thing. This also allows us to
save an extra allocation of QLocalePrivate.
Found in Qt 6.8 API review.
Amends 71bbc35a3774ba7411970ff74068f5211b73e425.
As a drive-by: fix the order of the test slots in the unit test.
Change-Id: I37f8f5881469b7734705e06e471746814dd2ddf0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 403b1abcad5f437c51dfabd7095b814e99e197a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QLocaleData::c() simply returns a pointer to a static constexpr array,
so it can be noexcept. The Q_ASSERT there simply checks internal data
consistency.
QLocaleData::findLocaleIndex() uses a QVarLengthArray, but the size
is hardcoded at compile time, and the implementation does not add
more elements, so it will never allocate. The static
findLocaleIndexById() helper can be made noexcept, because we
already made most of the QLocaleId methods noexcept. This allows us to
make QLocaleData::findLocaleIndex() noexcept as well.
Resulted from 6.8 API review, so picking to 6.8.
Change-Id: Iaa9ccaa127f2ba13235b9c0f91a72048067266f5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 205c64bd112e074920557f34bef8a3807350f7e9)
All inline methods simply operate on ushort members, so they can be
noexcept.
The withLikelySubtagsAdded() method operates on static constexpr
array of locales. It does not allocate and cannot throw. The asserts
are there to check the internal consistency. So, it can also be made
noexcept.
Consequently, withLikelySubtagsRemoved() can be made noexcept, because
it only calls withLikelySubtagsAdded(), and does some trivial checks.
The only two methods that cannot be made noexept are:
* QLocaleId::name(), which obviously allocates a QByteArray
* QLocaleId::fromName(), because it end up calling a static
isScript() helper, which allocates a QString.
The isScript() helper possibly can be rewritten to avoid allocations,
but that's an exercise for another patch.
Resulted from 6.8 API review, so picking to 6.8.
Change-Id: I9e98df31f9c13171bc005250024aa4ffb0faedb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2485aae3ff3fa56833009f4766e53068667a7435)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt's foreign windows do not take (full) ownership of the native handle,
so our platform window implementations take care to not fully destroy
the native handle in their destructors.
But if the foreign window had a QWindow parent at the time of
destruction, and we fail to decouple the native handle from its
native handle parent, the destruction of the QWindow parent may
bring down the foreign window native handle as well, as part of
deleting the parent QWindow's native handle.
We take care to selectively do this decoupling on macOS, iOS, and
Android, but were failing to do so on XCB and Windows. This has now
been corrected, which allows us to remove the workaround in QWindow,
which was also in the wrong place (before setVisible(false) on the
foreign window child).
Note that we do not unconditionally reparent the foreign window, as
it might be a foreign window used for containing other QWindows, in
which case we don't want to mess with the native view hierarchy.
Change-Id: Ic526ca63fbf72dae5013ae9e44cb5cddf61c944b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 8f8ce8d7a7e029e62a4f9b5b209dcc37f61410cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Strictly speaking, the problem has nothing to do with QRhi. What is
special with the eglfs' backingstore is that it creates a QRhiTexture
and then pulls out the OpenGL texture ID via nativeTexture() right
afterwards.
In this setup there is nothing that would ensure glTexParameteri is
called to override the silly default of OpenGL. Normally this cannot
happen because once the QRhiTexture is used for sampling purposes
together with a QRhiSampler, all necessary state gets updated.
Starting from Qt 6.4, with the QRhi-based backingstore composition
changes, the special case where we create QRhiTextures just to get the
underlying OpenGL texture got introduced.
Ideally the eglfs side should provide its in MIN/MAG filter state, but
in the meantime, to be more robust, always set a MIN filter already in
QRhiTexture::create(). For most textures this will get changed
afterwards.
Change-Id: I305cdbb5576b977887b85a15b72455bb3ae430c4
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-123551
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 88aa5250d58900653192c45e41f182ec88474e38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QListWidget/QTreeWidget::setItemWidget() take ownership of the widget.
This was documented for QTreeWidget but not for QListWidget. Unify the
wording with QAbstractItemView::setIndexWidget() (which gets called by
setItemWidget()).
Pick-to: 6.7 6.5
Change-Id: I272a20b7e7be13df1ddd9f2ba552dd9da68e2a3b
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 53c6c73c57d36796577a13fd4dd82a04ee9647ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Having the actual const_iterator::operator++() as an out-of-line
member function means that the implicit this pointer forces the object
onto the stack (registers don't have addresses that could be
passed). Since const_iterator is now merely a thinly-disguised
pointer, that would cause terrible codegen.
So, apply a technique originally developed for QStringView and make
the operator an inline function that re-sets the member dirEntry using
a call to a QDirListing static function that takes and returns by
value. Passing by value enables passing in registers, which means the
iterator object can now be a register value and doesn't require
spilling to the stack to call the function.
Found in API-review.
Change-Id: I9f4d5be5b72249b368ef3dea9d857178ca7e16aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aec8398d71d351e956683a695af51317fe65097e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The std::input_iterator concept does not require copyable, only
movable. This makes handling input_iterators safer, because copies of
input iterators since advanced zap into partially-formed state without
changing their bit pattern. If the iterator is, however, only movable,
no such zapping copies can exist.
Take advantage of this and make QDirListing::const_iterator
move-only. Its iterators are anyway no longer compatible with
classical STL algorithms, so we're not restricting their use further.
Found in API review.
Task-number: QTBUG-125512
Change-Id: Ic1dee22881893fdbf159bbfd335c10505eaffa9f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 29dfcc240b3e29d5d6149c2996cfdb9d71b776bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
std::weakly_incrementable doesn't require a std::input_iterator's
post-increment operator to return anything¹, so don't.
¹ https://eel.is/c++draft/iterator.concepts#iterator.concept.winc-14
The return value of post-increment on objects that model
input_iterator is partially-formed (as a copy of an iterator since
advanced), so any attempts to use it, apart from assigning a new
iterator or destroying it, are undefined, anyway.
Found in API-review.
Change-Id: If0c07250cec4e48c6e5176cd23864651e8ec3d27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit fd89fc8c27460e2c11d9e3decc38cf61c186f984)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no need to carry the same QDirListingPrivate* around
twice. Remove const_iterator's direct QDirListingPrivate* member and
re-use the one from its DirEntry member.
Requires adding a private const_iterator::atEnd() helper function,
because while const_iterator and its member functions are implicit
friends of DirEntry, friend functions of const_iterator are
not. Improves readability, too.
Found in API-review.
Change-Id: I82b9273950e174d7598ee531fbd5dfb472911b71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0ede7f541dfc6cba163e1452aee7239818a42c1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This simplifies the implementation, and is more secure, because you no
longer can compare const_iterator with const_iterator and get a
non-sensical result (unequal, even though copies of each other).
Requires the STL algorithm test to be ported to C++20 ranges, because
classical STL algorithms can't deal with decltype(first) !=
decltype(last).
Found in API-review.
As a drive-by, make the reversed and inverted operators conditional on
!__cpp_impl_three_way_comparison.
Change-Id: Icd0e4dac277bd3b053f7b648f8c3f9d9f3753299
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 2569ca0f34fe15a2e5c828b708f1406be8d53836)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some vendored 3rd party sources or libraries may not have a CPE
because the upstream disappeared, we don't know where the files
originally originated from, or no CPE was ever issued.
Given that the 3rd party files are shipped with Qt, they can
be considered as part of the "Qt" CPE for vulnerability tracking
reasons.
In such cases, we should add the Qt-specific CPE to the SBOM to ensure
that the SBOM is as complete as possible when tooling analyzes the
third party packages.
Task-number: QTBUG-122899
Change-Id: I32a70e24742a860198f3a6b12bdb4a06057f1ab3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3cadd4b1f62479cce88c99cd8c95729ac10a6126)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The range guaranteed by std¹ for nanosecond resolution is ±292 years,
not ±292 million.
¹ https://eel.is/c++draft/time.syn,
https://en.cppreference.com/w/cpp/chrono/duration#Helper_types,
std::cout << chrono::floor<years>(nanoseconds::max()) << '\n';
Since, in general, there is no integer type with ≥ 45 bits, but < 64
bits, the practical limit for milliseconds remains, indeed, ±292
million, so the QDateTime docs don't need fixing.
Change-Id: I5ae7f9706f147c6f490ba17b10cebe96426bbba2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 051488c5faf5410e938978d4c1609c7a85074c57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Platform window may be destroyed during update request delivery.
For instance, in Qt Quick a user may close a window using some
animation with QML ScriptAction.
To handle such a situation and prevent a crash due to a dangling
pointer, we can simply protect the platformWindow pointer using
QPointer.
Fixes: QTBUG-128516
Pick-to: 6.7 6.5
Change-Id: I49ecec09d62e184f5df17794b303f147b705e2e3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ef1a338a91659871675514921f9a7dc8d1c8805)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
requestUpdateHold was not getting enabled properly in some
cases, in particular when using a custom html file to load
the application.
The assert on g_mainThreadEnvetDispatcher is also asserting,
with a following dereference of a null pointer.
Change-Id: Ibf77d90b84f8319a894e2df34a134d2e4265fe05
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 10afdc339e08ce1e6a8173df97a3f2edeb27cb57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUuid is a) trivially copyable, b) ≤ 16 bytes, so as per [1] should be
passed by value. Clazy, indeed, complains, so fix it.
Found in API-review.
Amends 2fbece8a73cb2d2692c78c38e1576c0c9c62fce7.
[1] https://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/
Change-Id: I321ebd650dac8e58c173d957259c3700b1f59ace
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7550f0e2c1a4ca10a0e4604e2d429b98481d4e2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On some platforms (Windows and macOS) it has been observed that the
platform layer removes all screens, without providing a dummy screen.
This results in QGuiApplication::screens() being empty. As updating
the cached DPR for a window is part of the window moving to a new
screen, we have to guard for the case where the window moves to
a nullptr screen (because QGuiApplication::primaryScreen() is now
null).
We use the QGuiApplication::devicePixelRatio() fallback path, which
returns 1.0 if there are no screens.
Fixes: QTBUG-128390
Pick-to: 6.7
Change-Id: I3ba20590047f1ef49c8d3ac5b7556b814a105ce4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbf957de5feded9cbbd60feacaa08c9902815c38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 521e091bca1764d53ac06bb60707475d1032f5d5.
Reason for revert: The fix doesn't work with MSVC2022 compiler and block windows-11_23H2-msvc2022-developer-build integration. Need time to find proper solution.
Task-number: QTBUG-128498
Change-Id: Id938fa2119c7e4c053398b2a3693f3128e53f734
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1017a0eaf1f9fd9cc37189f73840d85bf4a5664c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It seemed to be common, yet undocumented knowledge how to pass CMake
variables to configure / qt-configure-module.
Task-number: QTBUG-128424
Change-Id: I10e896402aa0a9e1add8746765bfcea955417ee1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 13e096b49ecd7d77ba8b43ee8ff58f7db05d9f6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Despite the name, it doesn't contain the definition of QMetaObject
(that's in qobjectdefs.h), only of QMetaMethod, QMetaEnum, etc.
Replace the include with qobjectdefs.h.
Found in API-review.
Amends fa456ad5501dc74446329222d12ba0fa2ecd0457.
Change-Id: Ic7fb83c07a866ca981b100e68cc0529bd13e929f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 248a1ce4bdb2b211a812db4783354f7fbc2ff662)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the behavior more bounded, by disallowing keeping large sets of
buffer data for reuse.
The idea being that once I uploaded say the Sponza model (e.g. 10 MB of
vertex data merged into one blob), it is not beneficial to keep that
huge allocation since the total size of the data from per-frame buffer
changes will be in a whole different (smaller) league typically, and the
chance of another (single) buffer update that utilizes the whole 10 MB
on its own is rather small.
Have a simple (and cheap to execute) rule that no batch keeps more than
1 MB of QRhiBufferData (in total, regardless how many buffer operations
it contained/contains). If the limit is exceeded, we clear().
The catch is that even without doing the 1 MB check, there is a high
chance that the Sponza model data will be gone in a few frames
eventually, due to implicit sharing and how the QRhi backends and Qt
Quick(3D) work and shuffle their resource update batch requests and
submissions. So for many applications this is expected to change nothing
when it comes to their memory consumption profile.
Expand the comments further.
Change-Id: I93061d073b43e747a0772a3119ebdb89bed02ae0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit bc2c09a182c2bc80c307e7e71e0f12c1c31edc3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of speculating about resource update batch pools, have a
toggleable debug message that shows exactly what one needs to know. Set
qt.rhi.rub to true to enable. Note that it is not a qCDebug since we do
not want isEnabled() checks no matter how cheap on hot code paths.
Rather, the state of the category is checked just once on
QRhi::create(). As we want some output from QRhiBufferData too, this is
static (setting the bool flag may not be entirely thread safe
technically but we can live with it).
In addition, harden size() and constData() in QRhiBufferData, although
these d != null checks are a waste of time with the current
implementation, but be safe.
Remove the unused QT_RHI_MINIMIZE_POOLS environment variable. This is
forgotten completely by now and serves no practical purpose. Those who
want a proper release of all pools should call releaseCachedResources()
(i.e. QQuickWindow::releaseResources()).
Expand the comments as well.
Change-Id: I4942cf7c3f2ecff47991e42e14c61b432f232170
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit cbab56fdcbff6965d2aafd0c00eebacb7809ceba)
Make sure this works as it should. The bug report/support request wants
to have a String[] parameter on the Java side, but then the C++ side can
not use jobjectArray (as that has "[Ljava/lang/Object;" as signature),
so use Object[] instead (which is one solution; the other is to use
QList<jstring> or (in 6.8) QStringList on the C++ side.
What's easy to miss is that the jobjectArray that we get is a local ref,
so we have to extend its lifetime by creating a QJniObject holding it as
a global reference. We can then create a QJniArray from that QJniObject
(without any type safety).
Task-number: QTBUG-128456
Change-Id: I1e03b811165f9bc5106324d39fb58114ee8cf398
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit f9fd5870f7379103005839bc03543bb8f6da94c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Should be just "timer" instead of QChronoTimer.
Change-Id: I76cb9ae712cfe9a9713a85888022e54300d308d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a5f1cec8bf22f19bbf7ffe058c407d5045e4126a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add some notes on the prerequisites when building a sql driver from
source and also add some more notes in the troubleshooting section.
Pick-to: 6.7 6.5
Change-Id: I8ffbcf4182c2ad2c7b9f86209e0ce332fd27d73c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1f31c5f3cd722f06e4f41457ec1322365d78c018)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Mention QTimerEvent::id(), which returns Qt::TimerId, instead of
QTimerEvent::timerId() which returns int in the API docs.
Task-number: QTBUG-128144
Change-Id: Id19aebd044fbd734872e5580efcb3842eb42b2b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7595c21be86f247dd419d08d7d26327fe2d7a736)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QGenericUnixServices does not derive from QObject, the connection
to QDBusPendingCallWatcher made in the ctor might outlive the lifetime
of QGenericUnixServices.
Fix it by explicitly disconnecting it in the dtor.
Fixes: QTBUG-125239
Pick-to: 6.7 6.5
Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de609d84b9cee4a481d1718c00b09105d8c2ae69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... as is required by the standard.
We have already found that QAnyStringView::max_size() can also not be
static (because the size depends on the charset of the contained
data), so we have a second reason (besides STL compatibility) to
change the current static into non-static max_size() member functions:
Qt consistency.
Found in API-Review.
Amends 7ce6920aacfcba485cd8017e01c6aeb324292e75.
Fixes: QTBUG-128450
Change-Id: Id5ee3fec82bc557bd83b6843838ccdd753442cd0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6d5e39f4756945b8ada74d745bd949856c1b17f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends commit 880d1aef99a6826c8dd690b13e1ca6ea5574f403 and
extends it to cover the testlocales program under util/.
Pick-to: 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I3efadc69ce08810876f8e20aa4636c7624728153
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 00644f4b6d69d82a8d27f3b0619de88c0e4fdd6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
max_size() will be made non-static to strictly follow the C++ Standard
Library concept, but it makes no sense for the Qt containers to have
allocations limited per instance, as they are not allocator-aware. This
commit adds a Qt-style camelCase() function to the STL-style
snake_case() with the semantics we want.
Task-number: QTBUG-128450
Change-Id: I2e4aa228c71c821c01bafc0f37956d29fe652ef1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6306ebe749e083126a39b9dd13d7060aa7bdacc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Container::max_size() is a _non-static_ member function in the STL, so
we can't call it as C::max_size(). Instead, use the newly-added,
Qt-style camel-case maxSize(), which we will keep static constexpr.
Task-number: QTBUG-128450
Change-Id: I839df90a91cced85f000c7d2744ba547f629ed98
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6c15f99853c4cecd9285e189a441392a397b0f82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fixes the documentation side of an issue with QTZ::displayName()
not doing what's documented. (The MS-eccentricities have been fixed by
earlier work.)
Fixes: QTBUG-84297
Change-Id: I3ec522aa81741fbf2d3dd247786310304e14f304
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b3a00a38af1226ebd6617638872d540f1ecd76df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That requires including qcontainerfwd.h to the headers, so that
we could get access to QtPrivate::MaxAllocSize.
The max_size() methods are added for compatibility with stl.
The logic for most of the views is similar. The only exception is
QAnyStringView, because its character size may vary, depending on the
contained data.
The maxSize() methods are the static equivalents of max_size().
QASV does not have it for the reasons mentioned above.
[ChangeLog][QtCore] Added max_size() to all string-view types.
Amends 7ce6920aacfcba485cd8017e01c6aeb324292e75.
Found in 6.8 API review.
Change-Id: I467c7d64ec3d92eb424eb5b94a39ec3d45d63d1f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2382bfb5b03f6f03a31981dc416121cf556b962a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtCore][QTimerEvent] Added constructor taking a Qt::TimerId.
Also added a getter for Qt::TimerId.
[ChangeLog][Potentially Source-Incompatible Changes] The protected
(and undocumented) QTimerEvent::id member variable has been renamed to
m_id to allow for the addition of an id() getter that returns a
Qt::TimerId.
Task-number: QTBUG-128144
Change-Id: Ia156f11e9e9347b6bf61b36e40da3ad551d23407
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 29b98eabf07b9e9d223039ec58b989acbaba844c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If widget A starts at y=0 and widget B starts at y=19, when the mouse
moves from y=15 to y=18.6667, the code was doing childAt(p) with a
rounded QPoint y=19 and finding B, but then the relative coord for B
was set to -0.33333 so B wasn't under the mouse and didn't get an enter
event (and since it's now the "last receiver", it doesn't get one later
either when y is bigger).
Add QWidget::childAt(QPointF) to fix this.
Fixes: QTBUG-128391
Change-Id: I76d4b711a8297648780bdd079eb67405ab12be14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 40bde8a572bd8ed039d3f5a5ab99b281de7410bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead specifying Interbase_INCLUDE_DIR and Interbase_LIBRARY allow to
use Interbase_ROOT instead. Use this new option in the sql driver
documentation.
Additionally add 'fbclient_ms' as possible library name so we don't need
to distinguish between Interbase and Firebird anymore.
Change-Id: I472f95f82ebb93888002deccdf5028a1827a4745
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 89dd15e359228a57351bddc2429db4d57863bc8f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a small and trivially copyable type.
As a drive-by, make the operator a hidden friend.
Found by an Axivion scan.
[ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] Made
the QSslError::SslError QDebug operator<< a hidden friend of QSslError.
This means the operator is no longer a match for arguments implicitly
converting to SslError, only for SslError itself. A backwards-compatible
fix is to make the conversion explicit: debug << QSslError::SslError(arg).
Task-number: QTBUG-125026
Change-Id: I9b6673397b6a26d508783304240c91fa058139bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit f02402044e552f2940d4677039f3d02c41eb27ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch is about removing noexcept on functions that use
Q_ASSERT. The argument is that in these cases Q_ASSERTs act as
precondition checks, so we should probably follow the Lakos rule.
Although, technically the change is fine, because the current
implementation of Q_ASSERT is marked as noexcept(true), there are
some ideas of changing that in future, so we should not be setting
in stone something we can't change later.
Found in 6.8 API review.
Change-Id: I1d4aa228c713821c0ebbfc0f3b956d29fe652ed8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5ac15093dcbaf92ac166961f5e8bfe9418cc15c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all module and
plugin files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only
Also, LGPL and non LGPL should not be mixed in a given directory
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I3384e5a4e40547d61118064fa1052b3d87a4e42b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit bdee35195126d230f6229b5f22d4d4a7bb15d4d1)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use !QT_CORE_REMOVED_SINCE(6, 7) to make the function a template
in new C++20 code. The removed_api.cpp will still compile the
exported version, keeping BC.
This simplifies the ifdef'ery around the functions and saves the
need for the QT6_{DECL,CALL}_NEW_OVERLOAD trick.
Picking this change down to 6.7, because the original patch was
also picked to 6.7.
Tested it on MSVC in C++20 mode, and verified that the symbol
is still there. Also tested the case from the linked bugreport,
and verified that it does not give linker errors.
Amends 88702cc87cf830b145c8bff5174748e3719364f9
and effectively reverts 91f48cc4b77b1cfb5a4490c3bed3eb97edd2f85a.
Task-number: QTBUG-125610
Pick-to: 6.7
Change-Id: Idf49fd142cdc78ff8964a36f8c1e326357e1028e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d23764c5a12e0d6d26dd54ee5613f7e5b1f9c8af)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The fusion style was the only style which checked for an undocumented
property '_q_isComboBoxPopupItem' to determine if a CE_MenuItem should
ignore the drawing of a checkmark. Remove it to be in sync with all
other styles.
Task-number: QTBUG-127536
Change-Id: I6f0af2219a2da1d8d1920cb95c233fb3e32a21ab
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a3568a19eaba98697854db50af5546c09464ca73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The combobox dropdown items are drawn as CE_MenuItem elements. Those
elements may have a checkmarks but not when we draw them within a
QComboMenuDelegate. Therefore add the same check as for fusion style to
avoid drawing a checkmark in a QComboBox dropdown menu.
Fixes: QTBUG-127536
Change-Id: Ib22046b018fdf36eb26518899d2427d40b0110b8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c2d56961394cea799b0caa241c3517ed88aa6c66)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Formatting indicates that this was how it should be rendered, but qdoc
won't paragraph-break unless there's an empty line.
Add it.
Amends 7ce6920aacfcba485cd8017e01c6aeb324292e75.
Change-Id: Idfd3cbc9f075b5f206c2042dc7b22508735dcb38
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 02b436f2c5d7368827794e7ec1224419dca39e7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They match what QTimer already provides these days, and we want to
minimize porting for users come Qt 7, so we don't want users to first
write QChronoTimer::singleShot() (because it exists) and then back to
QTimer::singleShot(); we want them to continue to use QTimer.
The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.
(No ChangeLog needed, as QChronoTimer is new in 6.8)
Found in API-review.
Fixes: QTBUG-128426
Change-Id: Ief8b7c8d25380c0e9e9c5c36c90ce34c147557ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6e5eb082c934cb94c45f3e13b3f7c2deb2e7b2e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port the new-style singleShot() static methods from milliseconds to
nanoseconds resolution.
This matches what QChronoTimer provides, but we want to minimize
porting for users come Qt 7, so we don't want users to first have to
port to QChronoTimer::singleShot() and then back to
QTimer::singleShot(); we want them to continue to use QTimer.
The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.
The old-style static methods were already ported in the first step,
which also contain the ChangeLog common to both patches.
Task-number: QTBUG-128426
Change-Id: I1899465c3b852ab546983a0bf35853fdd3f91ef3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6991e848e3a0470e301d006a799b1351909884ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This requires giving up unique_ptr for a raw d-pointer:
https://stackoverflow.com/questions/9417477/where-does-the-destructor-hide-in-this-code
That isn't much of an issue, because the class is move-only.
Also add a swap() member function.
Found in API review.
Change-Id: I2478bb5d05ff7bae0111ba97e788c88f7b4dded1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 71167b7982be4d7a9090aa6b0e0846d5e9bf303b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port the string-based singleShot() static methods from milliseconds to
nanoseconds resolution.
This matches what QChronoTimer provides, but we want to minimize
porting for users come Qt 7, so we don't want users to first have to
port to QChronoTimer::singleShot() and then back to
QTimer::singleShot(); we want them to continue to use QTimer.
The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.
The new-style static methods will be ported in a second step.
[ChangeLog][QtCore][QTimer] The singleShot() static methods now
operate with nanoseconds resolution, like QChronoTimer. The rest of
QTimer remains milliseconds; use QChronoTimer if you need a QTimer
with nanoseconds resolution of more than INT_MAX milliseconds
range. Beware overflow that may occur when passing large milliseconds
objects that may overflow nanoseconds::rep when converted.
Task-number: QTBUG-128426
Change-Id: I11e1ad8529c67b4018f6325ac408686799475823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e911bda295b53bc74cf1af26008b3e60181668d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the tests for the (move-)constructors and move-assignment.
Change-Id: I795a314a0e6d1795006fe152397eb6d9eeb3c712
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b6466275c27f9ec4ec8b09641e203f7afef3f7e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QArgumentType::name() getter evaluates the name lazily, which also
involves constructing a QMetaType. It's not entirely clear if adding
noexcept there is a good idea, so drop it.
Amends 5a0faa9198c6ae6e21a550159c4284d1a9c5792e.
Change-Id: I73042f22df9615f570823a7745f04e9731c097fe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e39eb34bc6585c5ec367727e86f70ce67c2d176a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In QChar we don't return the upper-case from when it's not
representable as a single QChar; for strings, the uppercase string may
be longer than the original.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I57bb1412d79d579a9cc4dc6bdbb839e56f9ea0a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65eb1c5579ec56d15583b4af45b50fddd3c799a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With the introduction of QQuickPopupWindow in 6.8, much of our popup
management had to be moved from QApplication to QGuiApplication.
Most of this was done in e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9, but
closing popups on window deactivation and orientation changes, were
left in QApplication. This code path was used to close popups when the
user clicks outside of a window, on platforms suchs as wayland, were
QWindow::setMouseGrabEnabled(true) doesn't work properly.
As it turns out QApplication::notify() never calls
QGuiapplication::notify(), which is why I'm duplicating the code from
QApplication into QGuiApplication, instead of simply moving it.
Task-number: QTBUG-121363
Change-Id: I36bebd029a2f8e3ec0cdbab40971682cf948d438
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 914c2ef4fb926c16e8874c9c3691401f7e22ae22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUtcTimeZonePrivate accommodates the custom time-zone API and, as
such, needs to know all of its details when constructed. The
constructor as a plain UTC-offset constructs the details to match a
custom zone, so that it also has those details initialized. As a
result, this backend never initialized a zone from only its IANA ID,
as all the others do, so does not need an init() with that signature
(which did not adequately initialize the instance anyway).
Change-Id: I462f537c9d48e09f05f91aae0ff6c7a317b421c1
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
(cherry picked from commit 70b680502997678b7c9964acef6569b18b6a65bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
c661dbd42d87f151e0c6f9e50fb21a137dad850c injected `QT_NO_INT128` into
every TU when compiling for VxWorks.
VxWorks uses a custom stdlib implementation that does not support 128bit ints
and at the same time they use an off the shelf Clang that defines
`__SIZEOF_INT128__` which is used to detect if 128b ints are available.
This resulted in Qt falsely assuming that 128b ints are available.
Detect if 128bit are available instead of injecting `QT_NO_INT128` and
define `QT_COMPILER_SUPPORTS_INT128`, use it instead of directly
checking `__SIZEOF_INT128__`.
Task-number: QTBUG-115777
Change-Id: I7531ebe780b4bdd78b42daf8dae0e522a316a88e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5a10744bb4afc0c95b1b7bbba8848cf14b0bad00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt attribution json files might want to specify more than one PURL or
CPE for a given entry. Change the build system code to detect whether
a JSON PURL or CPE key contains an array of values, and if so, convert
it to a cmake list and use that for further SBOM handling.
As a result, the PURL_QT_VALUE, PURL_3RDPARTY_UPSTREAM_VALUE, and
PURL_MIRROR_VALUE getting an 'S' at the end, aka they are renamed to
PURL_QT_VALUES, PURL_3RDPARTY_UPSTREAM_VALUES, and PURL_MIRROR_VALUES.
Also the attribution key is now called just PURL instead of
UpstreamPURL.
The CPE json attribution key and option name stay the same.
Amends 47fd38be4bce0958fcfce8080d1580c4e3c2a15b
Amends 95b7fe49900904d19fca21876c84f97c2a6ae03d
Amends f7e1123620b623be0c321b54eaba7a1d618a7ce1
Task-number: QTBUG-122899
Change-Id: Ieec919901c3b44df80bc196536f68632a9761d92
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 797ce76ee946245898f9d11fa7e3ffb889e117d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All the actual code of the module was subject to #ifndef QT_NO_DOM,
aside from the *_p.h that were only included subject to such #if-ery,
so there's nothing left of the module if the feature is ever disabled,
but be consistent with the module defining a feature that allows that.
Convert #ifndef QT_NO_DOM to #if QT_CONFIG(dom) (and move to outside
the namespace, where nothing was inside without the define), require
feature dom in the *_p.h and test, change CMake config to skip the
test when the feature is disabled (and add a missing SPDX comment),
condition including sources on the feature.
Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: Ie2167b6c56d96c7804785e225f3fe02dbc78984c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a4c85a5cf19d8919797aba41077bfa8796427f54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By using Q_ENUM_NS macro.
Amends 4bc0834bc182335984431c6a1525782efc34368c.
Found in 6.8 API review.
Task-number: QTBUG-128144
Change-Id: Icb3b4e76e0c36066d480b1f756c5a9c8aa5cb43f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6e2705bbc891d5ddd4924815a641830d2a0ccf4b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since the QtWindow and its QtEditText are focusable only to hand
over events to other components, the QtWindow itself should not be
focusable by TalkBack, since this leads to an unnecessary nameless A11y-Element
in the A11y tree.
Task-number: QTBUG-126672
Change-Id: I532b9d3e252fbe01da7c953446242b045c57eebe
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 46cb9027f1ed6c61faec5364b5537ae7ab9e57c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a non-polymorphic class, so we should export only individual
out-of-line methods.
Same for the nested DirEntry class.
Amends c39a0d1e8956e042139ce3065681e4c5d07412f3.
Found in 6.8 API review.
Change-Id: Ifde785d9ece1641351501159963d8cc065d8e140
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7394f7151404e0649eb59d8fa84eb7061635ee70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the same technique used elsewhere in qmetatype.h to deal with
missing features: define a new macro to either contain the types
controlled by the feature or be empty, and then call that macro from
the larger-scale one.
DRYs the list of types to not repeat QByteArrayList and QStringList.
Amends cdbc76360ae4c12b25923a7cb392355a6485fc70.
Change-Id: I767452aa33c1a2404315a0c3cd02f7102b9d6653
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fbc80ee163f16baafcc236b533ea7ccc3376fa2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is only available when calling setDragDropOverwriteMode(false)
so this makes no difference in most applications (see implementation
of QAbstractItemView::position).
QTableWidget::dropEvent() was assuming we were dropping onto items
without checking that this was the case, this is fixed here,
and QTableView::dropEvent() is added to handle moving rows,
with very similar code to QListView::dropEvent().
Task-number: QTBUG-13873
Task-number: QTBUG-101475
Change-Id: I96e75da2c0abf6f568edba461735905dee5cb84f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 8e63cf282cb248ddd7fbc908766091659b3a0b22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These all cannot fail, so can and should be noexcept. Most were
already.
Found in API-review.
[ChangeLog][QtCore/QtGui] All qFuzzyCompare() and qFuzzyIsNull()
overloads are now noexcept.
Change-Id: I67a2981ea4af9be0370becf84103822fd766ab5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6a3a28236c6a0c34d37a614ca4e68ccd136d90e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is important for the reparenting to take effect even if there
are no other state changes to the window, such as changing its
geometry.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I9b39b56d163faf7a9b472cefbb19efdb944cb304
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 92619ce2ec8381aa01647337665e626b84063f59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implemented the virtual method moveRows to allow row movement.
Used it for the case of sorted insertion.
Heavily based on QListModel::moveRows and its unittest.
[ChangeLog][QtWidgets][QTableWidget] Implemented moveRows in model.
When sorting is enabled, setItem() now moves the row to its
sorted position, emitting rowsMoved rather than layoutChanged.
Task-number: QTBUG-69807
Change-Id: I62a150cca4e5b7d982f2359a6d8c248494528cac
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f951c11586081efea108ea5b6a7028c672e12c2a)
Instead specifying CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH use
PostgreSQL_ROOT which is suits much better for the usecase.
Change-Id: Iac239d88d4c9c11d5482acacb2bbb1bb034c4365
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit a664a6e225abdd4a62aac57df10e3507fcd2b561)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The dependency is specified for the Ninja generator, but is missing for
others, which leads to the invalid order when building with Unix Makefiles
generator for MacOS platform.
Amends 103eca1070a75bfa97d0b72b94e0c759ef0bcd1c
Pick-to: 6.7 6.5
Fixes: QTBUG-127987
Change-Id: I78927ee3fa7b0926f03b0e5eab67983c4d0d3e67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 2d87bb7d2eb9827899546cca3e59e8174ce04b8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead specifying Oracle_INCLUDE_DIR/ORACLE_LIBRARY use Oracle_ROOT
which is suits much better for the usecase.
Change-Id: I8a0858b3ae491212a79ad982eb8e067e6f1b750f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 5e478ebbcc42471b4c70c10bb513e7343c05933e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The macro was unconditionally defined since
44a74127954dce2416842a6644cbdff4c513b6fb and, despite being named like
a public Qt macro, never documented, so just remove it.
Also means we can remove the ODR protection from end() and cend() now.
[ChangeLog][Potentially Source-Incompatible Changes] The undocumented
Q_STRINGTOKENIZER_USE_SENTINEL macro was removed. It was
unconditionally defined since Qt 6.0.
Change-Id: I8ba2aeddea79ad89cef8912e9cf34098f2793f1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 799e16149ce9d34419da9ea35f790412202ce7a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt will at some point require C++20 and then the indented include will
have to be un-indented, anyway, so might was well do it now to have
less work later.
Also sort the <concepts> header in with the other C++ headers.
Amends 52abff8cc1741412c3fa2c9f6d5185cf48f9ef13.
Found in API-review.
Change-Id: Ic092d3c0d47e9ecab0492d533b6a10c2a8227e88
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3ac48281d9971998882612a43cbcf923104ee592)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch updates the tika-mimetypes.xml MIME types definition file to
version 5ea8bbf1644a593ed22ee5c7608ba33aff949d5d, which is currently the
latest on main.
The reason for the change is to include audio/aac as an alias for the
deprecated audio/x-aac MIME type, which is useful in QtMultimedia to
determine the file extension for AAC media files.
In addition, the update adds the application/x-java-keystore MIME type,
similar to the one in the old freedesktop.org.xml MIME type definition.
[ChangeLog][Third-Party Code] Updated TIKA MIME types definition file to
add the audio/aac and application/x-java-keystore MIME types.
Pick-to: 6.7 6.5
Change-Id: I14fa331c5c57e4fae8f8b31880dc66d6ca559f62
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 5774aa2560b65a67e72f98cf2f776325b6760950)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove mentions of pre-C++17 behavior.
Don't recommend against qTokenize() any longer (it's shorter than
"QStringTokenizer") and mention it in the QStringTokenizer class
documentation, too.
Pick-to: 6.7 6.5 6.2
Change-Id: I8cf3310fc9de80db0a89aecfdf695a49d390da47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c1fc85df109a4dff57d7615a353bfcc7e172b0c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead specifying CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH use
MySQL_ROOT which is suits much better for the usecase.
Change-Id: Ieb75f80a6eb3a3e7913a7c04ca6511a014fa7e4e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 0c0b5cbb0d0b43f6be4e54caea89d5764511e94f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do not use the getters, as they are not noexcept. While they could
probably be made noexcept, we're too close to release to make a hasty
change there. Directly access the data members instead.
Found in API-review.
Amends cd5dd8b95bbda1e9531af52c251ea926f125c8ea.
Change-Id: Ic3a6b0f933956d57d2c3b4ebdd5ad40ec4736fb0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 23784ec9d6eca9b138cd2528389e8150ebc66667)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... namely isNull() and op==/!=().
These will be needed for porting comparesEqual() from public getters
to direct data member access, in order to make them earn their
noexcept tagging.
Change-Id: Id8677d39dc581d03adfd3d0d420907ff60c0423a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e0ae91bd5880d1f8ab36d42cff428bb8246f73c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It will need to be called from removed_api.cpp once we widen
QTimer::singleShot() from ms to ns.
Don't use the QAbstractEventDispatcher::Duration typedef in qtimer.h
to avoid including the resp. header. Keep the typedef as the return
value on the definition of from_msecs(), though, as a static assertion
that they're identical.
Task-number: QTBUG-128426
Change-Id: Ib59895f4441e92813fe39778bb3836b039fdfbf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65a249715941bf6b6ecc980d3f865f367f66522d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
size() is obviously noexcept. QStringView ctors have an implied
precondition that the (ptr, n) range passed represent a valid
range. Since this is a member function QXmlString, we can assume that
the class variants hold and m_string itself represents valid (or null)
data, so this operation is also noexcept.
As a drive-by, remove pointless inline keywords.
Change-Id: Ia7637e77005062b6515ceac4b62efaf14a2eb486
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 792bea9be3760f58de4d1c30fbecab0071fe311e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This doesn't change a thing for QTimer, but is a building block for
making its singleShot() have nanosecond resolution, and allows
QChronoTimer to reuse the function.
Task-number: QTBUG-128426
Change-Id: I3d7e79972f236ca63b216a1a5a871edf5025e1b8
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 25b8d3743455bd2a4a327e1068fc83acb2f1c481)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The classical Q_DECLARE_SHARED assumes it's placed right next to the
class in the same namespace as its argument type. If that is not the
case, then the free swap() function might not be found using ADL,
since it was defined in an outer namespace. Since 6.8, we have
NS-aware Q_DECLARE_SHARED versions, so use that.
Change-Id: I2969c641b501b07b4ebb9fce46d2544bf788fc9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 877fe0e7b3aada3f99bbf0415cba9daf97b067db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The include for INLINE_SINCE(6, 8) QTimer API was in the 6.7
block. Move it to the 6.8 block.
Amends a4a679ee796a476048ddee3f88025035cca3631a.
Change-Id: I503428bcb73138af5eaed8f1d1523a448e1bf67c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0dd5b2de4c59e2f0175aba3cf720a47998108330)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add Q_CONSTINIT to the c_locale variable to statically assert that
it cannot fail (no runtime initialization = no failure). The
QLocalePrivate ctor is already constexpr, so Q_CONSTINIT works out
of the box here.
Because c_locale construction is now known not to fail, c_private()
cannot fail, either, and can and should be noexcept.
Change-Id: Ibe94cb4bcd990fbd0b440dd98509eb39447a94b7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c745b59e36b421039e71779fd9e5db8c619163f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So the value is at least sufficiently large even if int could not
fully represent it.
From the API review.
[ChangeLog][QtNetwork][QNetworkRequest] The transferTimeout() function
now returns INT_MIN or INT_MAX when transferTimeoutAsDuration().count()
cannot be represented in an int.
Change-Id: Ic37ad5bc19ea7da4041c989acd3b989923d48cef
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7fb3a18282281023bd8e47e9dae79dbab3660848)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since we show an alert dialog for the user to let them know the loading
failed, and accepting the dialog will finish the Activity, there is no
need to call finish() right after showing the dialog.
Change-Id: I954ba1d0b77591665baf2f1e0eb94567768902db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 55fe33f794c1961f2c691b91fe58525dd1a203e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Methods with preconditions can't be noexcept (from Marc in code
review).
[ChangeLog][QtCore][String Views] Added slice() methods to
Q{String,ByteArray,Latin1String,Utf8String,AnyString}View which work
like sliced() but modify the view they are called on.
Found in API review.
Task-number: QTBUG-99218
Change-Id: Ic8ef3085f7cfac86b8404fb28d491ca38ad121eb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8f68bd9e6353a42d3b71d893b27fec6bedced501)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a window is positioned with setFramePosition, we reflect that to
the platform window via QPlatformWindow::setGeometry(), but with the
QWindowPrivate::positionPolicy set to WindowFrameInclusive. On the
platform side the position policy is read from QWindowPrivate to
determine how to interpret the incoming geometry.
When the resulting geometry is applied to the native window,
it's reflected through QPlatformWindow::geometry() and reported
back via QWSI::handleGeometryChange() as client geometry, ie.
without the frame margins.
If the platform layer later interprets this geometry in
combination with the window's positionPolicy, it will incorrectly
position the frame top left at the point of the client geometry's
top left.
It would make sense to reset the window's positionPolicy at
the point of QGuiApplicationPrivate::processGeometryChangeEvent,
but doing so might break situations where there's another in
flight geometry request.
What we can do as a first step is reset the positionPolicy when
the platform window is destroyed. This ensures that the next
time the platform window is created it will be placed at the
same position, even if the initial position was requested via
the setFramePosition() API.
Change-Id: Ic555f19884ccd68c46421d0fe666717170ba7638
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 11a09a9bd0a7e899a918b078a94c6c3b82240dee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The comparesEqual() helper method cannot be noexcept, because the
comparison operators of the underlying QJniObject are not, and
cannot readily be made noexcept, because they end up calling JNI
stuff like jniEnv()->IsSameObject().
Also, the *_LITERAL_TYPE helper macro should be used only if the
operators are constexpr, which is also not correct in this case.
Remove the noexcept specifier from the helper method and use the
*_NON_NOEXCEPT version of the comparison helper macro.
This change is picked to 6.8 and 6.7, because the API is marked as
tech preview.
The 6.7 cherry-pick would require a manual fix, because the
*_NON_NOEXCEPT version of the macro didn't exist back then.
Amends a5d14a9f5cfe41784960fe825609d91b9a18c17e.
Pick-to: 6.7
Change-Id: Ic01c0b09f94b94677a9771d1763518697aafc3ef
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 405cee34297f3cf2a822658ba14922dfaaa8429d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do not use the getters, as they are not noexcept. Directly access
the members of the d_ptr instead.
Amends d292648d0bbac50388dae035dc34782accb3807f.
Found in 6.8 API review.
Change-Id: I69eee9db2274d1e99a4f56e841cfaea223341ced
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 495a06a22aef2aa62dd993217e4f4ec099ad4e94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The comparison operators cannot really be noexcept, because they
call other non-noexcept getters, like QEasingCurve::amplitude(),
QEasingCurve::period(), and QEasingCurve::overshoot().
Amends a4341827ac17c14541ea69c67c76aaae5a09ddcc.
Found in 6.8 API reivew.
Change-Id: I77c01792adbf7d9a7e36d7efec6defbea866b7d2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3cf7eff6265b4321e216f830b2ecf1ee4118fad4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QJsonValue comparison cannot be noexcept, because it might allocate,
for example when calling QCborValue::toString(). As a result, all
the QJsonValue(Const)Ref comparison operators also cannot be
noexcept, because they convert to QJsonValue to do the comparison.
QJsonObject comparison cannot be noexcept, because it might call
QCborValue::makeValue(), which might allocate.
QJsonArray comparison cannot be noexcept, because it might also
call QCborValue::makeValue(), which might allocate.
Found in 6.8 API review.
Change-Id: I775746b2a76765bca26b87d5af396a8dfdfca7f9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7f01b62969d1734832ead0547904902ae0f1b5dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The (in)equality operators cannot be noexcept, because the
QMap::const_iterator comparison is not noexcept.
QMap::const_iterator basically uses std::map::const_iterator comparison
operators, and I could not find any proof that it is noexcept.
Amends ed71387d1cc06afff42ac844a3887778685ce793.
Found in 6.8 API review.
Change-Id: I9014052588a7864b729a7b8ac703f5145675f860
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit a942a373051ddab40742f213e36fa5851c97b384)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QDoc command `\tableofcontents` was rendered useless by a change
more than a decade ago. Remove the use of `\tableofcontents` as it
serves no purpose, and ensure that the surrounding context still makes
sense for the reader, by removing preceding text that refers to a
non-existing table of contents, such as `Contents:`.
Task-number: QTBUG-128173
Change-Id: Ibb5a6af0e80f70fa487cdf6a7e38009a9ef60cbf
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit cd8244131e2d6fe2c2453ae40213e7f12bff893d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implementation calls QMetaType::id(), which may call
registerHelper() to register a custom type, and that surely allocates.
Amends 5a0faa9198c6ae6e21a550159c4284d1a9c5792e.
Found in 6.8 API Review.
Change-Id: I26979379b8fd12c3d52f6489fb25145ac2fa95ed
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 31d3e57342161a9a8edaebacb968950e6a16d67e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QFileDialog::HideNameFilterDetails is set, the combobox does not
show the complete filter but only the filter name. Therefore we can't
use the value from QComboBox::currentText() when returning the current
selectedNameFilter()
Fixes: QTBUG-127924
Change-Id: I8feb894e5336f2899b42d798558a3c9380669938
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 92e650832d425944037ad6ad3c1d46667f62f454)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The check to see if m_itemView is empty is already
included in the first condition, and the re-check in
the second condition is unnecessary.
eg: A | | (!A && B) is equivalent to A | | B.
Change-Id: I1a9f003bacea076fc1e72765c196a327a21c33b2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 063dad967fbea9649683aa02f457c839e1ab56cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When isValid is true, it must be true; when isValidis false,
whether the conditional judgment is true ornot only depends
on whether !result is true(eg: A | | (!A && B) is equivalent to A | | B.),
so you can optimize the judgment condition to improve thereadability
of the code.
Change-Id: I0231b83e0b50586dff2820b8d0dfc35edec36f70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 03c547f1010868a0ef2f236c6980094efab7e12f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code copied the whole string, then replaced parts inline, at
the cost of relocating everything beyond, at each replacement.
Instead, copy character by character (in chunks where possible)
and append replacements as we skip what they replace.
Task-number: QTBUG-127549
Change-Id: I368482859ed0c4127f1eec2919183711b5488ada
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2ce08e3671b8d18b0284447e5908ce15e6e8f80f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When isValid is true, it must be true; when isValid
is false, whether the conditional judgment is true or
not only depends on whether !result is true
(eg: A | | (!A && B) is equivalent to A | | B.),
so you can optimize the judgment condition to improve the
readability of the code.
Change-Id: Iab621d3d2948d249f6d8a2425bca3f5404c2e1a1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3819ad4ea42b707e7b786b3a8b942d1214533ba6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QSpinboxes used the sizeFromContents from QWindowsVistaStyle, which
produced a too small contentRect for the newly horizontal layouted
buttons on QSpinBox. This patch sets a minimum width for the content
rect, when QWindows11Style is used.
Fixes: QTBUG-124118
Pick-to: 6.7
Change-Id: Ibf58c8da360242587e55f8096fa3157459041ba6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bfe8ac4ebff7a1e8114068f2f46e73c588735690)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was correctly following the RFC, but we overlooked that the
RFC is talking about restrictions on _sending_, while we are
verifying on the _receiving_ end. So, some things has to be flipped.
And the dataSize offset was incorrect and could read out-of-bounds.
Amends d17d260948e16549d82f1fdd4dec98d246b0622e
Pick-to: 6.7
Change-Id: Idb7e00637398dff190fc4e5b9776a8649a04f391
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 02d1d638545fd8600fac9707a8f9af03f99197ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Raised in 6.8 API change review. The use of "matches" in a name suggests
pattern-matching, which isn't what happens here.
Task-number: QTBUG-125859
Change-Id: I8aa05b117807b9d1b9b737cd63d44fb4a30f6fa5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6b36e5de7656e1d9e23364c596cc82f8068d4452)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implementing QtNative.AppStateDetailsListener under QtActivityBase
exposes the methods as public API to users, where the class
AppStateDetailsListener itself is not public API, so move the
impelementation to the QtActivityDelegate.
Task-number: QTBUG-125859
Change-Id: I9b358a5e9cd9970a2ead11df77b3761a8e7e6c07
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 6e2b92c1b1d229aae56fff9ae4487ce41ca50680)
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Provide VxWorks-specific code to handle keyboard. Note that there is no
support for changing keyboard leds on VxWorks.
This is preparatory change as there is no Qt evdev support for VxWorks.
Task-number: QTBUG-115777
Change-Id: I314f8f1b42501b601d39e65080f2bea4002cc693
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
In order to provide support for device detection using evdev on VxWorks,
we need to exclude not compiling parts of code for touch handling for
this platform. For now, provide necessary headers and defines, remove
incompatible code for evdev tablet and touch handlers.
Note that this is a preparatory change, as no touch device is being
detected for VxWorks yet, nor evdev is enabled for this OS.
Task-number: QTBUG-115777
Change-Id: I042d2fd464bbe23516646c02ae10354aefe82403
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Provide VxWorks-specific implementation of keyboard and mouse device
discovery, and enable usage of evdev on this platform.
Task-number: QTBUG-115777
Change-Id: I9370ac085aa58c72e2d39731b78ebd854f5aad9a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
With Qt6.8 QIcon::pixmap() no longer scales the size by the devicePixelRatio passed to QIconEngine::scaledPixmap(). This means that external icon engines now must be adjusted to honor this change.
[ChangeLog][Important Behavior Change] QIcon::pixmap() is fixed to no longer scale the size, passed to QIconEngine::scaledPixmap(), by the devicePixelRatio.
Change-Id: Ic93e10a81cd58fba4580c3f1522cc27e2b05cea5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ecc13e3d41af89bd195e6f173b2c96d2295f407e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The configure options '-sql-<foo>' and '-no-sql-<foo>' did not work as
expected because they were overridden by some ancient
'plugin-sql-<foo>' option. It looks like an ancient relict from Qt4
times where you could specify if a sql driver could be built as plugin
or as built-in module which is not supported anymore since Qt5.8.
Pick-to: 6.7 6.5
Fixes: QTBUG-128337
Change-Id: I7f0a0cf4b1dd11af32c48b50ceacf0f26eafffcf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 8a0c86651f1e5091c4fb5ef8cbbcef53a9e336eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The static min and max moments of QDateTimeParser are local times.
Now that baseDate() needs to check whether the start of the two-year
century falls between these, and parsing of simply a date or simply a
time (not a date-time) uses UTC, to comparisons involve mapping the
local time to UTC, with the usual associated expense. Do that
expensive operation once on creation of the min and max local times,
so that it'll be cached for use by the comparisons.
This shall also help with other comparisons to max and min, so is of
use even before the introduction of baseDate(), for all that that
change brought the issue to light.
Thanks to Jøger Hansegård for analysis of the profiler data that
revealed the root cause of a significant slow-down.
Pick-to: 6.7 6.5
Fixes: QTBUG-124465
Change-Id: I539c8ae782717635fb722c4573d85bc63073958a
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b6a11a4ee5319366f14c11c7cf3a4f1dbf33cfd5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They never belonged there and their presence implied cases for them in
switches on type that make no sense. Presumably it was just a handy
enum in which to declare some constants, but we can do that with
constexpr class members these days, without compilers grumbling about
unchecked members of an enum in a switch. One of them wasn't even
referenced anywhere, so dropped it entirely.
Pick-to: 6.7 6.5
Change-Id: I304cdb07cd86e8d7e926c316729d68fc7770afc5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit c7e75b2b8da79d736e9d01d81959fec66c4c90e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit ba24125cbfdbe78b48e8000ee6030f0d81a86491.
The funImpl() functions were specifically designed to be sharable
between the fun(key) and fun(key, def) overloads. Making the return
statement a template argument turns one function into two, duplicating
the executable code. It doesn't even improve readability much, so
revert to returning pointers as a poor-man's optional<>.
This re-SCARY-fies the functions, also adapting the code of the
heterogeneous lookup additions that were introduced later.
An alternative would have been to use qxp::function_ref, but that
produces a lot of code itself, as the recent removal of it from QtTest
has shown, and it's not required, either. KISS applies: the old
return-by-pointer was the most simple implementation possible. There
is no need for a type-erasing function wrapper here.
Change-Id: I8570ce5acd6d6e98321e4003919651cd97cad83e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cdc04b96dd8a69d0310e1474008b48128d050450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function takes `fn` by universal reference, so it should be
`std::forward`ing `fn` before calling it. This includes the
unevaluated contexts, so use `std::is_nothrow_invocable_v` and
`std::invoke_result_t` instead of `noexcept(fn())` and
`decltype(fn())`. The std traits take the value category into account
automatically. Linters like to warn about universal/forwarding
references without std::forward(), so this should be fixed even without
and actual overloaded op() &/op() && present.
The function passed as `fn` may also be marked as `[[nodiscard]]`, so
make sure that we never ignore the return value (unless it's void) to
avoid throwing warnings.
As a drive-by, replace Q_UNUSED with [[maybe_unused]] and inline the
SlotRet type alias into its only user.
Amends f894f04c9d03878116de61c11d4591da67c10378.
Change-Id: I5e045fc735f461a82244d7e80f81c2a9b1e69046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 832e47ca44d3af1b7a3f722bad2a1d0c6fd56b5f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Virtual functions should have exactly one of 'virtual', 'override' or
'final', because 'final' implies 'override' and 'override' implies
'virtual' (CppCoreGuidelines C.128;
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override).
So add 'override' to the dtor and remove 'virtual override' from the
final functions.
Amends af6afad3b390c0ed7de6d3c4314cc394d8f8e2c2.
Change-Id: I65711c4ca87d522fc0d3afc994f8812914eab7d3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e6dab10c32b2d57e8f47e5c16827a3c1560f2e27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Complements ab05e05f60253b9be615c09aa340ee75f2e5bcaf:
Strings: get rid of the last std::char_traits use
LLVM's libc++ became pedantic and insists on only accepting
instantiations for one of the standard Char types, so remove all uses of
it with a template parameter.
Complements dc2ae08e02730ab795445bc047221aa56914f723.
which is:
QStringView: stop instantiating std::char_traits<QChar> and <uchar>
It's deprecated and will be removed with LLVM 19.
Amends b1ee49b46533d39f7fabda68d0bd08a1ab130a27.
Fixes: QTBUG-128325
Task-number: QTBUG-126214
Task-number: QTBUG-122753
Pick-to: 6.7
Change-Id: I2c7fbe3c0f557e98e7edfffdb00b4cc71a6612ca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit b387537d3e9c35d9f112d4aa32ad71df5e5e9028)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do some cleanup:
- use qsizetype instead int
- use default member init instead in ctor
- remove unneeded functions
- make a getter const
This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208-
Change-Id: Ibb02bd93a130c5d60bf431608666a5ad1fe71ead
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4bf7cc2440bb09578d95e8eea51ebfbddd2897e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Ubuntu 24.04, when the SuperKey is pressed, Qt only receives XI2
input events sent from the slave pointer devices on a mouse click or
a mouse move, but does not handle those XI2 input events.
Fixing this by allowing Qt to handle such an XI2 event and generate
a QMouseEvent for it if it is not handled previously.
Upon receipt of an aforementioned event, check if the event
is a duplicate XI2 event. A duplicate XI2 event means that
the XI2 event was sent from another device previously.
- If it is not a duplicate event, the XI2 event is passed to
QXcbWindow to be handled. Eventually, a QMouseEvent is
generated and sent from the GUI for the XI2 event.
- If it is a duplicate event, ignore it.
Note, part of commit:3bc0f1724ae49c2fd7e6d7bcb650350d20d12246
is re-done with the fix.
Fixes: QTBUG-110841
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I93beddef7261c37ddbe8bfdb6ae08c95f8f155c5
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b71be292780b858f2c55ce92601452e2ea946de2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove all \since 4.x comments in widgets/dialogs - this is no longer
of interest.
Change-Id: I4835be8c16363b13615ffc921454e2b5ade295eb
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b5bb8897d0809bae4e414c74420440255fc5b08d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH to find the correct database
includes and libraries does work but is nothing which should be
documented here - it's a common way to specify common paths for cmake.
Documenting this here just confuses the user (which already has hard
times to compile the plugins by itself).
Change-Id: I0cb051f06f3c71f005290700e3b6c32da9a0b2b5
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e279dd8c20794810292047c8c84f309e8aed004b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By using {QString,QByteArray}::begin() instead of data() (for const
objectst); both begin() methods, respectively [1], return nullptr for a
const null {QString,QByteArray}. Whereas data() returns &_empty if
QT5_NULL_STRINGS is defined.
[1] QByteArray::begin() since a116b2ddfc9e91736b1ec4edda6500e9c8f5f301
QString::begin() since 287ace562ee5ddff22f7dbf4e49ae5f0520f2308
[ChangeLog][QtCore][QLatin1StringView] Creation of QLatin1StringView
from QByteArray or QByteArrayView now preserves the origin's isNull()
status. This matches the behavior of creating a QUtf8StringView from
those types.
Change-Id: Icbdfe282e315c08ca6a17201bcd32c1a3bba8bf5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 221d8fdfb14c16472267320f859105f1a3834952)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implicitly detect macOS cross-compilation in case the value of
CMAKE_OSX_ARCHITECTURES is a single arch that is different from
the real host macOS architecture.
In that case, the build system will implicitly set both
-DCMAKE_SYSTEM_NAME=Darwin and -DCMAKE_CROSSCOMPILING=TRUE.
It will also set those variables in the qt generated toolchain file,
otherwise user projects might not be built with the correct
architecture depending on the arch of the host machine where the user
project is built.
For such a cross-compilation scenario, as usual, a host Qt needs to be
specified during configuration, for usage of its host tools. Which
means that if cross-compiling to x86_64 from arm64, we will not try
to build and use the x86_64 tools via Rosetta.
Fixes: QTBUG-121322
Change-Id: Ib484af445b3fc6eb676b0ee174ac81d63f2f450f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit fc2fa92de02e8b57472058a8281c24775e97d9eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Added missing conversion from Qt::strong_ordering to
std::weak_ordering, std::partial_ordering.
- Added missing conversion from Qt::weak_ordering to
std::partial_ordering.
Usage of Q_IMPLICIT specifier in new std::*_ordering conversion functions leads to following ambiguity errors on WIN + MSVC configuration:
C:/Users/qt/work/qt/qtbase/src/corelib/global/qcompare.h(334): error C2440:
'static_cast': cannot convert from 'Qt::weak_ordering' to 'Qt::partial_ordering'
qcompare.h(334): note: 'Qt::partial_ordering::partial_ordering': ambiguous call to overloaded function
qcompare.h(249): note: could be 'Qt::partial_ordering::partial_ordering(Qt::partial_ordering &&)'
qcompare.h(153): note: or 'Qt::partial_ordering::partial_ordering(std::partial_ordering) noexcept'
qcompare.h(334): note: while trying to match the argument list '(Qt::weak_ordering)'
For solving the problem we can exclude the conversion function from the argument list(make it explicit in case of MSVC).
Q_COMPARE_CAST_IMPLICIT is used for setting explicit or implicit specifier depending on the compiler type
[ChangeLog][QtCore][QtCompare] Added missing conversions
from Qt ordering types to std ordering types.
Fixes: QTBUG-127670
Pick-to: 6.7
Change-Id: I32a9a33fa8921c75b0e5a40bd413572f1bd6765a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 521e091bca1764d53ac06bb60707475d1032f5d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A developer can cross-compile Qt and force the build of the tools
for the target architecture. In this case, the resulting Qt libraries
and tools can theoretically be used as an SDK on the target platform
without having to rely on host tools or packages.
Examples of this scenario include Boot2Qt, cross-building a Qt SDK for
a raspberry pi on a more powerful machine, or cross-building an arm64
macOS SDK on an x86_64 machine.
To achieve that, the build system needs a way of disabling the
mandatory host path check and the lookup of the Qt6HostInfo package
that are added due to the nature of 'usual' cross-compilation cases.
This was partially addressed in
0f8017efb6d037c4f33f947eb3c56aeafa28313c by offering an opt out via
the QT_REQUIRE_HOST_PATH_CHECK and QT_NO_REQUIRE_HOST_PATH_CHECK
variables.
The change was incomplete though. While it was possible to disable
the _qt_internal_setup_qt_host_path call at user project time, it was
not possible to disable the lookup of the required Qt6HostInfo
package in _qt_internal_find_host_info_package.
Change the code to consider the value of QT_REQUIRE_HOST_PATH_CHECK
also when looking up the Qt6HostInfo package in Qt6Dependencies.cmake
in user projects.
When building additional Qt repos, as opposed to user projects,
where we call _qt_internal_find_host_info_package in
qt_internal_setup_find_host_info_package via the BuildInternals
package, users will still need to pass both QT_REQUIRE_HOST_PATH_CHECK
and QT_NO_REQUIRE_HOST_PATH_CHECK to disable the host path check.
This case is less likely to happen, so no adjustment is made to unify
that behavior.
Additionally make it also possible to use an environment variable
as an opt-out with the same QT_REQUIRE_HOST_PATH_CHECK name.
Amends 0f8017efb6d037c4f33f947eb3c56aeafa28313c
Change-Id: I3b1f35d1540493680323330bddc28c65e88b966f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 98450a332e317aeafa3381abd6266829e8900758)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
C++26 adds std::saturate_cast, so follow the established pattern of
other similar "backported" APIs. The old name is left around while
we port other submodules.
While at it, move qt_saturate's tests to the qnumeric test.
Change-Id: I653a2e3d936081378298a9c8e51e7c1a2d438d83
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7447ad503330ed176cf369792ffb33b7e00a58d3)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The EditPopupMenu requires a View in its
constructor, making it important that we do
not hold a reference to it after that View
is no longer valid.
In cases where we do not have one, top level View
that will stay valid for the lifetime of the whole
Activity, e.g. when embedding a QtView to non-Qt
Android Activities, making the popups QtWindow based
makes sense, as the lifecycle of the popup and
it's corresponding QtWindow should match.
Task-number: QTBUG-126180
Change-Id: Ibb45513de98f79a293a05eeb317d959ac0328dbe
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9e167af3f6a4b2ac192aedd83f5066808d719415)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The way QMainWindow handles dock widget separators is a bit evil. They
are real QWidgets, added as direct children of the QMainWindow, but
painting and mouse interaction is handled by a hook into the QMainWindow
events, via QMainWindowLayoutSeparatorHelper::windowEvent(), which
is called at the start of QMainWindow::event().
For reasons unknown, we also raise() these separator widgets, which
means they are always at the top of the child window stack of the main
window. This is problematic for the situation when a QToolBar has an
expanded overflow-menu, which is also raised(), but where we end up
raising the separators on top of the toolbar again. As a result the
toolbar gets leave events when we hover one of the separators, even
if the toolbar menu is overlaid the dock area, resulting in the menu
closing.
We don't see this visually, as the separators are drawn via the hook
mentioned above, which happens before QMainWindow draws any of its
child widgets, like the toolbar.
Fixing this requires us to selectively place the separators below
any expanded toolbar each time we raise a separator, so that we
respect the request of the toolbar to be on top, while still
ensuring that the separators are above any of the dock widgets.
Unfortunately the QMainWindowLayoutSeparatorHelper hook also
processes mouse move and click events, resulting in the cursor
changing shape when hovering the separator, even if the toolbar
menu is over it.
To fix this we amend the logic of finding a separator widget
based on the mouse event position to also querying the QWidget
childAt() function, and if we are over a tool bar, we bail out
instead of looking for a separator on that position in the dock
area layout.
As the special separator logic in QMainWindow is conditioned on
the style returning 1 for QStyle::PM_DockWidgetSeparatorExtent
the test checks for this, and skips if another style is in use.
So far only the macOS style is affected by this. See the original
change in fba33a6bbc09bb278df75829d8d705863d40a6a3.
Fixes: QTBUG-124733
Pick-to: 6.5 6.2
Change-Id: Ifc741336bd9725ef0fea9f0474e27b7481f3a183
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3d99f90b50ab22ef5ab4433c57f9ee584a0a7cae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The CursorHandles are the handles visible when trying
to select text from a text edit, or select a position
in the text. As it is not used anywhere outside
a text edit, move it inside QtEditText, making it
easier to handle cases where we have multiple windows,
and multiple QtTextEdits.
Task-number: QTBUG-126180
Change-Id: I765f229050ca33887570c1434bdc0a2aa3659649
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 996e1fba5e83e09a897272b16062a8e4fad291ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After refactoring the various keyboard input
related Java classes so that they are more contained
inside their respective windows, this method becomes
unnecessary.
Task-number: QTBUG-126180
Change-Id: I608399e98892752182039b8ece60005670da8224
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9ed29c73674939c772cc6b407881935e7fa19bcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the list view of a QCompleter is visible, it receives mouse events.
A mouse press event outside the completer hid it.
If a virtual keyboard was active, it did not receive mouse press/release
events in case the completer's list view was active.
Add a helper to QGuiApplicationPrivate, that detects a virtual keyboard
under a mouse event position, and forwards the event if needed.
Adapt QCompleter::eventFilter() to use the helper.
If a virtual keyboard one exists and a mouse press event occurs inside
it, don't hide the completer and forward the event.
Add handling of mouse release events, and also forward them to the
virtual keyboard, using the helper.
Add logging.
Fixes: QTBUG-126752
Pick-to: 6.7 6.5 6.2
Change-Id: I613523a9c83b319810397770c43b2eb4ae01c31a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 93ce8f13fc8042eac976a3c911af7d7664e8d5dc)
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
QDoc has a new command, `\qtcmaketargetitem`, that allows for overriding
the content generated for the `target_link_libraries` instructions on
class/namespace pages. The new command must be used on the documentation
for the module, in conjunction with the `\qtcmakepackage` command.
This patch makes use of the new command for a limited number of
Android-related classes that belong to the CorePrivate module. It also
removes the "usage snippet" and drops its inclusion from the few classes
that included said snippet, as that's no longer needed.
Task-number: QTBUG-109214
Task-number: QTBUG-121991
Change-Id: Ic715b6512a26b3b89e24f418295640f9bbda9417
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 4ed994487484b37ff960144806445f8f9ce42286)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) seems to remove some
code in release builds that is embedded in a macro in qtransfrom.cpp.
This patch changes the macro into a function such that it is not
removed by gcc.
It seems like the switch statement is (wrongly) optimized away if it is
embedded in the QTransform::map(QPolygonF) overload. nx and ny are
always 0 (as initialized by QPolygonF) after the macro (but only within
the QTransform::map(QPolygonF) function.
The bug happens only in a release build. Added debug messages of nx and
ny created no output, adding qDebug() << t, which made the macro work.
It seems that a complex combination of macro and switch statement can
tigger the bug in gcc. So rewriting the macro as a function works around
the bug.
Fixes: QTBUG-127723
Change-Id: I7e0b02cde276e591cf773f4e18dd505134421957
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 11b70b66de627d3bd0ef4193d5cfa624c88ac96a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The redundancy in the conditional judgment exists
because QApplicationPrivate::keypadNavigationEnabled()
appears in both conditional branches. Specifically, the
conditional expression can be simplified because
!A || (A && B) is equivalent to !A || B.
Change-Id: I071e349ea4f67a03f89136e2156eb5918a65214f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 792373595d9d9d45f5c43e6a9e3f90c1b7ad54d8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QGuiApplication::primaryScreen() is empty,
dragging it causes a crash
Change-Id: I6c5e48be44db90acec5126957bee60b8514b10a7
Pick-to: 6.7 6.5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit f8e7dfe93ab9622f77aade23707cd6f0b9386379)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This complements commit 30e04340dac26ebd09f9bc8ceb598e873ab63ba7
("Switch to non-strict C++ builds so QT_SUPPORTS_INT128 is true") and
adds the same modification to tools and apps.
Otherwise qtconnectivity's sdspscanner won't compile, as it needs
quint128.
Task-number: QTBUG-119901
Change-Id: Ib9a6fe573e9420a471fdfffd76a2e43d3c5496d8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7e37962cd0d1faf65249e08020619ef7175a280e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Explicitly mention that in static builds Qt itself needs to be built
with the same deprecation version as the user code.
Fixes: QTBUG-125975
Pick-to: 6.7 6.5
Change-Id: I51b1e8b4ecd1731d3ff2320e758a52c5ef2c7cd9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 47ff7d99a06321559d7ab1682869732ea6e08359)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The accent colors retrieved through the UISettings.GetColorValue API
are not theme aware. They will report the same values for both light and
dark mode. We were using the same Accent color value for both color
schemes giving us poor contrast when app is running on dark mode.
The API gives us several shades of accent colors from lightest to
darkest which we need to map to the accent roles in our QPalette
depending on the active color scheme. The following colors and their
mappings are based on the modern WindowsUI3 and its official Figma file:
Light Mode
AccentDefault (default accent color for controls) -> AccentDark1
AccentText/Primary (accent color for links) -> AccentDark2
Dark Mode
AccentDefault -> AccentLight2
AccentText/Primary -> AccentLight3
Fix this for the qwindowstheme so that it affects both the windows11
style and the FluentWinUI3 for Quick.
Pick-to: 6.7
Change-Id: If1c3a909d0a4dc9082e7589eaeaebd05e9f65a29
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d4a2f01976bbb0f8b357bfd96faf9ec249047c95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test function renders a pixmap into a widget that is never shown.
It checks for a crash, without failing or passing.
tst_QWidget::render_graphicsEffect() tests the same code path.
Remove the unneeded test function.
Change-Id: I1b64e0466c5a133deec28d0f74ef5acd9858e1ea
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit dfdcb90ffdec0c3a4f7c1c5c59dfba5c04b8c521)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the oci driver compilable with MSVC 2022 / 64bit. One more reason
to get those drivers checked within the CI.
Pick-to: 6.7 6.5
Change-Id: Iec07adcd4cafde5e028ea306fb88e635a22e2234
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2eb66149131b852f687302417cb2f76ef3184dbe)
Looks like it was just forgotten in the original patch.
Found in Qt 6.8 API review.
Amends 7ce6920aacfcba485cd8017e01c6aeb324292e75.
Change-Id: Ibcc5ec8408b834f1271e632b804efdfb93f9203f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d585c7c0a3e49ba841712ea0b4b19d307b34f249)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This matches what other algorithms do.
This is in preparation of separating the state copying from the
algorithm finishing, to eventually establish code paths that do not
need to copy (e.g. static hash()/hashInto()).
Pick-to: 6.7 6.5
Change-Id: If674cae6b7b3fc3abd3b72f2162532321decadff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 37e360a13f14f19ac0d3ea9ca5d18ca222f3b5a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Let the compiler alert us to adjust this switch in case we add more
Algorithm enumerators.
Amends 633c1365966eda89fc883c039683a727d0a0813e.
Pick-to: 6.7 6.5
Change-Id: I2ce16ac3045d3eebfe74c4080c3b326dd865cf37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0abf0d26a938e9cf7c67d8bf6f6bfdf4e49f1cab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid having too many threads, since iOS punishes us if we overstep 64,
and we don't really need more than 8 on any platform.
Fixes: QTBUG-128290
Pick-to: 6.7 6.5
Change-Id: I59a233d422e9b1b2097a777e0b1b626e144594d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 80f210db3e43c50e252504f41ed3fbd8b2992028)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's failing to produce output in reasonable time and blocking the CI.
Since this test is basically a syntax checker, it not being present for
WASM is not a great loss.
Task-number: QTBUG-128322
Change-Id: Ic49e7523af63d5819c13fffdd7a752534b77f0ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f414505eaac5c222fc6404b9cda24fec25f68a7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Those are generally not in any import path. So far, qmlimportscanner
generates invalid "path" entries for file and directory imports, causing
androiddeployqt to skip them early on. androiddeployqt should rather not
try to read them at all. Then we can fix qmlimportscanner.
Change-Id: Ic87a10bee5845a6b10ee902ba28aed5c060956f0
Task-number: QTBUG-126632
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 67ae983d1e9c75bf31d6fada0b667cfbe2f3fc0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Enable the workaround to sleep and wait for the debugger to attach from
Qt Creator using QT_ANDROID_DEBUGGER_MAIN_THREAD_SLEEP_MS only when
running a debugger and not with all debug apps.
Fixes: QTBUG-128298
Pick-to: 6.7
Change-Id: I0a0866fada27de250fd6946a8ccfd254824d70e0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit e8a35410c4c699ea588791006b36dd363cc25d9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With recent GCC 15 trunk, I started to see:
```
ld: .../kwalletentry.cc.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>';
src/runtime/kwalletd/backend/CMakeFiles/KF6WalletBackend.dir/cbc.cc.o:(.rodata+0x0): first defined here
```
The issue is that constexpr is only implicitly inline for functions or
static data members [0], so the constexpr IsFloatType_v specialization
here causes an ODR violation.
Explicitly mark the specialization as inline constexpr.
[0] http://eel.is/c++draft/dcl.constexpr#1.sentence-3
Fixes: 4b755bc11a8eadd156c65b7474c11e3ce822c6f1
Pick-to: 6.7
Change-Id: Ie9257138f6d1218ca0a91f5d114aab2483cb275b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a06f3e823bea0361125a10dd361f6fd50a4041cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GetWindowPlacement() stores wrong positions in the &WINDOWPLACEMENT
argument's ptMaxPosition member on Windows 10.
(1) Each time a fixed height window is maximized, ptMaxPosition moves
- down by the task bar's height, if the task bar is on top
- right by the task bar's width, if the task bar is on the left
(2) The frame margins' left offset (typically -8) is not respected.
On Windows 10, set ptMaxPosition to {0, 0} adjusted by the frame
margins' left offset.
Fixes: QTBUG-123752
Pick-to: 6.7 6.5 6.2
Change-Id: I8bbd63d93a7648921b703ff6f3e09c4cf2999be2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 33874a9424cd03c21ca9986a39c383b3689f03d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The embeddedwindows example illustrates embedding child windows with
transparency enabled. On Windows, this is implemented using layered
windows with the WS_EX_LAYERED extended window style. To make this work
with child-windows, we need to mark the application as at least Windows
8 aware.
Change-Id: I3a2e4f6018b3d2aee883ab755b63ad75bc8c80e8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 4e7f5c43a3be609502ccc15861319503dc2c842b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, qtprovider was set as the default FileProvider, which
causes issues when creating a custom FileProvider on application side or
having multiple FileProviders.
To address this problem, we have implemented a solution that checks for
all available FileProviders and ,in case of multiple FileProviders,
selects first non-default FileProvider.
Fixes: QTBUG-117417
Pick-to: 6.7 6.5
Change-Id: I2a68983403f964036dc3177e13fe7ea4f9b4788b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d3508d48c0e4ef73a3a673ea14fb59cd8d930398)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a check that the reference we create the TestAXObject object from is
valid, and assert that it is before calling properties. Verify that the
rows we get all have the correct number of children (the columns) before
trying to read the cell values.
As a drive-by, change the relevant code to use property syntax, and
release objects consistently.
Task-number: QTBUG-122751
Change-Id: I1db3e4446c569235cfc0f3092adc7369ad826368
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit dac1a338d31be82004f0f2666105ad18e557409b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify the "populate" functions to always create a new array, rather
than trying to reuse the existing array. Use (auto)release to free the
old arrays.
When creating place holder cells for a new row (where we know which row
array to add the cell to), shortcut the code to not find the row array.
Don't release cell elements that we got from the cache.
Consistently fix the row array size if it's not matching the table's.
Assert some more invariants and add logging output.
Fixes: QTBUG-122751
Pick-to: 6.7
Change-Id: Ie122a4754f6a3f4c19c5412a7c9e589f2861d4ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1f7e926411d1e0d958c37dc597f24101d410c46b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Emit debug output if we fail to get child, row, or column lists from a
table or row element.
Task-number: QTBUG-122751
Change-Id: Id8e4d2e46db089fab8295b314f66163e8c9a893c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 283ff11d0fd3df07d7500020e9af379725af1e72)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This leads to an assert in QConcatenateTablesProxyModel::index()
for instance.
Change-Id: Icd0ae1497705484b021067034c0d8f39049c04ed
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 1ba3277b4c79b80788e2d600840876856ec6933d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise we will not pick up the effects of the QHighDpiScaling layer
to the QWindow size, such as when setting QT_SCALE_FACTOR explicitly.
Fixes: QTBUG-122967
Pick-to: 6.7 6.5 6.2
Change-Id: I9dc914728c5aff28ef52ea3a502c94bcc91738bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 270866923cce6184cd368fc5466e79bf5f845549)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Allow using the follow arguments after '--sign' argument in
androiddeployqt. The previous fix had no effect since we should
consider the argument count first and the type of arguments next.
Amends 9c56a77027db2fedfc2b50f96ceaee5003a7d383
Fixes: QTBUG-128254
Task-number: QTBUG-109619
Pick-to: 6.7 6.5
Change-Id: I34eac4def94c1d0c8d304f383d60c1e21b7dc6a2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit fd2c408af2f300e100d94a386743c7cbe74fadef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As documented in our platform support docs.
Change-Id: Iadcf369facbe5d798827c486e564a6e124f2836c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1bd70d671247a9b0e709fda2a077a9dbf46c276f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By keeping a list of blocked streams we can query just those instead of
any and all open streams when we get additional data transfer budget.
In the future we could additionally sort them by priority, if we start
taking priority into account.
Task-number: QTBUG-126772
Change-Id: Ieab250893e157d2c50b0db2fdc10aa2dc3c38048
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 1e57371695752d4112fa59c89d38e58b977d55bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of keeping the empty QPointer in the hash forever
let's try to keep the hash lean as to not punish iteration
over it as the streams are being created and deleted.
Task-number: QTBUG-126772
Change-Id: Id7afa684a19e6a16726e5bda5debdd2f2bbe86ab
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 94e8bb96304fd2ea2ddfdf2499f4024131a16a8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The AI based Writing Tools in macOS 15 uses the NSServicesMenuRequestor
protocol to interact with custom NSView.
By implementing the protocol we also gain support for service menu items
such as "Look Up in Dictionary" or "Make New Sticky Note".
Note that we only support plain text for now, which means that a rich text
selection will lose all its styling when fed through a service that changes
the text. To support rich text we need IM plumbing that operates on QMimeData.
The Writing Tools feature itself is only available on macOS 15.1.
To trigger it a native context menu with edit actions has to be shown,
meaning this will not work out of the box for Qt Widgets. For Qt Quick
with popupType set to Popup.Native the menu item is added as expected.
Task-number: QTBUG-126238
Change-Id: I2cd4aa9af8d613c7c67b3c19a70a23660dde2154
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 888429a734bf379ee59519b5d6047561df66c9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function is not const, and the access to the hash was
not const, so it would check if detaching was necessary.
Change-Id: Ie46cb89db20c8d9b227d50b4b6c5053dcb5791eb
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit ca735d8d4113490c54671e6a99a89c2379ea68da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When generating HTML output, QDoc references CSS styles that control
the visual appearance. For a standard build of Qt's documentation (a
'local' build, if you will), an "offline" style is the default. This
style sheet is maintained in `qtbase.git`.
This style is not particularly well maintained, as it is not the style
in use for documentation published to `doc.qt.io`. As such, some
issues where found as a side-effect of other work. In particular, an
ill-placed background image in the `@media print` CSS instructions was
found in the print dialogue from locally generated content. While
validating the fix, it became clear that the `toc` CSS class was moved
into an obstructing position in the same media type.
Change the `@media print` definition such that:
- The `toc` class is hidden entirely.
Task-number: QTBUG-124162
Fixes: QTBUG-128205
Change-Id: Ic427036a698d7fc0e07e9190289e5d2c196885d9
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit dd669c84657c48c27318b246db83b82478d6951a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If cacheSaveDevice is false, then if must be true; if
cacheSaveDevice is true, then only need to judge
whether !cacheSaveDevice->isOpen() is true or not, so
the second judgment condition on cacheSaveDevice I think
it is not necessary.eg: '!A || (A && B)' is equivalent to '!A || B'
Change-Id: I5201d54017d2457ba4b92ee99bb968a0961ccbb9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3ecbf28aa6ee43fe967ef219f909f3784e5b3d26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Now that qt.rhi.general is not the only category, this is
not ideal.
Change-Id: Ied3533327dc310cee5fce75fe5760454167161b7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit a537703a4df516da9b7f9126c719a1ccb9271647)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When embedding QML to non-Qt Android apps, it is
possible that the QtView will be recreated, after e.g.
an orientation change. This will lead to a new
QtLoader being created and trying to load the Qt libraries
again, even though they have already been loaded.
Also, once adding support for having more than one
QtView, it doesn't make sense to try and load the
libraries again. Having the loaders be singletons
and checking whether the libraries have
already been loaded avoids this.
Task-number: QTBUG-124114
Change-Id: I2273fc58a8f1268f03d3348b782e74d83759f351
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 092b3a0ff9c24edd0fc60dc436aaefcca2b1939c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtLoader doesn't really handle failures in a way that's visible outside
the class itself. There is the abstract finish() method subclasses can
implement to handle clean up in the loader itself, but it's not visible
outside, which leads to trying to execute paths of code we know are not
going to work, since if the Qt libraries are not loaded the Qt app is
not going to work.
Make QtLoader throw an exception if invalid arguments are passed to it,
as there is no way for the loader to do its job properly if the passed
Context is not what we expect it to be, so might as well exit early.
Make the loadQtLibraries() method return a boolean, letting the caller
know whether the loading was successful or not.
As a result, the finish() method can be removed, and the caller can
handle failure as appropriate for it.
Task-number: QTBUG-124114
Change-Id: I2dc1a0846eb404112f88e9da365db2ab071f4317
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2b48614f68cbf98d6597819749b732556c32cb44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both QtActivityLoader and QtServiceLoader already have separate
members for their Activity and Service, respectively, and
the QtEmbeddedLoader should become more like a singleton, so holding
a reference to the Context, which anyway is only used when setting up
the loading, is unnecessary.
Task-number: QTBUG-124114
Change-Id: I412f4dbd45e48add9ea091eb589c7ef9a3942399
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ae0db7a61de1f0f9b36810a94984c69f5d7e5d1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A Toplevel QWidget can hold a pointer to the screen where it will
eventually show contents, before a QWidgetWindow is created which then
takes precedence.
The screen member of QWindows is always kept up-to-date when a screen is
removed, but not the contents of a toplevel window. If a widget has
setScreen called but is never shown, it has potentially dangling pointer
which can cause issues in the future.
Pick-to: 6.7 6.5
Change-Id: Ia7c80549e8b3c90a75cdde745487e87ecddaca63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d67acf94afffde6a71498be6e30447f3acf7558e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When setting the current index through the related model's
QItemSelectionModel::setCurrentIndex(), the selection can also change.
However, attempting to shift-select after doing so would produce
an unexpected selection, because the internal variable that keeps
track of the start index of the current selection would still have
its old value.
This change moves where said variable is set: instead of doing that
in QAbstractItemView::setCurrentIndex(), it is now done inside the
currentChanged() slot instead. This slot will get called both when
the selection is modified through the QAbstractItemView class itself,
as well as when it's modified from the outside (e.g. from the model).
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-127381
Change-Id: I6d38320e656aa5a102ce079604590672c88ecad1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fb2d64bc57aadf5bf140c72cf7eb2a5f391b7d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The high-dpi painting for the buttons in the QMdiSubWindow was broken
for the windowsvista style because an invalid widget was passed to the
paint routines. This lead to a wrong calculation of the devicePixelRatio
and in the end very blurry icons.
Pick-to: 6.7
Fixes: QTBUG-127288
Change-Id: I0f604ddb4faf66a6e850a1504582076f22418fcd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 8b261a2ad7884f8fe7a93a678c9fce5052e42c98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Provide implementation of QEvdevMouseHandler for VxWorks OS.
This is a preparatory change before actually using this handler, as Qt
is not supporting evdev on VxWorks yet.
Task-number: QTBUG-115777
Change-Id: Ie92418c903a54ea1d6683e08762d4cc88c4956ac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2003532cd84141434f698d723458f0672766fc0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QtEditText only needs focus for the virtual keyboard, focus
should then be removed once we're done with the virtual keyboard.
After this, focus will be received back by QtWindow, which will then
handle key inputs properly.
As a drive-by, remove the default focus highlight on QtWindow to stop
the ugly flickering that happens when QtWindow receives focus back from QtEditText.
Pick-to: 6.7
Task-number: QTBUG-126187
Change-Id: I911e3371d9c582b2805dc895ef49b0d4210714f3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit dc71864d4a358149a2531d324645934e47879dba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If INSTALL_LIBEXECDIR was set to something != "libexec",
qt-configure-module contained the wrong path to qt-cmake.
Fixes: QTBUG-128137
Pick-to: 6.7 6.5
Change-Id: Ic095ff8cb804bbdd72e238e75ac867b7cc3bd478
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 12b0f73a9e9cef35395d0a1560a51604c1c054ff)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
lastIndexOf will convert the `needle` to unsigned char, which is then
'upcast' to int, before we search. But the string itself was searched
using signed char, meaning any values with the signed bit set would
mismatch.
Add tests for indexOf and lastIndexOf.
Amends 4c12ae7e67abc3d9b5847f6b61177ede3ee3203b
Fixes: QTBUG-128199
Change-Id: I0ce7d7d9741f21650ef6f0f012a94e00d84a0f02
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7b1f3bdc503ea7aceacc9fa8d388d843f1d7b131)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to be able to index into the metaobject from code generated by
qmltyperegistrar. And we don't want to rely on some implicit promise
that certain methods are in the "right" order in the output. This is
similar to what we've done with properties.
Change-Id: I8d97b65598338fcff57c6b0866708232066c94cb
Task-number: QTBUG-127442
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 484e72a1074279dca1253ae07515461ad231de3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Check the PROJECT_NAME but not CMAKE_PROJECT_NAME when attempt building
sqldrivers. This should be save since we expect that the project() is
called pre-Qt repo.
Task-number: QTBUG-127953
Change-Id: Ief3f11ba747ded0984ccfe1cfa6b7b47da538137
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3e1a223318dbda50a010ba851841a9e51c80c42b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
eb60e940202857dc155f1a0e499364962faad7f6 refactored the QString::replace
helpers as to avoid a full copy of a string (when detaching) only to
then modify it in order to apply replacements into the new copy.
Unfortunately it also introduced a regression: if we are replacing into
a string that does not need detaching (that is: it's non-static and
there are no shallow copies of it), and the string does not have
sufficient capacity, then the code chose to allocate a brand new string
and do piecewise copies/replacements into the new string.
This is suboptimal, as it precludes the possibility that the string gets
reallocated in place (via a realloc() that doesn't actually move the
string data in memory), which is a huge performance win. (It also
precludes the possibility of compacting the string data "to the left" in
case we do have sufficient capacity, but not at the "right end".)
This caused a 3x slowdown when replacing in large strings.
Solve this by removing the capacity check and unconditionally
reserve()ing enough space so that we can then do in-place replacements.
Change-Id: I921e3ea65222eca8125996d8d3ea77e9c09ba205
Pick-to: 6.7
Fixes: QTBUG-127549
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 315210de916d060c044c01e53ff249d676122b1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead, the package name should be determined by the sub-attribution
target name. Otherwise the build system will try to generate multiple
files with the same name, but different content.
Amends 5daabb5a74c4e7c5d087da7f9207d79d2ee05b13
Task-number: QTBUG-122899
Change-Id: I10b4ec2fe8f38d70d13918dc980d1bd1d9145cb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d624592ca40e05033432de72e0c4d9f6570b5544)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A project's root qt_attribution.json file might be picked up by the
build system when recording system libraries for SBOM processing.
One such case is qtgrpc.
This caused generation errors in qtgrpc with the following message:
CMake Error: Files to be generated by multiple different commands:
qt_sbom/SPDXRef-Package-qtgrpc-qt-3rdparty-sources-WrapProtobuf.cmake
This started happening since the SBOM options are now implicitly
propagated to auto-created attribution targets, and each attribution
target attempted to generate to the same partial sbom file.
Any qt attribution file in the project root is not intended to be
used for system libraries, so explicitly disable using the
root attribution file for all system libraries.
As a more long-term fix, we should consider making the partial sbom
files be more unique.
Amends 5daabb5a74c4e7c5d087da7f9207d79d2ee05b13
Task-number: QTBUG-122899
Change-Id: I67544c299e630597f26602d270cd1dfd54cccfb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 55b399fdcd12bdfc645d4ec7d25b3c881d11a09a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Java QtQmlComponent has been renamed to QtQuickViewContent
as a part of API reviews.
As a result, we also change the opt-in flag
From QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS
To QT_ANDROID_GENERATE_JAVA_QTQUICKVIEW_CONTENTS
that adds an entry to the android-deployment-settings.json.
The flags later will be used by androiddeployqt to enable the
generation of QtQuickViewContent extensions.
Task-number: QTBUG-126976
Task-number: QTBUG-127091
Change-Id: Ie08a9430a5e5a16809f78389144a4a6dfd87ce18
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit be2c03064cdb7bef977d05371e535bedcadb3a0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This class is being moved from QtDeclarative to QtCore as a part of
API review resutls.
Task-number: QTBUG-126976
Task-number: QTBUG-127082
Change-Id: I1c7a20daeb0d398bc6faad441ebae6136b4a88ba
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0acdceed353da61c3c3e1392d0af0d4ecd640821)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtAbstractItemModel used to be a part of QtDeclarative
and is being moved to QtCore based on API reviews.
Task-number: QTBUG-126976
Task-number: QTBUG-127089
Change-Id: I28a921a113ec4f3ad298bf55b40aea334e7721cf
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit baed8a24d07de87da61e9d5e3dbffc8d8ca92918)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These classes used to be a part of QtDeclarative and are being moved
to QtCore based on API reviews.
Task-number: QTBUG-126976
Task-number: QTBUG-126977
Change-Id: Ic269f23ca2292031cda62faf41428667889537d0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 55fc15ce8272073b9b404762b83e3e7acee0111e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This can be used to configure extra cmake args for the documentation
build in coin.
Change-Id: I11417bee9630aebe0bbc118cd843b1536101da71
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b956a909c5ff29bf9824c054750966bdec42c6ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a part of API review changed of Qt 6.8. These private
APIs are being moved from QtDeclarative to QtBase.
Task-number: QTBUG-126976
Task-number: QTBUG-127087
Change-Id: I9bfdb7dea12a2fb6a179d87639364ae28c39243b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4413c81c483fda125928392eb32e3320068a872b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Iterators no longer provide it, because they may need to return a
temporary in some occasions.
Fixes: QTBUG-128102
Change-Id: Ide0a7a84f612fff73afffffd49889321cb70505f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit cb40a1fa7f4b06acced1d17e8333742084092f9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We maintain the CBCentralManager in a retained property, which we
nil when we're done processing the callbacks. But the manager may
still be kept alive by other parts of the system, resulting in
callbacks to our delegate, where we would assert on the check
that the delegate callback manager matched our stored manager.
The conditions for the assert to occur:
- debug build (Q_ASSERT)
- permissions are actually requested
- bluetooth is toggled ON or OFF
This patch fixes this so that the listening delegate is
nil'd and therefore no additional callbacks are received.
Pick-to: 6.7 6.5
Change-Id: I1439881fd55bdfd42bc27ee57f26826fc66c3d85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b45d26f59368f530330b7d547846b5a74d80d585)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace deleteLater with destroyWatcher.
If the continuation is called from a separate thread,
emit watcher->run() can't detect thatthe watcher has
been deleted in the separate thread, causing a race
condition and potential heap-use-after-free issue inside
QObject::doActivate. destroyWatcher forces the deletion
of the watcher to occur after emit watcher->run()
completes and prevents the race condition.
Fixes: QTBUG-126013
Fixes: QTBUG-127880
Pick-to: 6.7
Change-Id: Id5f80ad0ec3fbd2d9c1e0d134aecd6b08ba2c79c
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2bc82f6a1126025affd6e891efc386c08d5fa013)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
text() looks up `text/plain;charset=utf-8` but the hasText() function
has no matching check.
Pick-to: 6.7
Change-Id: Id309cd3bd11003813057704338beb36c65974f4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 014fb179d81456577c745418017e333faeb1f08e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are doubts that the implementation would result in a huge
template bloat. Also, compareThreeWayMulti() seems to be inefficient,
because it copies the tail over and over again.
Rewrite the comparison helper functions to get rid of the
compareThreeWayMulti() calls. This also allows us to drop the asTuple()
method.
Amends ece36a7394594ede3fba6744fb8f5b450a477652.
Found in 6.8 API review.
Change-Id: I8be4e5f56c350039acde78c2e591e29773f3472c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 564f2cbbddbca3f118198f0fb4ca0a97b95b8a59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The ODF writer would ignore the default font set on the document
and just output default values according to spec, such as "Sans"
for the font family.
With this patch, any settings set explicitly on the default font
will be taken into account, granted that they are not overridden
by any properties in the QTextCharFormat.
[ChangeLog][Text] The ODF backend to QTextDocumentWriter will now
respect the default font set on the QTextDocument.
Fixes: QTBUG-124570
Change-Id: Ia937420f7f721bbf3264661160cb0a593907358c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 77a9a208227ecf750d620b3048053fd4fc4299a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
emsdk 3.1.62 changes the EM_BOOL type from int to bool. We were
using int in two places in the wasm platform plugin.
Use EM_BOOL instead to stay compatible with emsdk editions earlier
and and later than 3.1.62
Pick-to: 6.7
Change-Id: I837e76f869225859643dd5a98a28a1eefb5f14a4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 48beca4e7635cf2031c6707042d623c4daf44778)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also split up the CPE handling to allow for more values to be set,
rather than preferring the first one that is encountered.
Task-number: QTBUG-122899
Change-Id: I3209cb5d66f5483c7294b40816431d9df75e00e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 47fd38be4bce0958fcfce8080d1580c4e3c2a15b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using a single PURL for a target is not enough to represent all the
information that an SBOM processing tool might want to know about.
For example for the bundled harfbuzz package, we want to inform at
least about two versions: the upstream version that was originally
imported into Qt sources, and the Qt version or sha1 of the sources
that were used, because the 3rdparty code might have been modified and
there might be new Qt-specific vulnerabilities.
To handle this, we need to generate multiple PURLs for a single
target.
Introduce six new options to be understood by qt_internal_add_module
and other SBOM functions:
- PURL_QT_ARGS
- PURL_MIRROR_ARGS
- PURL_3RDPARTY_UPSTREAM_ARGS
- PURL_QT_VALUE
- PURL_3RDPARTY_UPSTREAM_VALUE
- PURL_MIRROR_VALUE
The first three options take multiple arguments, and will generate a
PURL for each used variant, based on the purl parsing options that
were previously handled. For example passing:
PURL_3RDPARTY_UPSTREAM_ARGS
PURL_TYPE "github"
PURL_NAMESPACE "harfbuzz"
PURL_NAME "harfbuzz"
PURL_VERSION "v8.5.0" # tag
will generate a PURL pointing to the upstream harfbuzz repo hosted
on github.
The next three options allow specifying a purl value directly as a
single string, rather than as separate parts. This might be useful
when the PURL is pre-constructed and read from a qt_attribution file.
Example:
PURL_3RDPARTY_UPSTREAM_VALUE "pkg:github/harfbuzz/harfbuzz@v8.5.0"
When no arguments are specified, targets like Qt modules or Qt
3rd party libraries will have automatically generated QT and MIRROR
variant PURLs that point to code.qt.io and github.com, along with
important info like the version and subdir source path for a given
target.
Third party libraries are expected to be manually annotated with a
3RDPARTY_UPSTREAM variant PURL that points to the original upstream.
In a future change, these will be read from a qt_attribution.json
file.
The final set of generated PURLs for the harfbuzz package might look
like:
pkg:github/harfbuzz/harfbuzz@v8.5.0
pkg:github/qt/qtbase@5018b71e99f?library_name=BundledHarfbuzz#src/3rdparty/harfbuzz-ng
pkg:generic/TheQtCompany/qtbase-BundledHarfbuzz@5018b71e99f?vcs_url=https://code.qt.io/qt/qtbase.git@5018b71e99f&library_name=BundledHarfbuzz#src/3rdparty/harfbuzz-ng
Additionally a few more purl parsing options are added.
Add a PURL_USE_PACKAGE_VERSION option that will use the
qt_attribution.json or custom PACKAGE_VERSION value as the PURL
version, so it doesn't have to be manually specified.
This is an opt-in, and not the default, because some attribution
files contain plain text, white-space separated, strings as the
version value (like the 'sha3' 3rd party lib) which ends up generating
a broken PURL and a failing JSON conversion of the SBOM.
So we have to manually annotate targets that should use the
attribution json package version, until a better way to handle this
can be found.
Add a PURL_VCS_URL option that will generate a PURL qualifier (a HTTP
query parameter) with the given value, to indicate to SBOM-processing
tools what is the upstream repo URL for the package.
They can use this information to display known vulnerabilities for the
package hosted at that URL.
This is mostly useful for the generic QT purl variant, and is
automatically generated for Qt entity types.
Task-number: QTBUG-122899
Change-Id: Ie000b01b478bef4bff6f4803dd39e37b7a8055d5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f7e1123620b623be0c321b54eaba7a1d618a7ce1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They should inherit the version of the 3rd party library they are part
of, and not be treated as Qt modules.
Task-number: QTBUG-122899
Change-Id: Ibf99f4481fbc1acca488fc96cca048298b080d35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit b17dfbbb992b1d38d7a1aeb2b0109bab9cb1e4e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously if an option like CPE was passed to a 3rd party target that
would create nested attribution targets, one per entry in the
attribution file, the CPE option would only apply to the first /
parent target, but not to the nested targets.
This change will now propagate all SBOM options to the nested targets,
but only if the parent target is not a Qt entity type like a module,
plugin, etc, which means it will only apply to 3rd party attribution
targets. The restriction is there because because mostly only 3rd
party attribution targets should inherit the same set of CPEs and
similar SBOM values.
If the restriction proves to be too strict, it will be re-assessed in
a future change.
Task-number: QTBUG-122899
Change-Id: I96cfa046ad611c10877b7a06504b35615b539bbe
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 5daabb5a74c4e7c5d087da7f9207d79d2ee05b13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The separator was changed at CLDR v44 to use a plain aleph, U+0623,
rather than the U+0627 aleph with hamza above previously used. This
is, in both cases, followed by U+0633, "seen".
Task-number: QTBUG-121325
Task-number: QTBUG-126060
Pick-to: 6.7 6.5
Change-Id: I013525e0876c4c47111846135c9311e7b3442dd3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 45ec096672a67db01d29f78e7e910bebab36e31b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unify the wording "running" and "active".
"Running" seems more natural, so keep that wording,
and replace "active" with "running" in API docs.
Change-Id: I300f530d1cfe789f74ed32f57afe9388f2127ead
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 94f87d6d65f42140dbf58b8c6badd1a4c61c8c76)
Empty transfer is caused by using its password,
resulting in a crash
Pick-to: 6.5
Change-Id: I2b208ce48b5abc2adea3278d875f3005cda77a8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8143e85bb4706799f9275c25b2caf72b22b457a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While other compilers don't seem to have trouble with this, the latest
NDK (27) compiler does. That compiler diagnoses the empty-pack case, even though in that case there is no actual use of declval, as the pack-expanded expression contains no use of declval.
For other compilers, that may work for functions that have no arguments, but will not work for any function that does have arguments; in that case, the attempt to use declval will always be ill-formed, and there will be an attempt to use declval.
The fix is straightforward; we have a Ret(*)(Args...), its return type
is simply Ret. So use a simple trait instead of the result of a call.
Task-number: QTBUG-127468
Change-Id: I0dc9e1201914ab94acc2940870be7c6d8cb16c12
Pick-to: 6.7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 236c6ec6f4c777d0534539f1c293cfc74006a6eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix polishing QCommandLinkButton in Windows 11 style: The condition
for QCommandLinkButton needs to be checked before the condition for
QAbstractButton; otherwise it is never entered and the colors from
the Vista style are used breaking darkmode.
Pick-to: 6.7
Change-Id: Ie9e1c20b38a52b2d72f28279e38deb533595b974
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit a17c34d2b7ef8391e5485d0ba06966ece793d184)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix the name of the env var in the debug output for QT_LOGGING_CONF
and adjust the documentation to not suggest to add quotes around the
value of QT_LOGGING_RULES as this will not get properly parsed.
Change-Id: I2da4f841c42c6af6e73d09f19d9baada3582bcd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 753d035e152f0572ba99717d04116a882a506bef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After qbswap() has run, the Id128Bytes active member is data64, yet
the rest of the QUuid constructor accesses .data. This is UB.
Use the void* dest overload of qbswap() or memcpy() the Id128Bytes
into a char buffer and consume data from there instead.
Amends 686c02224c03735356bdab987bf62644eb34cc34.
Task-number: QTBUG-120637
Pick-to: 6.7 6.6 6.5
Change-Id: Iba62a692391a5600b867c30dcb3bc50b82ee072f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f5b7e8a3fbc27082651b8eda08f1fe4ff7d70f3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Despite using different code paths, both stop and then
re-start an already active timer, which invalidates
the id().
While at it, port the occurrences of timerId() to the
modern function id(), which exists in both QTimer and
QChronoTimer
Change-Id: I5db099b198b1c11e1cdbd0fbb30ecece5d0135c8
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit ea0f8cee55e56d0f03ea9a185faee328b5cfa7bf)
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
QMimeDataPrivate::retrieveTypedData() converts if the target MIME type
is text/plain or if the target meta type is QByteArray.
Fixes: QTBUG-127296
Change-Id: I4878533dcb2d4b3e8efefffd17e49ade9fbb32f8
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 05aaf2a684e49d6034f3860fb55a70e75de61e49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of mapping QAccessible::Border to ATSPI_ROLE_FRAME
("A top level window with a title bar, border, menubar, etc." [1]),
map it to ATSPI_ROLE_PANEL ("A generic container that is often used to
group objects."), as widgets using that role (in particular QFrame)
are not top-level windows, but rather containers for other widgets.
[1] https://docs.gtk.org/atspi2/enum.Role.html#frame
Fixes: QTBUG-127552
Pick-to: 6.7 6.5
Change-Id: I565793b6e02903402cfc764e2e38d391a2960af1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a19d66385fc9fa13ce5ee811386ad104c0718941)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we own the byte device we can just delete it directly when we are
done with it.
Change-Id: I9da99943ff61925f6f5416df403bcd747c2558d5
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
(cherry picked from commit 4bc878ff4fbacd39d4c0ed1e8e742fd18fa74fed)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We now assume that is_integral works for qint128 if QT_SUPPORTS_INT128
is defined, so we no longer need to roll our own version of
std::is_integral.
Amends 0d85d0a72fd0136bd89e201d0cc1bf7fac2c24c8 (which is in 6.7, but
we're only guaranteeing that std::is_integral works for qint128 since
6.8, so not picking all the way).
Task-number: QTBUG-119901
Task-number: QTBUG-117637
Change-Id: I0651f1f17c1abfe4dc2b2d08ae4304fc8dcae092
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit da580a12b10f33fcff5783ca595d1c53b5b8b7de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A previous commit disabled QT_SUPPORTS_INT128 if the Standard Library
doesn't properly specialize <type_traits> and <limits> for the 128-bit
types, like libstdc++ in strict mode. As a consequence, we now need to
compile Qt in non-strict mode so QT_SUPPORTS_INT128 is true when
building Qt, at least if the compiler supports 128-bit integers in
principle.
Statically assert that QT_SUPPORTS_INT128 is defined if the compiler
in principle supports it, to catch other problematic platforms early.
We have a few out-of-line implementations that should be built if the
compiler supports int128 in principle, so that Qt users are free to
use the types if their compiler supports them and not run into missing
support in the Qt library. This patch ensures this.
Compiling in non-strict mode removes the early warning we were getting
from it, but a) headersclean still uses strict mode, so at least our
headers are regularly checked and b) this is a cross-platform project;
if we were to use platform-specific extensions unprotected, other
platform's compilers will still complain.
Fixes: QTBUG-119901
Change-Id: I974f95ca0f26085dd0fe5ceb8bbef4f62467979a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 30e04340dac26ebd09f9bc8ceb598e873ab63ba7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It turns out that libstdc++ in -ansi mode defines __SIZEOF_INT128__,
but not the corresponding specializations of <type_traits> and
<limits>. This has caused numerous pain points over time, esp. since
is_signed doesn't work, so qt_saturate e.g. can't be used on qint128
inputs e.g.
After another such issue (cmp_equal()), we decided to require
<type_traits> and <limits> support for extended integer types in the
stdlib, or we will disable Qt's support for it, too.
So check that if QT_SUPPORTS_INT128 is defined, is_signed_v,
is_integral_v and numeric_limits work, too. Disable QT_SUPPORTS_INT128
when compiling with libstdc++ in __STRICT_ANSI__ mode (-ansi or
-std=c++NN instead of (the default) -std=gnu++NN).
[ChangeLog][Potentially Source-Incompatible Changes] Qt's support for
128-bit integers (qint128/quint128) is now conditional on support for
these types from the Standard Library, in particular <type_traits> and
<limits>. Qt no longer tries to work around missing Standard Library
support. As a consequence, e.g. GCC -ansi and GCC -std=c++NN (instead
of -std=gnu++NN, the default) builds will now no longer support these
types.
Task-number: QTBUG-119901
Change-Id: I8529e72a52a2f5da0f469bae543688e18220255f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9bb2ab5978625eee96f703871d5eca8e54b31386)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is in preparation of adding some static assertions here that we
need to have evaluated in both "normal" and "strict" mode, namely
<type_traits> and <limits> support for qint128.
But this change is more general, so making it a separate change.
Turns out we already have (non-static) assertions here about <limits>
support for qint128. These force us to define precisely when
GCC/libstdc++ has gained <limits> support for __int128_t: the
timestamp of the __GLIBCXX__ macro is the Daily Bump immediately
preceding the gcc commit that fixed <limits>
(gcc/8eb9a45e87bdb81cb44948c651edee846c622a0f).
Let's hope no-one is running the prerelease version of GCC 10.3 from
that particular day, otherwise these might become XPASSes. But just
not testing is also wrong; we want to be informed about True Positives
and Negatives here.
Task-number: QTBUG-119901
Pick-to: 6.7 6.5
Change-Id: I6f9be047f846fff74133c466c5bed40d0039d60f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e7c54248987d474cff9f49cad502822eb9dcb114)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows, the windeployqt tool failed if QT_WIN_DEBUG_CONSOLE was set
to "attached", because the following happened:
- windeployqt calls qtpaths
- qtpaths attaches to windeployqt's console
- qtpaths' output goes to that console
- windeployqt cannot read qtpaths' output anymore
Other Qt-based command line tools are also affected.
The QT_WIN_DEBUG_CONSOLE environment variable was introduced to see
output from Gui applications on the console. It should not affect
console applications.
We now determine whether the current process was linked with
/SUBSYSTEM:CONSOLE and ignore QT_WIN_DEBUG_CONSOLE's value in that case.
Fixes: QTBUG-127732
Pick-to: 6.7
Change-Id: Iba7031eed88c7b38cfe3e794c1885b504e4f2ee4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Zhao Yuhang <yuhangzhao@deepin.org>
(cherry picked from commit cef270265fd9bd299e2fe5bb45a7c14002cfe1bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the executable is deployed using the CMake deployment API, `QtWebEngineProcess.exe` should be copied into the same folder where the deployed project executable is, which is 'bin'.
https://doc.qt.io/qt-6/qtwebengine-deploying.html#deploying-qt-webengine-processes
In the previous implementation, the `--dir` argument is used as the
target directory. This commit changes the target directory for
`QtWebEngineProcess.exe` from `--dir` to `--libdir`.
Pick-to: 6.7
Fixes: QTBUG-126572
Change-Id: I07abfc789d439ac66a9ff2706de52a05d80e9b51
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit e56d98cea0c422827cd72c6cb4d7ee43143d5bac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Qt 5.0 timeframe, support for downscaled reading was added to the
png handler, as a help for devices with very limited memory. Instead
of decoding the whole image into memory and then scaling it down (as
happens for most image formats if scaled reading is requested), a
separate reading function was added that would perform line-by-line
decoding and downscaling.
Although this provides a transient memory saving during decoding, it
has a number of drawbacks:
- The scaling routine is simplistic and can create artifacts for
images with transparency, ref. the linked bug report
- The scaled result from the png handler is in general different from
the result of using the common QImage smoothscaling function
- The line-by-line scaling function is generally slower than the
common smoothscaling function, since the latter is optimized using
SSE/NEON extensions
- It adds a redundant implementation of image scaling to the code base
Hence we drop this functionalty going forward. This effectively
reverts 44a9c08eff0647f398863de55e2b62dbd6541e27.
[ChangeLog][QtGui][Image I/O] The PNG handler no longer implements
progressive downscaling during decoding when scaled image reading is
requested.
Fixes: QTBUG-121724
Change-Id: I7b524b12c174c64201b98945ee2fa062ed127f87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit a2a315eaa28edf9c649e13c951fdb1154e3ddf48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of build dir, where it can clash when multiple tests runs
are being done from the same build dir in parallel.
Due to the way platform plugin argument parsing works we can't
pass the full file name of the config, as on Windows this would
include C:, which QGuiApplication will split into two, thinking
they are two different platform plugin arguments.
Instead we chdir into the temp dir, and create the file there,
passing the file name as a relative path as before.
Change-Id: Ia4ea82280e35f4f52b7de74bbf53b2a48ecbaecd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit fd68f894b969b016201e032ba23dac431c19b90a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found during header review, and following status quo in existing APIs.
Task-number: QTBUG-125859
Change-Id: Ib8004dd7fc4f22973be83b45f172003de20d5f90
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 7bcd33fe097925e640f3270f669c3a9a1a30afd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`stenciloutline` clashes with the example of the same name in
qtquick3d/examples/quick3d/extensions/stenciloutline.
Prefixing the test target with tst_ to fix the name clash.
Fixes: QTBUG-127981
Change-Id: I23026523d34abeb09f083e3186273120551bc6c4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 70b431345e00f78fe0f77b92ca86c859c818eceb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If setting a larger-than-default distance field base font size
(renderTypeQuality in qml), an exceptionally large glyph could cause
integer overflows in the distance filed computation, causing asserts
or crashes.
Change the computation types to avoid the overflow.
This improves on b6f962c87f5084eaf962bfb033b1398f80475120.
Fixes: QTBUG-124310
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I48b7dc3c0a0f35859d45c40d03498ac057e9fa70
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 30a753944300c13e96f9239a9891cbc8e2e378c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "Internal" suffix was added to module names, but only in the help
text and not in the option's name. Change this by adding the "Internal"
suffix to the option name in general, rather than just the help text.
Fixes: QTBUG-122774
Pick-to: 6.7
Change-Id: Iaffcde4768a8bf70ba4b8e52cec4ea6490e20bfc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 7c218d20aedd8aaf2c0f2b6954ac400902ae040b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pass the correct arrow rect to the draw arrow function. This amends
0ef5d5dba3e23224c372be9c9f1144c8a73b6a49
Task-number: QTBUG-127104
Change-Id: I78392fb112a0dbf9ac4e034a4dbdc91077b59d24
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 161015d29f9af500d9c3899f9a6aea26f9ca1827)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some old drivers don't return SQL_NO_DATA when all data was fetched
which resulted in an infinite loop. The previous check does not work
when we receive chunked data and the driver returns fewer bytes than the
maximum buffer size.
Therefore simply check for SQL_SUCCESS since according the msdn docs,
SQL_SUCCESS_WITH_INFO must be returned when there is more data to fetch.
This also avoids an additional call to SQLGetData() here.
Pick-to: 6.7 6.5
Fixes: QTBUG-119753
Change-Id: I42ed194f3955a650e63615615fe82d785f324228
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Disable operator*() for void* type, because it otherwise causes
a compiler error:
qcomparehelpers.h:1103:18: error: forming reference to void
constexpr T& operator*() const noexcept { return *get(); }
^~~~~~~~
Use this as an opportunity to add more tests for operator*().
Amends ece36a7394594ede3fba6744fb8f5b450a477652.
Change-Id: I205b9989bd142ca9aa49f8f4d15854e591e3042b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 053b8ff7fedfe5aed29a91a82569c00cac466e9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I0a35709284c4b6e7d080f41f361a9adea1415ca0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 334a92ecb86fb89a65091bb4c230431eeb0fa587)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Now when we explicitly have the _NON_NOEXCEPT version of the macros,
and a static_assert() in the "normal" macros, it does not make sense
to have these checks in the helper functions. If the developers choose
the _NON_NOEXCEPT macro, they clearly know what they are doing.
So simply drop the check and get rid of the annoying XFAILs in the
test log.
Change-Id: Id467ae5ad6a852da7c39dd1dbf32ce5838e69ecc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 80bc0152448fbd4a57a4c95147e7b3f067e6a35c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
NSAttributedString wrongly inserts a newline at the end of the string
when generating HTML from RTF. The rules for HTML parsing specify that
this newline, after the closing </html> tag, should be treated the same
way as if it had been part of the body.
- https://html.spec.whatwg.org/multipage/syntax.html#start-tags
- https://html.spec.whatwg.org/multipage/parsing.html#the-after-after-body-insertion-mode
This results in an additional space character if the HTML is converted
to a QTextDocument by QTextHtmlParser, for example when inserting text
from another application via the clipboard or drag-and-drop.
Pick-to: 6.5 6.2 5.15
Change-Id: If17cfcdc9ad5452e7b516fc6b50d834bd5184e23
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit 3dceef8e23787d3aded207e4f6ca554de4a1c2d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The CSS spec defines the font-size as being a length, which is a
combination of a real number and a unit. This applies to the 'px'
unit as well, so by treating px values as integers when parsing
we were failing to parse not only '12.5px' but also '12.0px'.
The code now uses QMetaType::fromType<qreal> but then sets the
resulting pixel type on the QFont as an integer, as QFont does
not support fractional pixel sizes.
Other code paths in the CSS parsing machinery use QString::toInt(),
either directly or via intValueHelper() or lengthValue(). The font
code path can potentially be ported over to these other APIs for
consistency, but to keep the patch simple this is left for a
follow-up.
Pick-to: 6.5 6.2 5.15
Change-Id: I972cfe0f3fa3c785efa18c7593d6a497ff28911c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 5731e3e185d3a69502b2bc4f1fee48c156b34c3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've tested building with these SDKs, and things generally work, so
no need to issue a warning for them.
Change-Id: Ib5775034962165c46b877e37b386ca71db97e1a6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit f75841fb8fc90921b60169fe66b24b80e6775a00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A top level window with a window frame will have the has-border class,
and hence a resize border, but child windows of that window shouldn't
have their own resize borders.
Ideally we wouldn't generate these non-client-area elements for child
windows, but changing that requires more work, as it involves creating
and destroying these elements on the fly if a window goes from being
a child window to a top level and vice versa.
Change-Id: I64ec27d87df952419284354b50420df8e48824d8
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 9322f80c3cde118aec803e6b2c86197b1b5dbb67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We apply CSS classes to the qt-window in setWindowFlags based on
whether it hasFrame(), hasBorder(), etc. Which in turn depends on
whether the window is a top level or child window.
As a QPlatformWindow may be created while a QWindow is top level,
and then reparented into another QPlatformWindow, we need to update
the window flags, and re-sync the CSS classes, as otherwise we end
up with child windows with shadows and tile bars.
Change-Id: Ibbb3d2230a880057053d7b12f93257d9b250aa6f
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit e6db07c4e7cca41a94dd787d9a4938abab7918ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some sub-classes have special handling of source model data changes,
they relied on disconnecting the connections to the _q_*layout* slots
in the private class using the SLOT macro. This isn't possible any more
after the recent port to PMF connects.
Sub-classes resorting to using private API is a clear sign some
functionality is missing from the public API, so a cleaner solution for
this issue is adding this setter which enables sub-classes to tell
QIdentityProxyModel to leave handling of the dataChanged signal to them.
Similar to commit 675b4f63feab7c81c75e49f6dea82a39dd18f489 (but
this should be the last one needed).
[ChangeLog][QtCore][QIdentityProxyModel] Added
setHandleSourceDataChanges(bool) method to allow sub-classes to
indicate to QIdentityProxyModel that they will handle source model
data changes on their own. Also added a getter,
isHandleSourceDataChanges().
Task-number: QTBUG-127959
Change-Id: Id8f567c330e4ee834940a62b6497d8cbb8ba4a46
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a31800d41273a14436c543438a142562f74f857)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The standard does not provide any details on implementing operator!=(),
because it relies on the fact that it will be synthesized by the
compiler.
Our C++17 implementation, however, has to provide operator!=(), and we
made the mistake of copy-pasting the implementation from other
operators.
However, the isOrdered() check does not make sense for operator!=(),
because an unordered value is never equal to literal zero.
Fix the implementation for both Qt::partial_ordering and legacy
QPartialOrdering.
Amends 405244fe301ac18d20aae245ba2faafaec74e453 (for QPartialOrdering)
and bdd41f491c0f85ae0897a1c7372c5ecda62a5aab (for Qt::partial_ordering).
[ChangeLog][QtCore][QtCompare] Fixed a bug where
partial_ordering::unordered != 0 comparison produced an incorrect
result.
Fixes: QTBUG-127759
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I5008f72831c17dc7fa4ae181bfc8115198a691f0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d39441a2eb5658f3d4a01046c592adb827525118)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and figure out that it does not match the std implementation.
Fix will be provided in a follow-up commit.
Task-number: QTBUG-127759
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I51c4f086af531a81a6aae03f3462972437d41f97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fed1099ad2909cb8e75477e60e0a8b41db3f58d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Initially the function was used as a helper function for QWidget,
implemented in da55a1b04121abd44d9c72e0c7cba7d72f16d4f2. But with
e0bb9e81ab1a9d71f2893844ea82430467422e21 we started overriding it
e.g. QDialog. This "worked" because QDialog itself would call the
private helper, but left a footgun when called via a plain QWidget
pointer, as we did in 5ba0982b2879a1a4c13bf97467b8e5ad296e57a2.
That specific instance of the problem was solved by the change in
fc4c6fb5f6bd6bd63b13f1f8b5b7a7289a5fd230, but the trap still exists.
To ensure we can use the function in a polymorphic context in the
future we make it virtual.
Task-number: QTBUG-127806
Change-Id: Ic0810c5439b1e696cfbf199e701f41217acc5742
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1a0f056f318417ba5e54c8110257b75cf5537acb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The feature is noop and is broken on Apple platforms. The obvious
solution is disabling this feature there.
Fixes: QTBUG-116083
Pick-to: 6.7 6.5
Change-Id: Ife4d101c70310aba8a2743d0364397b67d0a887f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ccdeb2cfaf1e67cb9ba936cbe577025ed784717f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The operator->() function casts *this to QArrayDataOps, a type that
*this technically isn't. This has been harmless since forever, but is
technically UB, and does prevent using these functions in a constexpr
context (something we can't do yet, but will in 6.9).
Change-Id: I398f9e3d83d44f198a69fffd17e26fc8cd9a572f
(cherry picked from commit ffbb585f6fa5e97aee81387f275342b049ba7d9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously one had to specify names like 'QtSvg' to -skip-tests
and -skip-examples, but this is not the same behavior as what
the -submodules and -skip options expect.
To keep it consistent, change the code to consider only the lower case
names.
Amends 25b89f2c88cdfc98bfa462949531a33f7ef50996
Amends 7c9efdf40c9d9f7f89f7a9be0c06e0d3ec54ec2c
Pick-to: 6.7
Fixes: QTBUG-127857
Change-Id: Ie80edb98ce16b6835fe361198953e36b8255102a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 34f127834c2d83517687522b5725f6a67f67bad2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_add_ui failed for CMake 3.16 and the Ninja generator on Linux,
because it generated empty commands like
... && "" && "" && "" && ""
for targets that don't have AUTOUIC set.
Adjust the generator expressions for those commands to generate the
"cmake -E true" command instead of the empty string.
Change-Id: I03c9eb2e8f14685bccadf4eb74f309bcf152c01b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e98517564fa0a87ff030deb1cb05ec51aa231294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The date-time parser, unless it hits a fixed-width numeric field
that's unfilled, leaves checking the date against its configured range
until it's parsed all fields. This means it can be out of range due to
a full-width field when it hits an unfilled one and tries to take the
range into account when deciding whether to zero-pad or expect more
input into the field. So asserting the current partially-parsed
datetime is in range at that point is not justified.
Thanks to Albert Astals Cid for reporting this fiendish corner case,
found by oss-fuzzing of KDE's image plugins, in IRC.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Id7db7409a0b5afadafb6920a0785a4cec4c80b62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
(cherry picked from commit e0a4de17ddb924d9bf222fb3ea2d0526813edea6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It relies on QT6_CALL_NEW_OVERLOAD_TAIL hence on QT6_ONLY, which is
inactive in bootstrap builds (they're treated as Qt 7). Thanks to
Ahmad Samir for reporting the resulting compiler warning at API change
review. Amends commit 88702cc87cf830b145c8bff5174748e3719364f9
Pick-to: 6.7
Task-number: QTBUG-125859
Change-Id: I3472d3bd489f16175d04ef6198522b060fa6150a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 91f48cc4b77b1cfb5a4490c3bed3eb97edd2f85a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all module and
plugin files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only
Also, LGPL and non LGPL should not be mixed in a given directory
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I3c0d98490a9d0bb45b9801d004e23e7e22ebaa34
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bc4552963345def94645b74cfd1a7d047e56137b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
MSVC doesn't define __ARM_NEON, but neon is a necessary part of arm64,
so will always be there.
At the same time fix the NEON code for MSVC which has a different
idea of what the intrinsics types are, even if all the intrinsic
functions are the same. This has two consequences:
1. Since NEON lacks construction intrinsics except duplication, NEON mask constants needs to be built differently.
2. Since MSVC has all the NEON types aliases of the same underlying type, QSimdNeon cant do the same type based dispatch as before.
Fixes: QTBUG-127646
Change-Id: I8038bb6bb4557e8ce29e3844f2742a97b4489818
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 572aa7caa04e85cbc07b18e1d0c720038facbf83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The files are MIT and BSD-3-Clause instead of only BSD-3-Clause
because parts are copied from an upstream source that had them
MIT licensed
Task-number: QTBUG-121787
Change-Id: I5598033e71e97e5da807ab14d63755c05f655980
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 70667f46243e05f21cae31198aaf1662bf698114)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike Clang, GCC does not automatically emit them as constexpr with
just "const" declaration.
$ nm -C lib64/libQt6Network.so.6.9.0 | grep -F 'HPack::('
00000000001dc376 r HPack::(anonymous namespace)::LiteralNoIndexing
00000000001dc374 r HPack::(anonymous namespace)::LiteralNeverIndexing
00000000001dc480 r HPack::(anonymous namespace)::staticHuffmanCodeTable
00000000001dc378 r HPack::(anonymous namespace)::LiteralIncrementalIndexing
00000000001dc37a r HPack::(anonymous namespace)::Indexed
Pick-to: 6.7 6.5
Change-Id: I398f9e3d83d44f198a69fffd17e26e30b9bce7ed
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c607a3894c39a2c5a35e9d474b233637a6f55cc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the absence of the BIG-REQUESTS extension, the maximum
request length is only 65535, with DPR=2, a 128*128 icon size
will be (128*2)^2 = 65536, which exceeds the maximum
request length.
See also the official doc for xcb_get_maximum_request_length.
https://xcb.freedesktop.org/manual/group__XCB__Core__API.html
uint32_t xcb_get_maximum_request_length(xcb_connection_t *c)
In the absence of the BIG-REQUESTS extension, returns the maximum
request length field from the connection setup data, which may be
as much as 65535. If the server supports BIG-REQUESTS, then the
maximum request length field from the reply to the BigRequestsEnable
request will be returned instead.
Note that this length is measured in four-byte units, making the
theoretical maximum lengths roughly 256kB without BIG-REQUESTS and
16GB with.
Fixes: QTBUG-127392
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Iee53f579802e8bc54ed1519bc5b5591b5e5700e1
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 0ed5d4d674c241f7affa3b87feb948c26e11d5cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
on Ubuntu 24.04 GNOME Wayland.
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-127920
Change-Id: I15e1f6b9bbf27d92cd106318ac44c33fdabfa3a0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f31bce32cdb50eb02bffc690e3ba7cc6b986915e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
on Ubuntu 24.04 GNOME Wayland.
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-127920
Change-Id: I1500ec1dcf93005b358b7411dcd40ae79f7494fe
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f54ab49fb8cee4611a040ef40c883b8158bfa2d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.
Task-number: QTBUG-127920
Change-Id: I49c0f53b16f501072cbbe92ddd79ff21fb9adb27
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 66591b658f4270252f8bf342dac7e2a9bcad34a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It needn't be exported because the public class destructor is defined
out-of-line and the move ctor, even though inline, and requiring the
definition of the member destructor at compile time, doesn't actually
call it.
Amends 612ed28985736cabce722580d9b84c5af4460e05.
Found in API review.
Change-Id: Ia782fd5597c215c16929752e9f34534b74406230
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d9346c96104f9d83dad2d29a945f7ac96ab9258d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
6c036012b5f2304a05af29f29daa7582603f79ae added a case branch to a
switch before the break of the previous case.
Amend the commit and add the missing break.
Task-number: QTBUG-127641
Task-number: QTBUG-125149
Task-number: QTBUG-122747
Pick-to: 6.7 6.5
Change-Id: I3f2b3e07db463b72fa99af493f40cbc1a783f1ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1d409c0854d664bafc2a35b33cb73129a51c947a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Checking the underlying type's metatype is checking through a QMetaType
feature, not moc's functionality. And QMetaType currently always returns
the metatype for int for all QFlags types.
Change-Id: I8a96935cf6c742259c9dfffd17e9791608e38b6e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 46b73b1ef37e22af23bfce992f41498c6409df3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QCOMPARE is (actual, expected).
Take the opportunity to test out-of-range returns from QMetaEnum too.
Change-Id: I8a96935cf6c742259c9dfffd17e9575a6d4cf90a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e3e44e2294c06f243838dfa28ec4f350c5e6ffbb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This applies to the Q_ENUM/Q_FLAGS overload of the debugging functions.
This prevents the sign-extension of a signed QFlags field when
converting to quint64, which would have resulted in 0x8000'0000 becoming
0xffff'ffff'8000'0000.
Right now, this is a no-op change because the implementation in
qt_QMetaEnum_flagDebugOperator() calls QMetaEnum::valueToKey(), which is
limited to int (32 bits).
Change-Id: I8a96935cf6c742259c9dfffd17e998c3a0538146
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 232ad339ab14965b6207d04a45d8d37ec3139558)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This change fixes three problems in the non-Q_ENUM overload. First, the
printing of the sign bit for a signed flag. This is correct, but
unexpected:
QFlags(0x1|0x2|-0x80000000)
By using unsigned types, we'll print instead:
QFlags(0x1|0x2|0x80000000)
Second, shifting into the sign bit is UB, so we remove the problem by
not having a sign bit at all.
Third, this provides an out-of-line non-template overload of the
implementation for unsigned QFlags, thereby avoiding an unnecessary
instantiation of the template function qt_QMetaEnum_flagDebugOperator()
in user code.
Change-Id: I8a96935cf6c742259c9dfffd17e992caa315e1d3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 91a27c1a516068b69ab62778a07c566ad22f3576)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The qsnprintf() function introduces even more platform variability
than std::snprintf(), so from now on, we're using only std::snprintf().
Task-number: QTBUG-127110
Change-Id: Ic81b2a760521d77442cc328d2cfa7659bba8b7e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b8a956c2d3f9c158594265eca89185bd2bc671e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function is one of the few Qt functions that are also available
in C (as opposed to C++) mode. Testing has shown that 'asm' doesn't
work in strict mode (-std=c11) on GCC, so use __asm__ instead, like we
do in qthread.h.
Amends a7f227f56cfe562280e89d3c73040f7e8384129e and
877c158c5976bebffd0ff02c39b6b66a842c6344.
Task-number: QTBUG-119901
Task-number: QTBUG-103014
Task-number: QTBUG-103011
Pick-to: 6.7 6.5
Change-Id: I4cb59bf6c716b09bfc7225314624ccd5ab77a5fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0c4d4cfa02ce8743a7aae3924af0d120c1c5e2fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This code has been enabled but didn't work: we kept getting permission
errors on use. So let's save some library size.
Change-Id: Ifb754f0e28774c20aa7cfffd17e7549e7624e42a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c41b6b7986cdf68c18a20ae6ef54efe1e9c1396e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindows are not visible when created, and require a setVisible(true)
call to be be shown. Android Views on the other hand are visible by
default.
This mismatch caused problems when a foreign window was parented into
a QWindow that was yet to be shown. If the foreign window child was shown,
it would show up on screen, due to its QtWindow parent, as well as the
parent window's QtWindow both being visible.
Technically this problem also applied to normal Qt child windows, but
because these windows rarely render unless isExposed() returns true
they would not show anything.
We now initialize QtWindow to being hidden on creation, and let QWindow
handle the order of when the window is made visible.
The QAndroidPlatformForeignWindow::setVisible code had to be adjusted,
as it doesn't call into the QAndroidPlatformWindow base class, where
we normally handle the visibility toggling of our QtWindow layout.
Change-Id: I3debba5f42609d687dc88f7f92c89055cfa6c5f1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6faf18aceb21a4c5e06d0dfe87b9fbaa037f80fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The window geometry has been propagated to the QtWindow layout already
via setGeometry() already, so we don't need the additional plumbing
for createSurface and setNativeView.
It's enough to set the layout params of the inserted View to match
the parent (the QtWindow in this case).
Change-Id: I40b44282e80ed04b109ffc1958144cb3e3edd11d
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9d398a18c24ab0a16ceb0346fc20b8eebf95410d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The top level might have a non-fullscreen geometry set, and we should
respect that.
Change-Id: I9717d185a3fe008f4d23a02c527e1a9739aea1d6
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit aa45280d972460a4da500d2f6a2bb4fa5f8b6e43)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We shouldn't rely on the QWindow geometry being propagated through
other means, so we should always propagate the geometry when
initializing the QAndroidPlatformWindow.
Change-Id: I489b059ffae7a209005edaaff3674c1f39273bee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 6e52d010535b87300bacd54c0c21fba7cc926eaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The geometry() of the platform window may match the incoming geometry
at the point of the call, but the native geometry of the Android layout
and view might not, so we still need to propagate it to the platform.
This matches what other platforms do in QPlatformWindow::setGeometry.
Change-Id: I5f04a323412ce2ce9561cace1f0cec461c133e28
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 02734b644e0ae566163da68dd51623943d41fb13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of splitting the geometry setting into setGeometry and
setNativeGeometry we can leave setGeometry to do the right choice
of whether to propagate the geometry to the QtWindow layout or not.
Change-Id: I30291dbf7079df76f4d3a54d6ea3c9c3f1329c90
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b3e60c5acfaf809f376f66d6ab7f98ca644b0fce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As long as we have a QtWindow we should be able to set its layout
parameters. Adding surfaces or native views later on will adopt
the QtWindow's layout params.
Change-Id: I08591e18f95bfe1e85358bb68507145d35630486
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 79ae28d9ace358c20c716ced0d0d9471b500e0cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During QAndroidPlatformWindow::initialize() we call setGeometry, which
may end up in QAndroidPlatformWindow::setNativeGeometry() via one of
the QAndroidPlatformWindow subclasses, i.e. GL, Vulkan, or foreign
window.
We currently bail out from setNativeGeometry if !m_surfaceCreated,
but this is only a workaround for the m_nativeQtWindow not being
alive yet.
As long as we have a m_nativeQtWindow, we should be able to set the
layout parameters of that QtWindow, independently of whether it has
a QtSurface or is hosting a foreign Android view.
As a start, move the QtWindow initialization earlier in initialize().
The isEmbeddingContainer() check can go at the top, as we shouldn't
do any modifications to a window that's purely used to act as a
container when embedding Qt in native Android apps.
Change-Id: Ia3f0b33e6729f5399946d86799f39877d058511b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit e2ce1f724f56db8072033665d066ad34f4d4c702)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't handle input on behalf of these windows, so we don't need
a QtEditText for them. Any Qt managed child QWindow added to a foreign
window will get its own QtEditText as normal.
Change-Id: I32daa83f22487aadca7509379595b6c82b29ea4a
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit eea00824bdbc6740261d2b78821e31c1f21c9c0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During the QAndroidPlatformWindow constructor we can't safely call
virtual functions of QPlatformWindow and expect them to resolve to
subclasses, e.g. QAndroidPlatformForeignWindow. Importantly, this
means we can't check isForeignWindow() during construction.
QPlatformWindow has a dedicated initialization function for this
use-case, so use that instead.
The existing order of between QAndroidPlatformForeignWindow and
QAndroidPlatformWindow has been kept as is.
Change-Id: I2a08326fae6a3b079cd153c50a13794310ac3d74
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7150c79d0ee10d6aca330e6a0862b0fbfec071fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When converting a wildcard into a regexp, convert a series of
consecutive '*' tokens in just one '.*' (instead of a series of '.*').
The pattern matched is the same, but we reduce the effects of a
possible catastrophic backtracking. I'm not actually sure whether
PCRE optimizes this case out of its own or it doesn't; Perl appears
not to.
Change-Id: Ia83336391593d56cf6d8332c96649a034a83a15b
Fixes: QTBUG-127672
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a041cd35214e57a189aaa1f1f77199ff42303f83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Storing a pointer was fine when used with the QBuffer version, but
that means you have to keep the QBArray alive outside the class
itself.
Just store the value and it is a little easier to use.
Changes in this cherry-pick: The dev patch chain has the test update in
the wrong commit, so cherry-picked it along with this.
And apparently I also forgot to commit a bug-fix to this commit as well,
the bug anyway disappeared in dev when I deleted the class and
redirected everything to the ByteArray class.
Change-Id: Ic02e0b4627fde2b5fdd7e5fb69a94e06aa768ab9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 67140afca21efae75aad35f63ca1d7211fe6ec3a)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The macro is defined or not, not defined to 1 or 0.
Amends 1d7950c9467ba4db75ac065bd54ffe08e4a29710 (qhashfunctions.h),
0d85d0a72fd0136bd89e201d0cc1bf7fac2c24c8 (tst_qfloat16.cpp),
104a0a9ecdb18d65e4d9075d87e8860c6c9d8335 (tst_qglobal.cpp),
7a829eaf51853e0852db28b8b8223e1a62a3db0c (tst_qtendian.cpp).
Pick-to: 6.7
Change-Id: I190e208f3c96f27100dae3eef512739afa8fadd9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c78994a887f56f1bc77a5fa0db3b98196851db5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
RFC 9913 differentiates between stream errors and connection errors.
Some error handling only requires stream errors in the form of
RST_STREAM frames, while other sever errors require connection errors
in the from of GOAWAY frames.
This patch streamlines the sending of RST_STREAM frames, and ensures
that they are sent whenever mandated by RFC 9113. In some cases this
was missing, in some cases we were sending connection errors instead
of stream errors.
Further this patch adds tests to ensure the correct behavior.
Fixes: QTBUG-122345
Pick-to: 6.7
Change-Id: Ic93ae7a358a4eb551aa23342a6683cdd5dd0abb0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d17d260948e16549d82f1fdd4dec98d246b0622e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QT_WIDGETS_HIGHDPI_DOWNSCALE requires the rhi backing
store backend for GPU downscaling. Enable that automatically
to make the downscale functionality easier to use.
Change-Id: I27a538fef426768fe69fcfe07104136209b3bae2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 672310c74691c60b303520c69287d73d07ab32a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QT_INTERNAL_EXAMPLES_INSTALL_PREFIX is set, the build system
should ignore the DESTDIR env var when installing examples. Otherwise
the examples will still be installed into a location where the Coin
agent will archive the files, and thus blow up the package size,
especially if each example contains deployed Qt libraries.
Backup and temporarily unset the DESTDIR env var while example
installation is in progress.
Amends 02cb165ef8050230b477358e4136e9f0acd83eb6
Amends 7694b01aafd52b7064161b2f8c9a98cd330d24d3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ibe24a88dd672d246b579d815a813dd042f60e6a6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 90db9a41566f0fdb26b7a80b68b55ac0360489f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As a result of c956eb8eddb1b3608d7e3d332fbe55df5ec41578 we are now
reparenting QWindows managed by QWidgets when the widget itself or
any of its parent widgets are reparented. When reparenting a child
widget from being a child to a top level, or top level to child, we
need to know the new top level state to determine if the QWindow
should have a QWindow parent or not. As the window flags of the
widget are in flux during the reparenting, we were using the new
window flags of the reparented widget to determine this.
However, for QWidget children of the widget that's being reparented
we can't use the window flags of the reparented widget. We must use
the flags of the child itself. These flags are not in flux, so we
can use QWidget::windowFlags() directly.
Failing to propagate the child widget window flags was causing us to
lose the transient parent relationship to its parent QWindow for
popup windows.
Fixes: QTBUG-127641
Fixes: QTBUG-125149
Task-number: QTBUG-122747
Pick-to: 6.7 6.5
Change-Id: I6dbc5ff5ad019b0f9188516ff3d645e860a9627b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volodymyr Zibarov <gogan419@gmail.com>
(cherry picked from commit 6c036012b5f2304a05af29f29daa7582603f79ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If drawText() is passed an empty/invalid target rectangle, we would
still go though the motions of laying out and painting the
text. Output would normally be empty, as expected, since the clipping
would take of it. But for paint devices with limited clipping support,
like QSvgGenerator in 1.2 Tiny mode, the text would wrongly show up.
Add a shortcut to skip painting text in this case.
Fixes: QTBUG-127114
Change-Id: Ia7de3e7d2493218fc2a0f6cb0e815285ddceeb1d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit c7df8dda8b60b4e4e7b1859f462d65cef5d8c85b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The right replacement for pause() is suspend(),
not suspended() - the latter is a signal name.
Amends 37cfc3c6d2e3b290c7fc41cd7545283d24e4433c
Pick-to: 6.7 6.5 6.2
Change-Id: Ic94919de9e9890f62335a4bdee267549616f4a42
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4f234b378e24742eecbefc16b63349e638828112)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As part of the qsnprint() -> std::snprintf() port, we included both
<stdio.h> and <cstdio>. Standardize on the latter; this is a C++
project, after all.
Change-Id: Icd8ef528b94cea75dd0ede18b4105f85b08c3515
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 73d7138c020d0f95ad354c4ec4512a54914e0195)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test did not account for the fact that kerning can alter the
distance between subsequent characters, so sum of horizontal
advances does not accurately measure the width of the string when
kerning is enabled.
This caused the test to fail with e.g. with the font Ubuntu Sans.
This amends 0ffdbb21261eee3a9ec1cd541478ee883a12065c .
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-127512
Change-Id: Id3ae7a6c79c84edd603db2fc0fed07777fa67741
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit e7ac6667f27369c25719ebedefd2d5344fd93bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since commit 2bc9ad0e5dd75cf69f4a8bf94a6a917de2b4e8c4, we have our
qcompare.h header, which takes care of this. This also fixes the build
when the compiler supports operator<=> but the Standard Library doesn't
(e.g, VxWorks):
qanystringview.h:13:10: fatal error: 'compare' file not found
Change-Id: I8a96935cf6c742259c9dfffd17e9014a52d4991c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit f48f425d3ebc76b242243b440fb853ba29e0970c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The framePositioning test was split out from the positioning test, but
without the existing skips. Turns out we do need the same skips, so
add them.
Change-Id: Ib5d1cdf474a3a88a154c7cdc8df346668c8053d6
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 6f46f85899b425729d595af6461c6dbe3f4f7e1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QtEditText is no longer focused on QtWindow touch,
onGlobalFocusChange event is no longer triggered, and so we cannot get
the parent View (QtWindow) of the current global focus object and set
it as the focused QWindow.
Move QWindow focus setting to be done directly under QtWindow onTouched.
Pick-to: 6.7
Change-Id: I292f197c64d170aa2f15a3118e6f861b59c906f5
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 1442a9ea479d197ed338f440d5106a7e195c4ee2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove focusing QtEditText on window touch so that hardware keyboard
events can still be sent to the application after touching the screen.
Move QtEditText focus request back to showSoftwareKeyboard in
QtInputDelegate, so that we can still show virtual keyboard on
QtEditText when needed.
So that QtInputDelegate still has a valid QtEditText instance to show a
virtual keyboard with, add a new QtInputConnectionListener interface
function that gives the currently "active" QtEditText to listeners.
Call the new QtInputConnectionListener interface function when QtWindow
is touched.
Pick-to: 6.7
Task-number: QTBUG-126187
Change-Id: Iff90b96351d5285249d5bcd19f3caa648628cf14
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 25852624e1a306ab35acb7192ab29dc80b416556)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using Xcode 14, or 15 but with the classic linker on arm macOS,
the linking of the oci plugin fails with:
ld: file not found: @rpath/libnnz.dylib for architecture arm64
Even though the file is present in the expected location.
This seems to be related to the use of the -flat_namespace flag, which
was originally added in 2003 for Qt 3.1, to avoid an issue with the
linker not finding the environ symbol.
These flags doesn't seem to be necessary anymore to successfully link
the plugin.
Remove both the -flat_namespace and -U,_environ flags when building
the plugin.
Amends 3ada49976a06ae251911fd8cd734f697fe4ddab4 in the historical qt
repo, which is not available publicly.
Pick-to: 6.7 6.5
Fixes: QTBUG-127342
Change-Id: If522cacb92aceff35d36d3bcfd3c1f838c134ada
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3642ce6e4b1912a774cc55c9a6a85ecf716d7080)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When starting QNX emulator this makes VM to try to publickey first.
This avoids VM from trying to use gssapi-with-mic authentication,
which in some cases hangs indefinitely causing a timeout.
Pick-to: 6.7 6.5
Change-Id: I499c668a910851d97ce8de803a1064dcd7b0b74d
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
(cherry picked from commit 97637f909482a0b8472f99c6ecdc873029843cb1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The way that Qt checks if C++20 is supported by the platform does not
work properly on VxWorks.
Their toolchain accepts the C++20 switch, because they use clang with a
wrapper around it, that (for the time being) does not reject it.
The compiler itself claims that it does support C++20.
The problem is that the standard library available on VxWorks only
supports C++17.
This leads to Qt falsely believing that C++20 is supported.
This is being discussed as a defect in support case 00152044.
Prevent weird compilation errors by failing early if the user passes
-feature-c++20 to the configure call.
Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: Ica6686428b01a0638117f853586313be63e5fe99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a578a09a418c689c9c9a43152961288ad075471b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drive-by remove an explicit NUL-termination (std::snprintf() does
that) and port a repeated use of printf argument checking to the
protect() idiom.
Change-Id: Ida15940fe9aef0622e9836a229a398c909503a9a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b5115d1c2fc73feb149a8ee97de011b3c75694fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use higher-level API (QByteArray::chopped()/operator+()) instead
of new[] and qsnprintf().
methodSignature() already heavily depends on QByteArray concatenation,
therefore trying to avoid using Qt code in QtTest is pointless, at
least here.
Drive-by indent lines so a follow-up port to std::fsprintf() will not
have to re-indent these lines again.
Amends b68bae1132b5dc5c8f55435c72cd48e24aa52ec9.
Pick-to: 6.7 6.5
Change-Id: I94ec440d7e6d09196cf87cd3dbbfd765e0df69d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a15ff49be73228bbbc72989736d32059322c414f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Before we roll out QT_NO_QSNPRINTF across Qt, we need to make sure at
least the headers are clean, so downstream modules can port without
being stabbed in the back by unported upstream headers.
Task-number: QTBUG-127110
Change-Id: I7411ff0036482ad68bd5867b624518f68f249228
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7e2fa57faf230ef8cb505b95c2bc0e70867ac131)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... except, of course, the implementation file, which therefore has to
be excluded from PCH'ed builds.
Remove qvsnprintf.cpp from libbootstrap, as it's no longer needed
after porting all five uses of qsnprintf() in QtCore to C++11's
std::snprintf(), which even Windows implements with std behavior.
The reason we're removing the function is that std::snprintf() is the
better alternative: qsnprintf() just introduces even more platform
variance than any implementation-defined behavior of C or C++
snprintf().
To wit:
- On Windows, the return value is sometimes "wrong"
(cf. Windows-specific qsnprintf() tests in tst_qbytearray.cpp)
- On WASM and at least some Android configurations, it is incorrectly
implmented using the QString::asprintf().toLocal8Bit() work-around,
even though both platforms have a working snprintf().
QString::asprintf() is implemented in Qt itself, so has some
differences:
- the `a` format for hex floats is not supported
- %ls expects char16_t*, not wchar_t* (these are, in general, not
the same width)
We will deprecate these functions in 6.9, but before we do, we need to
get the Qt code in order, and that's where this macro comes in.
[ChangeLog][QtCore] Added the QT_NO_QSNPRINTF macro to disable
qsnprintf() and qvsnprintf(), which will also be deprecated in 6.9.
See the documentation for details why we take this step.
Task-number: QTBUG-127110
Change-Id: I4e1c1f213bcfd615f83387f5f51e77fa1ff2062e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bd7d54249e3f2b6a9dd6b759c892d7c97d26c0aa)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove links to `qt_add_ui` in the qt_add_ui documentation
* Add links for `qt_wrap_ui` and `AUTOUIC`
Task-number: QTBUG-126463
Change-Id: I73c8e406407e3f71bba40e1c41473a17a7f45222
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 2e8d7c552df4ac0987d7756ed4de9f35bb4735cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Introduce a new signature to qt6_wrap_cpp so that it accepts a target
name as the first parameter.
* Update the qt_wrap_cpp documentation.
* Show a warning message when the previous signature is used.
* Amends dc4159286b8571a3f3543e457fe1b51b9f5965b7 because it deleted
the `qt_wrap_cpp_3` example by mistake.
[ChangeLog][Build System] A new target-based signature was added for
qt_wrap_cpp. The usage of the previous output-variable signature is
deprecated and will issue a warning.
Fixes: QTBUG-126460
Change-Id: I85b7c516d6aebd8bbfda441fb6c68999e4898479
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit f3d29dfb89f3e35623edd7e5bca934a1e85a6c35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The GCC documentation [1] says: “On x86 targets with SSE2 enabled, GCC
supports half-precision (16-bit) floating point via the _Float16 type”.
On non-SSE2 x86 (such as Debian i386 baseline [2]), __FLT16_MAX__ is
defined starting with GCC 14 [3], however any non-trivial use of the
_Float16 type results in an error:
error: operation not permitted on type ‘_Float16’ without option ‘-msse2’
which makes some packages fail to build on i386 architecture [4].
[1]: https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
[2]: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1
[3]: https://gcc.gnu.org/g:9a19fa8b616f83474c35cc5b34a3865073ced829
[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076986
Pick-to: 6.7 6.5
Change-Id: I393ee83eb8e8888f5fc9e3b349dc8b063eef6f5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 39fa7e7bef90be2940c5f736935f963e3969e0bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unit test failure should not happen, so mark failure formatters as
cold (like qFail() itself).
As a drive-by, mark formatFailMessage() overloads file-static, too.
Change-Id: I92f5b674a7282f4ebaa9250894a9971a524f4108
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 69c510d6bcc52ac133a82d7a9493ffba037c4521)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Menu type from Qt Quick's libs.platform module on Windows uses the
Win32-based menus implemented in the Windows QPA backend. Those are not
High-DPI aware, so we cannot use a scaled up pixmap for the menu icons.
The native Windows icon engine returns scaled pixmaps (defaulting to the
QGuiApplication::devicePixelRatio value if not explicitly specified), so
we have to explicitly ask for pixmaps with scale factor 1.0.
Pick-to: 6.7
Fixes: QTBUG-127551
Change-Id: I191915127890ae265b169d5cd8d6c9f058e36a13
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fdfb360f4f60cbdb9ce7f29f424dad70f0679b17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So far we have only cached the most recently requested pixmap, under the
assumption that this is the one usually requested several times in a
row. However, our menu integration requests the pixmaps for all
available sizes when populating the native menu item with an NSImage.
Not caching the pixmaps for all sizes results in repeated rendering of
the image, which significantly slows down the opening of native menus
e.g. using Qt Quick's labs.platform Menu.
Use a per-icon-engine cache for the pixmaps, with a cache key that is a
struct holding the mode, state, size, and scale factor.
Pick-to: 6.7
Fixes: QTBUG-127614
Change-Id: Ie13cae8c69a8ee979907d4b9ea01bcdd89dd585b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c8a2794c441dfc6aa0ceec3ae847a8b1e353a89f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
styleOptionViewItem() sometimes fails due to a very small widget size
even when using showMaximized(). This might be due to a mis-configured
vm scrren size or similar. To make sure that all 4 rows are properly
painted set the minimum width to a reasonable value and also resize the
sections appropriately.
Pick-to: 6.7 6.5
Fixes: QTBUG-126494
Change-Id: I9956d3119be1ba9e0fb33e4e7b30f40b01b017a5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f7662366b120c1cacd43a2c2ae36b03f578d7478)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both issues reported in QTBUG-120396 came from the same dubious piece of
code, which predates the public Qt history
if (path->size() >= 2 && in[0].unicode() == '.' && in[1].unicode() == '/')
in += 2;
else if (path->size() >= 3 && in[0].unicode() == '.'
&& in[1].unicode() == '.' && in[2].unicode() == '/')
in += 3;
It makes no sense to check path->size() inside the loop, as the in
pointer will have advanced past the beginning and the remaining size of
the input will not be path->size().
It additionally had theoretical UB in expressions like
in <= end - 4
for paths that were less than 4 characters long (it cannot happen with
current QString because of the QArrayData header before the payload).
So this commit rewrites the function to fix those issues and some others
found during the unit-testing. It gives the function a major
simplification.
Fixes: QTBUG-120396
Pick-to: 6.7 6.5
Change-Id: I46feca3a447244a8ba19fffd17e012c27e410056
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QQuickLabsPlatformIconLoader calls setIsMask on the icon to reflect the
value from the Icon element, and usually that doesn't change the value.
Detaching it anyway results in the icon no longer reusing the cached
engine.
Task-number: QTBUG-127614
Pick-to: 6.7 6.5
Change-Id: Iead04d8a8a2342b03858cf5f72b43c51d442dd6b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 55f41eb6732d5577eacaf181d5c092c3e15a2b4e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function template is constrained in the template-initializer to
only rvalues, therefore this overload is never instantiated for
lvalue.
Amends 79ae79d05c65019233cf9ae9e77ef59d90e75ac2.
Pick-to: 6.7
Change-Id: If0260799fa233eba1ccb3545b9d053496901fc2e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 297bc0fb306954dbdf34d80017055b6924315d81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They were lacking it since the start of the public history, and
porting to std::snprintf() (which has the warning) as part of making
Qt compile with QT_NO_SNPRINTF has turned up surprisingly many
-Wformat warnings, so enable the warning for the remaining (non-tree)
users.
Backporting aggressively, as this might unearth security bugs in user
code.
[ChangeLog][QtCore][q(v)snprintf] Added attributes for GCC-compatible
compilers to detect format/argument mismatches. If this throws warnings
for your calls now, don't ignore them. printf() format mistakes could
be security-relevant. You may also find that you relied on undocumented
behavior, such as that certain implementations (Windows, Android, WASM)
of qsnprintf() support char16_t* instead of wchar_t* for %ls. In that
case, you should port to qUtf16Printable() and QString::asprintf(), or
suppress the warning and port away from the platform dependence at your
earliest convenience.
Task-number: QTBUG-127110
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I5c1fd9b2d5d2d55c68773f33edfd76acacd2408c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit 64416d3cf645187385d8ad90bc44d9c8e9ce864f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 63295f43e70955a194602a7acf39013f124e14b7 changed the size:
placeholders to %lld, but wrapped only one of the arguments in
qlonglong. This causes 32-bit builds to read past the end of the
expectedSize variable.
Fix by wrapping the other, too.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I9c23ab589c8895e8f038fb508e18ac3006fa4f8f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 57eff5b092dbd692594125edc70d3efd898660ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amend moc's JSON output with line information for the classes we find.
Task-number: QTBUG-119143
Change-Id: I821f0c30a56ed992cb9c6173f1e28ace1f26e9cf
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
(cherry picked from commit 1d4533bd5fac54cb5555f03ff08e9085fa533c16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This partially reverts commit 8bd532b1e.
Replacing the std::optional's with real objects led to unwanted
extra allocations, some even in the destructor.
Change-Id: Ib9f949b7d93352c9027ec8a162741d7830e9ec72
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6f62f25daffafab750f84aec2b90e129e14c2cd9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Was meant to be >=, not <.
Amends ab06d402dd833cefe9c0d929c13e93068aab96d9
Pick-to: 6.7
Change-Id: I5aa2236d2ffc7274e14918aea28c9a3e3545b6c4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d6eda60b330e72570be9ce43ce5dc01cd8851665)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt6 package needs to be found before calling
qt_build_internals_set_up_private_api, otherwise it will fail when
using a cross-compiled Qt, because QT_HOST_PATH will not be set.
The error is:
CMake Error at qtbase/cmake/QtBuildHelpers.cmake:341 (message):
You need to set QT_HOST_PATH to cross compile Qt.
Call Stack (most recent call first):
cmake/QtBuildHelpers.cmake:444 (qt_internal_check_host_path_set_for_cross_compiling)
cmake/QtBuild.cmake:4 (qt_internal_setup_build_and_global_variables)
cmake/QtSetup.cmake:6 (include)
cmake/QtBuildRepoHelpers.cmake:21 (include)
lib/cmake/Qt6BuildInternals/QtStandaloneTestTemplateProject/Main.cmake:7 (qt_build_internals_set_up_private_api)
cmake/QtBuildRepoHelpers.cmake:1036 (include)
cmake/QtBuildRepoHelpers.cmake:1053 (qt_internal_setup_standalone_test_when_called_as_a_find_package_component)
lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake:68 (qt_internal_setup_build_internals)
CMakeLists.txt:11 (find_package)
Pick-to: 6.7 6.5
Fixes: QTBUG-127668
Change-Id: I2fb3df05ce7aed3949d428d98657fe61de723abd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 4f9da08b058382cf170bf3a0e14fc73c8cf4fecd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, the environment variable QT_BLOCK_EVENT_LOOPS_WHEN_SUSPENDED
was set to an empty string, which allowed QAndroidEventDispatcherStopper
to keep the application running in the background when it entered the
suspended state (onStop).
To address this issue, the isBackgroundRunningBlocked() function has
been added to validate the proper value when getMetaData(..) returns a
value.
Fixes: QTBUG-125496
Pick-to: 6.7
Change-Id: I541af3bb1f4e239ee8ba2be32583b91afc7a43e2
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 1f1f726c79ca4d539932e078857a36e8836d474b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow what's been done in the D3D11 backend. Slightly different
logic here and there due to always having the newer interfaces
available, but does the same thing. Use QT_D3D_MAX_FRAME_LATENCY
to override the default 2.
[ChangeLog][RHI] The D3D12 backend creates swapchains from now on with
DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT by default, with a
max frame latency of 2.
Task-number: QTBUG-127267
Change-Id: I4d0361ab546a1c0041592389f8954281f588b0ba
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 91cae3f9cc9cb97eab69e39d405000f2fd1e533a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implements what's described in
https://learn.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains
By default SetMaximumFrameLatency is called with a value of 2, since we
do not want to force 1 on everyone as some application may have more GPU
heavy 2D/3D scenes. Use QT_D3D_MAX_FRAME_LATENCY to override. Setting to
0 disables the whole thing. This patch contains no C++ API (could be in
the backend-specific init params), because it is not clear if it is
reasonable to expect applications to control such details of the
presentation mechanism. This also allows cherry picking to earlier
branches.
The result is that, for example, the visible lag between the mouse
cursor and the dragged item will get reduced in Qt Quick scenes that
have a mouse draggable item in them. This comes at the expense of
potentially reducing CPU-GPU parallelism, but many scenes do not need
that kind of performance to begin with.
One big gain here is that with a MaximumFrameLatency of 2 the behavior
becomes closer, and basically identical, to what one gets when running
with OpenGL (where Qt has no control whatsoever over such presentation
details), and so the behavior becomes closer out of the box with Qt 6 to
what one got with Qt 5. This is true at least with NVIDIA graphics on
Windows 11; note that it may not apply to other vendors' GL
implementations.
The QRhi doc update just brings in what's been true for some time in Qt
6: as IDXGIFactory2 is required, the minimum required DXGI version is in
fact 1.3 and so D3D 11.2. (which is Windows 8.1 stuff so should be fine)
[ChangeLog][RHI] The D3D11 backend creates swapchains from now on with
DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT by default, with a
max frame latency of 2.
Task-number: QTBUG-127267
Change-Id: I74f68f7af41097b957b8e0bbdbae39f9302b1ad3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 02bf4d06b2432d95df9a1f6c9ad072b953b06cda)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The default implementation of the virtual is of course just
memcopying into beginFullDynamicBufferUpdateForCurrentFrame()'s
result, so not very useful for any backend except OpenGL where
(for non-uniform buffers) it is implemented rather with
glBufferSubData (leaving it up to the OpenGL implementation what's
going to happen internally).
The value is somewhat limited in practice, however one user is
going to be Qt Quick: to get as identical as possible results
to Qt 5 in artificial "benchmark" scenes, it becomes important
to go directly to glBufferSubData (just as Qt 5 did) when
updating geometry for a large number of items in every frame,
and skip any intermediate resource update logic.
Task-number: QTBUG-125087
Change-Id: I780a1431e021b90590b493e1fb82334cd71bd75b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit cdaa4c317cf1969330e3ad148e7cb0a7cb01d859)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Presumably the equivalent of D3D11_MAP_WRITE_DISCARD.
Stating READ is pointless given reading is not possible with other
backends such as D3D11.
Task-number: QTBUG-125087
Pick-to: 6.7 6.6 6.5
Change-Id: I3c0aeb2a3669d4f8c279f7ace9a8a55e92988807
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit f52018e45ff19fd487e729321b6d2d1750f33a4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not sure why we used 256 given the typical shaders used with Qt.
A prealloc of 256 means 8328 bytes on the stack, which feels excessive,
and shows up in profiler hotspots for some reason.
Task-number: QTBUG-125087
Pick-to: 6.7 6.6 6.5
Change-Id: Ibae26dae95cbc8d0e9ea53423daa151e768a93b2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit fb2e33b65aea28609996c4e1ac59c3ee75e5b839)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And make sure the default nativeBuffers(), used e.g. by the Null
backend, correctly zeroes out the slotCount, which will be relevant
for Qt Quick.
Task-number: QTBUG-125087
Pick-to: 6.7 6.6 6.5
Change-Id: Ia3a0ac82818821f7068b380e33a0dd42db87b349
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit d6906fb5975e7e1442836ab5c894f69c90a3e5a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Once we ported the formatting to use formatFailMessage() in
aa8a4be9e9eae82b6c6b8875371114dbfb3ec06a, it became apparent that the
output contained an extra leading newline compared QCOMPARE use of
formatFailMessage(). We kept the newline in the patch that was picked
to older branches. Since this is a stylistic discrepancy, though,
standardize on no leading newline going forward.
Change-Id: I4badf700900a106d835f3f72e92441d8a8912ff7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4bc81fe5d1d1e4587075a82a45be9b34825b5233)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Adding or removing close/maximize/minimize buttons to an already
existing QMdiSubWindow is only visible after the window is repainted.
This patch repaints the QMdiSubWindow at the end of setWindowFlags.
Fixes: QTBUG-125778
Pick-to: 6.7
Change-Id: Ibdf136621bf70337a2af29dfcfd10b60dde11e15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6520ed0f2567c5a8fd680dccbff59c5ef8fc89c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The patch that originally added the function used std::clamp() because
qt_saturate() wasn't available in all the branches to which the patch
was backported. This patch modernizes the code for newer branches.
Pick-to: 6.7 6.5
Change-Id: I1b764d303e00ec04858643efed3dcc71f2c7ce4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d042c14c9940c6aabaa5b39d3061c0f9e50fff06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From const char* to const char[] to address a
"Character pointer is not const" Axivion warning.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I0d6606c6abde5b01ec250ffb4595c89a497b7c29
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fd8cec34965afc8ca6d7f5e844e8aab44e182c90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the pixmap created is null (perhaps because the size is null), then
don't paint into it. It might crash as we might end up with an invalid
device context.
Task-number: QTBUG-127085
Pick-to: 6.7
Change-Id: I03b3beabe02f150a2970013c15842369d3a27596
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b2b4bc2f2fb5de53e262c88023f278f782b80de5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a clean-up after a previous commit that needed the version
check for cherry-picking to 5.15.
Pick-to: 6.7 6.5 6.2
Change-Id: I914ca6ec184e2d7c376de4c7de6f2f0f7e9ecb22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4dd730f99fc95ad1e4c231dda70957b6c01df1b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt 5 had qint64 as __int64 on Windows, so using I64 was correct, then,
but MinGW was already using long long, so using I64 for all Q_OS_WIN
builds was wrong even then. So exclude Q_CC_GNU from the I64
formatting.
In Qt 6, all platforms always use long long, so no Windows-specific
handling is needed anymore.
Found by adding __attribute__((format(printf))) to qsnprintf().
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Icfa0afc6f0fe06e5d47684702097ac1d3da6cef1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ab74c1779ec2499758449d41999356a91bb82cf8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The mbstowcs() function is not re-entrant, and while we can probably
rule out that our test macros are being executed concurrently, we
can't rule out that other parts of the test concurrently execute
std::mbstowcs().
To fix, de-inline the code so we can re-use the existing
formatFailMessage() in qtestresult.cpp, which has already been fixed
before.
Amends 930e59b798d9e3d08e17440980d33a08fb411cbe.
Pick-to: 6.7 6.5 6.2
Change-Id: I61144af13a41ea0b4fba17bd232e660ef33dbd20
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit aa8a4be9e9eae82b6c6b8875371114dbfb3ec06a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function is not re-entrant, and while we can probably rule out
that our test macros are being executed concurrently, we can't rule
out that other parts of the test concurrently execute std::mbstowcs().
Use the re-entrant version and also fix the format string (%* requires
int, not size_t).
Saturation is ok here, because, while std::mbsrtowcs() will happily
return a value > maxMsgLen when dst == nullptr and the string is
longer, we will never actually print more than maxMsgLen of it.
As a drive-by, port to std and adjust the QNX comments to describe the
quirky QNX behavior, if, indeed, still present in the <cwchar>
version, better. This author had to go back in the git history to
figure out what it wanted to tell him.
Amends 2d8028d696a86102a7753f9d59fb41f4170181a8 (mbstowcs) and
d040681b6f3d03b349e9b9487fe89a611d03ee3c (%*).
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I6215713c643647727f73f4e2f2a7ac34204af40d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1579b18dfa49252318b4a2b3cfa83a4ce325ba0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Before we add __attribute__((format(printf))) to qsnprintf(), we need
to make sure our code is clean.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-127110
Change-Id: I7411ff0036482ad68bd5867b624518f68f249229
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 63295f43e70955a194602a7acf39013f124e14b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Axivion warning: "Compiler-generated constructor leaves some fields
uninitialized."
As the constructor of QSslError sets the error to QSslError::NoError
do the same in QSslErrorPrivate with NSDMI.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I0db85dffb5eda3a6c768e326f87a01f8c176e4f1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit bc34fe0e351d682584387dbfe5adee06ff59895c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QKeyCombination comes with a few operators that combine a Qt::Modifier
and a Qt::Key. These operators are normally defined in Qt's own
namespace (which by default is the global namespace), but indeed the
arguments are declared in the (nested) namespace `Qt`. This is wrong,
as their lookup will fail if a user places an unrelated operator| in
a custom namespace U and then tries to use QKeyCombination's operators:
the overload in namespace U will hide the ones defined globally;
unqualified lookup (as per [over.match.oper]) will search in the
namespaces associated with the parameters (QtNamespace::Qt), but the
operators are *not* in there!
In other words:
namespace NS {
X operator|(Y, Z);
auto kc = Qt::Shift | Qt::Key_A;
}
fails to compile if QKeyCombination's operator| is *not* defined in the
`Qt` namespace.
Fix this by indeed defining the operator where it belongs. The functions
are all inline and non-exported so there should not be any ABI issues.
Change-Id: I6d7a4e976fb109b7bf514011142b9a9573e507c5
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-126820
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1f77e8566f71d98f4bc6bbf5092594e67a32f268)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use std::snprintf() instead. Also use qToUnderlying() instead of
explicit cast to unsigned (so the compiler warns us should the
underlying type of he QNativeIpcKey::Type enum ever change) and
applyRAII to temporary toString() results.
Amends 32a06e983073080d939b4742996a3dc9cd75bb83.
Pick-to: 6.7
Change-Id: I4dd00672382d377285d722a47d998bdf12422eb4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit ce7b8fc91d82402cbed230e83c00cab3a54f9916)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add yaml instructions to run the license checker from the qtqa dev
branch, when the LicenseCheckV2 feature is enabled.
This is intended to replace the old legacy instructions that are
hard coded into Coin, that are activated via the 'LicenseCheck' and
'UseLegacyInstructions' features.
We can't reuse the old name and remove the 'UseLegacyInstructions'
feature, because Coin expects license checking instructions to be
added to a separate 'LicenseCheck' phase in the yaml file,
and doesn't allow doing it in the 'Test' phase.
A platform config should enable both the LicenseCheckV2 and TestOnly
features, to ensure the license checking doesn't wait for the build to
finish before running.
The instructions are added to
coin_module_test_template_v3.yaml and
coin_module_test_template_v2.yaml
so that we don't have to add them manually to all repo's
module_config.yaml file, but rather reuse the existing yaml files.
We add the instructions to the v2 file as well, because not all repos
have been ported to v3, like qtmqtt, which is not ported on purpose,
because tests don't pass there currently.
Note that so far, all license checking was done using the qtqa master
branch, not the dev branch. The dev branch currently has more changes
than master (many changes were not cherry-picked). That means that the
check might fail in some repos, and thus have to be fixed.
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Task-number: QTBUG-125569
Task-number: QTQAINFRA-3935
Change-Id: I715b99853aa041cb036d6b61b071746f010565d0
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 2a0e89981a52633c497f62bad0c7d26c466493cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QNetworkRequest::Priority has three possible values and all of them
are handled already by the switch. The default label also disables
-Wswitch, so remove it.
Pick-to: 6.7 6.5
Change-Id: I971a41ef9cbce237f5ff6ae5d28408cbf612eae3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 645f954d358117ebf1130ac9adc29b0835dad9d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "A constructor must initialize all data members of the
class" warning.
The class should accept initial values as argument of a (possibly
protected) constructor if it expects them to be set by a derived
class.
Add an enum Option and a protected constructor that can be called
by the derived classes with the enum values.
This makes setExpires and setShareable redundant so remove them.
Found by an Axivion scan.
Pick-to: 6.7 6.5
Task-number: QTBUG-125026
Change-Id: Ia8a2a19469a2c0185b5d2e6b2a0895e897f33f28
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 36aa5fc3fa361ecb6f7bb035c3cace3dd14735e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Just in case, warn user if they are trying to use callInterface on an
interface that does not exist (probably has not been registered)
Change-Id: I1a4b2226cfecd139e36ab6386ea2fe868bd73f3f
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 6643e97a89f06f0c32c3dff8b2c343eaa76c0e85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace it with a static variable that is in a static function.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I190003b2c798ceddfaf22bbf83786d8e98677721
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f4d2f3d1d158b501f0373f13cab12243ab99b3c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace it with a static variable that is inside a static
function.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: Ic85b683fddb18a389f1d461e4f7ab6b08bf8c3ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 51dbdb6f9bf41fa2d7a30c598e9bdc61eaece281)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QscopedValueRollback in
QHttpThreadDelegate::startRequestSynchronously
to handle a "Potentially leaking reference/pointer to local variable"
warning.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I18c7b9e2f4f8093393176eedfb3ed5a2604bf51b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 41f6338a7d8b848008d7906016bda498c13928e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was missed in the original patchset, should improve some input
functionality in embedded QML views.
Change-Id: Ie6c8e28d11c5c5336dd291027a179462c0b3529c
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit ca97e445bc976c1d89ac99e89cec4eeaec127b0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A peer can send a RST_STREAM frame for their own stream, so we have to
check if one such stream has been active instead of just our own.
Change-Id: I5a46b10df98809ed3d803bfb1a92a45ab7f7d961
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 0026b17eff313a0bb248a8d04593eb80f16f315d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace the only usage in QList with std::equal().
Change-Id: I2176b51a2943e0523073a435484a53a1c4ecb635
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 71a1f7c1ea2d11c5e84be5c9956f70c609bb8ebe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added a statement in the QList descriton and linked it to the
Qt containers and std algorithms
Fixes: QTBUG-94993
Change-Id: I12b75d147cb6e80036133547cc6365b3325c7e28
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4f66c10ba2f6234b7d404e7617b86eff567d657b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We cannot use memcmp() for that, as it incorrectly results in two
NaN values being equal.
Simply replace the whole self-written algorithm with std::equal(),
as it's doing the same thing, but lets the compiler decide when
to do the optimizations.
Amends db89349bdba2fcc03b2f7e2d23f549a9ec5dc0e3.
[ChangeLog][QtCore][QList] Fixed a bug when two QLists holding NaN
values were considered to be equal.
Fixes: QTBUG-127473
Pick-to: 6.7 6.5 6.2
Change-Id: If7e77549b4cbeb96711893d14344b9e0a40c1a87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cb3faeba3d9411ba82c311751bd7de36d0fec939)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For legacy reasons, the accessor class allows operator[] to go out of
bounds and just returns an empty string. However, we were returning a
pointer to the one-past-end of the array, which appears to have been a
null byte in the test.
Instead of adding branching code to load the length of the first string
in operator[], we can just add an extra null character at the position
we were returning anyway.
Pick-to: 6.5
Change-Id: I4878533dcb2d4b3e8efefffd17e4f876b43e9ee3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 8a768fe7db6ac5388fec6a68687817796b44439e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends 31ec108dd08d6381a15e49b6fbec9337705c3b2a .
framePositioning() was split from positioning(), which was skipped
before.
Pick-to: 6.7 6.5
Change-Id: I23dcfbe6012bb44c9b7c343b963e7338ddd16f28
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit e2165f0198ec09c5c0faa6bdb3dbec3b9ca482ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends 91079e64d89be5dbec6c9f33f84d3e483aec31e0 .
It needs to have a QGuiApplication object before the check.
Task-number: QTBUG-123172
Change-Id: I51929431e69e4584c46e2dc08ca9c33b48b900c6
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit e743931294d9d9c4e5a27d2644fd1cd354ce56cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC generates broken code with that option enabled, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115527 .
For simplicity I'm not building a comprehensive set of GCC versions
which do have the fix applied; I'll just exclude old ones.
Change-Id: Ia2f128cac633f8d72d5aedc5efe4e64e1c40c51b
Fixes: QTBUG-127507
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6c11f40701e9a406942dbcd2920c9b7d56b4af72)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QTest::qWaitForWindowActive() isn't supported on Wayland, however in
these tests what's required is a specific widget having keyboard focus.
Pick-to: 6.7
Change-Id: Ib47431351f60f4ee31d67563ce1892dc2e8149eb
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 3d3faa128508b6eb5fd656330cf3be0097844abb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDebug::toString intends to pass the input object's address to its
nested implementation, but was calling operator& which does not work
with types that has a custom overload. Calling std::addressof fixes this
problem.
Fixes: QTBUG-127510
Change-Id: Ie608f7b1a63c4032246b6ff98a3651695f0536ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 6cd6c3d6d70f8e76059153dd58ed2c61af2889b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Keeping DESTDIR set to "{{.InstallRoot}}" after installation has
potential to break other unintended CMake file(INSTALL) calls that
take DESTDIR into account.
This already happened for the CMake macOS POST_BUILD deployment API,
which accidentally installed into the install root, when it shouldn't
have.
Unset the DESTDIR env var after we install Qt.
We already do that in the cross-compiling Coin instructions, so this
brings uniformity to the host builds as well.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I6aca31e36c67c8d4b293efd746c37a42ea9ca834
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 02cb165ef8050230b477358e4136e9f0acd83eb6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow-up from commit c844a7a5.
The input element was taking up space on the html body,
and was offsetting the Qt app content, making it partly
invisible.
The element already has position: "absolute" which should
remove it from the layout, but it looks like it needs
to have a set position as well on some browser for that
to happen.
Pick-to: 6.7
Change-Id: I618d2561eb32e181797034d0b3005d716d4f6136
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit 59645a409b4b2a68a329b61d7e5837b6fd651a48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Axivion warning: "Compiler-generated constructor leaves some fields
uninitialized."
Initialize the wrappedUploadByteDevice as nullptr just like the other
pointer member variables.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: If4e0a0e169b1256e8aca3596d26d5532fc950a4d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 804fae2e463c1be34dc1e40207e4e715e3e2f1d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found this by an Axivion warning: "Compiler-generated constructor
leaves some fields uninitialized." but it seems that this struct is not
used anywhere else, so instead of initializing the member variable just
remove the struct.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I09bb8936241ece148debbd572c8441dc9d998ff9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a427e75d826c40cf3d39683bb7bd63126f00329f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code was all initially taken out of the QNAM protocol handler,
so it was using QNetworkReply error-values somewhat liberally.
That means it would emit quint32s with values from two different
enums and no good way to tell them apart.
Instead, just use the Http2Error enum for everything.
Pick-to: 6.7
Change-Id: I31be4e3ac8f0439478c22b173cd8830550d16ddb
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 28dd5e0a716039a058b9156509909c2da639909a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This will enable generation and linting of source SBOMs only if the
repository source root contains a REUSE.toml file. Otherwise the steps
will be skipped.
Task-number: QTBUG-122899
Task-number: QTBUG-125211
Change-Id: I87ea9aad7fb4f15ec7fa9d00072c81cddbe7ea2c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 186d368f0d613d7d1b60a6d1dc197269ab4db8f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add code to generate and install a source SBOM SPDX file for every
repo. It relies on the python 'reuse' tool being installed and
available in PATH.
Also add code to allow running 'reuse lint', which checks compliance
with the reuse specification.
The features are only enabled when configuring with
-DQT_GENERATE_SBOM=ON
-DQT_GENERATE_SOURCE_SBOM=ON
-DQT_LINT_SOURCE_SBOM=ON
which will be the case for our CI in a follow up patch.
Because most of our repos are not yet reuse compliant, the actual
generation of the source SBOM and the linting is skipped if the
project root directory does not contain a REUSE.toml file.
This allows incremental handling of each repository, while also
enforcing the compliance at installation time when the REUSE.toml file
is actually there.
The source SBOM generation and linting will run at installation time,
but they can also be manually triggered at build time using the
ninja 'sbom' and 'reuse_lint' custom targets.
Various opt outs are provided as a fail safe:
- QT_FORCE_SOURCE_SBOM_GENERATION to force source sbom generation
even if a REUSE.toml file is not present in the root source dir
- QT_FORCE_REUSE_LINT_ERROR to force linting to error out, even if
a REUSE.toml file is not present
- QT_FORCE_SKIP_REUSE_LINT_ON_INSTALL to skip linting at installation
time, but allow running it at build time
These can be set either locally or conditionally passed to CMake
inside repo-specific Coin instructions.
Task-number: QTBUG-122899
Task-number: QTBUG-125211
Change-Id: I664e69830936c4427688143ee86b98782c1733ab
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6d9b4291746907e30ea49ac0adf8608ad8a1129b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the missing dependency between qt_internal_android_<abi>_configure
and the last target from previous ABI-specific step in the chain.
This slows the Unix Makefiles builds, but ensures that there is no race
condition when executing configuring step.
Also as a driven-by fix the _qt_android_abi_steps property list, by removing
the parazite -NOTFOUND entries.
Pick-to: 6.7 6.5
Fixes: QTBUG-127414
Change-Id: Ibb69dcdebd2052a7aa1d4bd0c3f657cdeb312f37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 924dd10afc9f9137ce2da7643306d8df511c6ab9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some operations might want to install additional files next to the
repo sbom, with the same file base name as the repo sbom file name.
E.g install qtbase.source.spdx.json next to qtbase.spdx.json.
Make the output file path without the extension available in a new
QT_SBOM_OUTPUT_PATH_WITHOUT_EXT variable during installation.
Task-number: QTBUG-122899
Change-Id: I0b9442cffa3f3b0fd2387e77569a94e43ce387a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 35bd5df58932299221ad475ebaf25e2c0492e6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some Qt internal targets might not work correctly when built with
Intel CET hardening.
Add a per-target opt out to skip adding the Intel CET flags.
Task-number: QTBUG-127464
Change-Id: I1a28b228a82b3505d987649eec6db08281c15482
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit c5e42a9d2faef611e3a6d124d5b093670346fb87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "Overloaded signals should be avoided" warning: there
is already a method named "error" in QFileDevice, rename the signal
"error" to "networkError".
Found by an Axivion scan.
Pick-to: 6.7 6.5
Task-number: QTBUG-125026
Change-Id: I2f1b5752238aca614af82a94e2918399c582f74d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7f0450a47f2cab8c0482131475eba7162f4bdf8f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also store the version in one variable and reuse it, to make it easier
to update in the future.
Change-Id: Ib843a1cfa5c53233f9daa6c373d238f756eb4853
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 922e197bd3468d4c10b8fcd6377cd7b67f2541f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Tools that consume SBOMs expect that each SBOM package will contain a
unique purl: https://github.com/package-url/purl-spec
Each Qt target maps to an SBOM package, so generate a target-specific
PURL for each Qt target, by using the combination of the repo name
and target name as the purl name.
The purl external reference will then look something like:
ExternalRef: PACKAGE-MANAGER purl pkg:/TheQtCompany/qtbase-Gui@6.8.0
Also allow customizing the purl for each target by specifying one of
the following options to functions like qt_internal_add_module or
qt_internal_extend_sbom:
- PURL_TYPE
- PURL_NAMESPACE
- PURL_NAME
- PURL_VERSION
- PURL_SUBPATH
- PURL_QUALIFIERS
- NO_PURL
- NO_DEFAULT_QT_PURL
Task-number: QTBUG-122899
Change-Id: I6926dd773a0ef6fc688664bcac7b23483ecbabe6
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f6fdc1fe5fde253d7e70a2d2bbef42e9c411956e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently QJpegPlugin can load JFIF image without issue, but didn't
register jfif as recognized suffix. This add the support for jfif
suffix and will load the image as regular JPEG image.
Qt image formats plugins doesn't care about the extra metadata provided
by image itself, so it's fine to simply use the existing QJpegPlugin
to load JFIF image files.
Change-Id: I880d7603f356fbb01af7de8e4fb62fa010a0fd1f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 68f58ce198a794e7b2890f1127c99e0395d105a5)
libc++ has a "poisoned" set of relational operator overloads for
the standard category types. A call like
std::strong_ordering::equivalent == Qt::partial_ordering::equivalent
fails to compile, despite the presence of
operator==(std::partial_ordering, Qt::partial_ordering)
This is viable after converting strong_ordering. But strong_ordering
itself defines a
operator==(std::strong_ordering, CmpZero)
where CmpZero is poisoned and accepts Qt::partial_ordering, making
the call ill-formed.
I'm not 100% sure if libc++ is right here (cf. the linked upstream
bug report for some ruminations). We can work around this issue by
adding sufficient additional overloads to Qt::partial_ordering and
be a perfect match. For some reason this was already the case for
the other Qt's comparison types.
Notes:
1) I didn't test this. Only libc++-trunk defined the necessary C++
feature macros to trigger the problem; I made a synthetic testcase
and it worked.
2) I'm not sure why these operators are defined symmetrically instead of
relying on C++20's reversed operators, but I'll follow the
pre-existing ones.
Change-Id: I0937f40b7e685026d4677e7918948d47d2b7cec6
Pick-to: 6.7
Fixes: QTBUG-126541
Task-number: QTQAINFRA-6203
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b892b39a7a6c50eb5bbf03f0c9f01bdd07756f13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Addressing a "Q_OS_WIN should not be checked before qglobal.h is
included" Axivion warning.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I78c3df04a92aab8753c2651502d7893822523ed0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit df3c9f365f9543ec6491354f11103280ded0f3a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The variable expiryTimeoutSeconds is set by the function
QNetworkAccessCache::addEntry and as a parameter is defaulted to -1
so initialize it to -1 with NSDMI.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I8a96c2acbf94be409529200801d4d7169e852ac1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 9e75236a0dd157ca85e6f38870fac37214b683b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
SetupDiDestroyDeviceInfoList() returns TRUE (1) and not ERROR_SUCCESS
(0) so an assertion is triggered falsely on destruction.
This amends 5183ca14344c04015b32ef407e4cdad1b370c841.
Pick-to: 6.7 6.5
Task-number: QTBUG-127168
Change-Id: I03ea601e35c0cbcf44080379853e33362568122c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fcaaebd5c8d5323f050fdcf07d16dc37bdba197b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The second value (like the first) has type qint64 (aka long long), so
%d is wrong; need to use %lld instead.
Found while porting to std::snprintf() (qsnprintf() never actually got
the __attribute__((printf)), so compilers didn't warn).
Drive-by replace qAbs() with std::abs().
Amends 13c3558fe9967391374555cfeb3209b961a86084.
Pick-to: 6.7 6.5
Change-Id: I9082a1aceefe8a5b04ad0d5725ab666e23483b29
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 61e4be2b62f9b6556a145f226850bf5e62d53e9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some features are server-dependent and therefore an open db connection
is needed to make sure that the feature is available.
Pick-to: 6.7 6.5
Fixes: QTBUG-10016
Change-Id: Ia9a117a64ba5fe7cdd69bf95a41cfc301ab5fd94
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 139b8779469244dd1aa226dd3222e6e4aeb2c932)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The file had no protection against multiple inclusions. While current
code doesn't include it multiply, prevent it from becoming a problem
in the future.
Pragma once is sufficient, as this header is not installed.
Amends 32a06e983073080d939b4742996a3dc9cd75bb83.
Pick-to: 6.7
Change-Id: I97bbbb80f46c0e587288e8ebb4fa06ddd2e892be
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 235bb0926a94a73655a266c0ac038fa3a0a982cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When more than one relation is used, an internal container might be
resized which can lead to a reallocation. Since the internal data
structure holds a pointer to an element of this container, this pointer
is invalidated after the reallocation. Therefore store a QSharedPointer
instead.
Pick-to: 6.7 6.5
Fixes: QTBUG-60674
Change-Id: I18c6157c7328be201f8b89a7ca12f423a86d9b71
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c0aabbd8a0c5a01c2048bcaf36525570a8e0bb35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qsnprintf() does not make a difference between lvalue and rvalue
arguments, so the wrapper doesn't need to perfectly forward.
Use decay-copy via by-value arguments to potentially reduce the number
of instantiations required for the existing calls.
Adjust indentation so the continuation line doesn't need to be
re-indented when we'll port qsnprintf() to std::snprintf().
Amends 0e8eb20af43ca473b7a7639bb2941c9e6bad537b.
Pick-to: 6.7 6.5
Change-Id: Idcaa441517fdbf00fefd952db7928731779123ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fba67959acb7be39942aa3ce829f6764c46ad3ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move the virtual to at least make us call the right methods still when
encountering a platformtheme compiled against an older version
Change-Id: Idb6e75b71889c04b2a11e94492d0906dc8ddc84f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2b66952b83f048ebaf896691178910ed4e466ede)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test relies on things ending up in the h2RequestsToSend container
internally. For h2c we would have to use the http1 upgrade mechanism,
and while I have not verified it, it seems to not reliably put
enough requests in the container, and so the test is flaky for macos,
which is the only platform where we use h2c. In CI at least.
Fix it by forcing it by using h2 direct, which will work even on macOS
without server-side ALPN.
Pick-to: 6.7 6.5 6.2
Change-Id: I55816d400baa831524100f075e1b50fd3d9781a6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 4e827e42e339a2774be26ba844bd5e87a14d83b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some targets, it might not be possible to specify all 3rd party
dependencies information for SBOM generation.
qtwebengine is one of these cases, where the 3rd party targets are
only known to GN, and not CMake.
Add a new SBOM_INCOMPLETE_3RD_PARTY_DEPENDENCIES option which can be
passed to qt_internal_add_module and friends.
This will include an informational message into the SBOM package
comment field that the dependency information might be incomplete.
Also add an SBOM_PACKAGE_COMMENT option, which can be used to provide
further information if necessary.
Task-number: QTBUG-122899
Change-Id: I5e893e1e205aae4a5591a457be88d5db54fa8fc3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 04ade5acc923ae04142004551ce8c7560517d192)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
EXECUTABLE is not a valid option name, EXECUTABLES is. The latter is
already passed.
Remove the EXECUTABLE option, and add a guard to show an error when
there are unparsed arguments.
Task-number: QTBUG-127404
Change-Id: I981f6e53925d9b4a9e7ee23f6e80c69dc41e42e8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 869c6ee890ee740b9e99eca44730524d6a45d4b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Extract the non-template-dependent code into an out-of-line function
and pass the actual streaming operation as a callback.
Saves 4% (174811→167936) in executable size for tst_qdebug and 2.7%
(93639→91122) for tst_tostring on Linux GCC 9 AMD64 release builds.
Change-Id: If232e5b26c66981ffcb614f1bdb7007c71e879bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5cdd1f594d26e1d4f84b00741be1ab7231458512)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The usual qsizetype -> int problem. Fix by using auto.
Change-Id: Ie990dec39c8c33cdc055da6bfee451319825c934
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0cef4ae6870fdd57fd908cdecde3c6c426b7321e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code sized the buffer according to the UTF-16 size of the
input, but in fact wrote UTF-8 output, which can be up to twice as
large as UTF-16, overflowing the buffer size. Not a buffer overflow,
because qs_n_printf(), but truncation would create an invalid XBM
file here.
Fix by converting to UTF-8 first (and only once), and taking the
buffer size from there.
Introduced by 2883a6de408c991ecf6184d7216c7d3de6fa4f4f, which replaced
toAscii() (whose result has the same size as the input) with toUtf8()
(which can be larger).
Pick-to: 6.7 6.5
Change-Id: I4acc0816a94060520695c3e6895ed982812fdee2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6d3bd0ebeacc76178fc3c4c368e04bd642881a96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Their argument types are not faithful representations of a Stream
object, so ctors should not be implicit. Besides, the QDebug ctors
that delegate to these Stream ctors are explicit, too, with the same
arguments.
Change-Id: I8048e26e890009cc8f6bc3ce49e2c01af1e89514
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a9ab406a69f4edc4228cc2effbcde309fcdcf411)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qsnprint() is unconditionally called to fill the buffer and is
guaranteed to NUL-terminate, so there's no point in filling the whole
stack buffer with NULs beforehand. Leave it uninitialized.
The code was moved in 4ae6f40b3a2e2fe4f617a1c911c8d066c18cdab9, so not
picking further than that.
Change-Id: I34d456ebd2990aa242ccc42693adbbf1f64148de
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4c5b437a3ce84354dfa3bf2c4706e05144ac03a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are zero QDebug operators that take an rvalue RHS, so there's no
need to make toString() perfectly forwarding. It just causes four¹
different versions of the identical function to be instantiated. Not
all compilers can merge the binary representations and those that try,
violate the standard (same address for different functions).
¹ {rvalue, lvalue} × {const, non-const}
Fix by taking by cref.
Amends 40976532158fc49be45bb976455f48e98f9690cf.
[ChangeLog][Potentially Source-Incompatible Changes][QtCore][QDebug]
The toString() static function no longer allows the called
operator<<() to modify the argument. No Qt-provided operator<<() does
that, and operators that do are probably buggy.
Change-Id: Iac1ee9d29f93fd4840b75ffe363d354a2d19a96e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 13244eef6c913bb7f27cd8fbf459f5dfe9a0ed21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code from QTBUG-14414 (Qt4 commit
ee9455ed2a83084692d969c398ecb91bcd4fc33a) was removed in commit
199f9c54484b0dae3bc81f83c880a965192ecb24, due to an oversight: that
commit was only about images, while there's also the case of inline
objects that contain actual text. Such objects are easy to overlook
because they are not provided by Qt itself. They are however common
in applications that implement word-processor-looking "variables",
like a place-holder for "page number", for instance).
Pick-to: 6.7
Change-Id: I2ff1476583bdfe24abcc523cffb65ce116b7faf9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 99c1465215beac52fad4c6772c9bfef2209157e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a dependency for qmake and qtpaths. If neither of them are
built, because building tools might be disabled, skip building the
library as well.
Task-number: QTBUG-127334
Change-Id: I0f7d5bc9d9a4539a6d25f7c2d841e9b8978a83a3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 82b2c51c3aec148c890d732978ca4a881e5c6f82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We never added the qmake subdirectory if we didn't build tools. Thus
we never created a doc target to build qmake's documentation.
Make sure we add the qmake subdirectory regardless of whether we build
tools or not. qt_internal_add_tool can then make sure to skip building
the tool if necessary.
If the tool is not created though, create a fake qmake INTERFACE
library target, so that qt_internal_add_docs has a target to work
with.
Amends 5c352f47b977c72db323bb8e7b6ac25e1a453202
Fixes: QTBUG-127334
Change-Id: I41cc96fb6ad21e32e17d312ea474835dfa38528e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit aea0f89cfa4aca7e4c7b5056c425fb44ce394770)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QGtk3Menu relied on gtk_menu_popup, which is deprecated and no longer
supported from GTK 3.22 onward. This renders GTK applications
inconsistent, if GTK >= 3.22 is used.
GTK native menus aren't special. They do not blend in with e.g. a main
window or QML ApplicationWindow drawn by Qt itself. There is neither a
performance, nor a visual disadvantage of drawing own menus by Qt.
Remove support for native windows in the GTK3 platform theme.
[ChangeLog][Platform Specific Changes][Linux] Due to deprecation of the gtk_menu_popup() function, we no longer use GTK menus on Gnome: they are now rendered by Qt.
Fixes: QTBUG-124561
Fixes: QTBUG-126598
Pick-to: 6.7 6.5
Change-Id: I031751fb6e070444e99ab2bcac4c622ac509b4c9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7ffb4c16955a60ffc0f32d990c70476c49ed0b0b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qsnprint() is unconditionally called to fill the buffer and is
guaranteed to NUL-terminate, so there's no point in filling the whole
1KiB stack buffer with NULs beforehand. Leave it uninitialized.
Amends 930e59b798d9e3d08e17440980d33a08fb411cbe.
Pick-to: 6.7 6.5 6.2
Change-Id: I7da859d609ad4492c9038cb3e14f2a721b2acbe4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 47c2263e896408e733c9aa466aec388cc4b4a6ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can populate a container with the contents of the Java array as long
as the element types are convertible without narrowing (taking various
special cases into account, such as jstring to QString). The container
has to be either support emplace_back, or be a contiguous container
if a primitive element type.
The template helpers need to be in QJniArrayBase in order for qdoc to
accept the input.
Add test coverage, including static compile time tests.
Change-Id: Id9372deed5cf33446ee1969dc284a88991db2aee
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8f04defa1e3973faec19a9cb1ab9bbf1ea7fb031)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can create a QJniArray from any container that has a forward
iterator. A contiguous container can be used to optimize the code path,
as long as the element type is primitive (i.e. not an object type).
Fixes: QTBUG-126151
Change-Id: I21915f944d226d6d4f1113a54e5602ddc9cd727e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 71be7834e67216010dc74ed855dc7b513e302f1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Explicitly define (compiler-implemented) copy and move SMF's for
QJniArrayBase; we need to, as the destructor is declared, so without
them the compiler will implicitly convert an array to a QJniObject
and call that constructor.
Constrain the constructors and assignment operator from a QJniArray of
another type so that no narrowing conversion is allowed. Due to the
implicit conversion to QJniObject, we have to explicitly delete the
overload for narrowing conversions. Use the detector we have in
qobjectdefs_impl.h for that.
Make the detection helpers private, and add test coverage.
Change-Id: I1b2bb4435d52223567d20bb55ceb0d516e3b0b15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ebbf7b0fdf866190cd20e62d6b13c7c6808101da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't make a lot of sense to pass QJniObject instances into APIs,
but to be able to consistently treat QJniObject as an object type we
have to register it with the java/lang/Object signature.
Change-Id: Ic40e2676186bf327fa92764da51404985f74b565
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 82254fa836a21b5ec450a4ec7635e72403dded18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QJniArray doesn't store values, so at() always returns a temporary.
As we cannot hand out a pointer to a temporary, use a wrapper reference
struct that stores the value and implements operator->. It's all inline,
so we can move it out in the future to return mutable references, if we
ever want to enable write access to QJniArray elements.
Change-Id: I3962df6160db8c5b573d47ebb7975864f8ea7a8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 3d5af4b912e60beb791f874c2dbfef5597b9aad7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Adjust the button geometry to match window geometry.
Screen readers may visualize the geometry, and this
makes it clearer that the button is relevant.
Setting the clip looks to be sufficient to keep the
button visually hidden, even if the canvas (which would
normally be ordered in front) is missing.
Change-Id: Iff268cd2d8f52eead9be88e8cb460b0b445781a9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit e6c77a0b7eba75e8837dc7bcd98dbc1ba95318f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When passing -use-debug-libs to macdeployqt it will only consider plugins
that end with _debug.dylib, which is not the case for single-configuration
framework builds as of d3be87ff1d558f05309b1f29f7e71f291498584f.
When not passing -use-debug-libs macdeployqt will use whatever library
it finds, both suffixed and not, so the only case where we need to
explicitly make it choose one is when we have a debug-and-release
build of Qt. Otherwise we can leave macdeployqt to choose the right
one.
Change-Id: Ic438da9f21c3090f0d57ce615bc0c0969b9a600d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 60550f8acc4f9d742f6ef7cb027f0ed3e2d5e42a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QOpenGLWindow has been destroyed when QOpenGLWindowPrivate
destructor runs
Fixes: QTBUG-126845
Change-Id: I4f0208c4adf1a875cdcaca91fc239cf4e6200e4d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c337cdf39cc249560bf9a5380e308d09a4c13b95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The <QtLogging> documentation page is easily found, and from there it's
not easy to see that categorized logging is a feature. Add more links.
Task-number: QTBUG-125589
Change-Id: I214b9a561d6fc6b4c8600bc1b1eca04d856678d6
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7c344176d21e00a648bb504da735f174f70f0ad2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently for an indeterminate QProgressBar in QWindows11Style, a busy
drawing is triggered, consuming more CPU resources than necessary. This
patch avoids the busy drawing by using QProgressStyleAnimation, which
only triggers a redraw for specified Fps.
Fixes: QTBUG-127112
Pick-to: 6.7
Change-Id: I46da8ffcb849563c771dbc72af4c7e8b306b4802
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 384acdc1cf2cc6472c9eb9d2d79077736ded0e92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QSqlDriver::lastError() always contains the last error, it is not
a valid source to check if the last operation failed or not. Therefore
remove the check for lastError() when initializing the timezone mapping
- the function is optional since an old database might not contain the
timezone mapping table which is perfectly fine.
Fixes: QTBUG-127175
Task-number: QTBUG-125467
Change-Id: I22ea75c004654cead9a4461d2eaccfcbe8a116be
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
Reviewed-by: Hamish Moffatt <hamish@risingsoftware.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 9844da5036d7a7a185ddd4eb3fa59bc4ede9e5d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Honor the schema when retrieving the table record - otherwise we might
end up getting the data for the wrong table (same tablename but wrong
schema).
Fixes: QTBUG-127129
Task-number: QTBUG-122723
Change-Id: Ia3e9293dbdc77da760dd4d0702104048187fad5f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 920dfb2f443042777ea9547ff7a8beef56e90d92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It triggers vulnerabilities when loading the SBOM into tools that look
for CVEs matching those CPEs.
Task-number: QTBUG-122899
Change-Id: Ic4949ca5749ce4e297344760d3500d982c9a4449
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit ad0ed9fe307ac01ceb3fadd32816ada961a5afa6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QMetaContainer was not documented at all, so links from QMetaSequence
back to its parent class member functions failed.
Add generic class documentation for QMetaContainer. The QMetaAssociation
class is also undocumented, but since QMetaContainer's purpose is to
provide common APIs for both QMetaSequence and QMetaAssociation, mention
it anyway.
Fix warnings from incorrectly named parameters in the QMetaContainer API
documentation, which now gets generated.
Change-Id: I50a9f3ebf90b03f049804be2256ff135f57dab14
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 84be9b069c93afe62082ecd6aa5ec97ce44a8e0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit f2f00b2a4632aaeb58e6cdae7faef9e0bafaff49 ("QDnsLookup: implement
DNS-over-TLS") added the use of QSpan, but confounded the size of the
buffer array with the size of the query we prepared. The queryLength
variable was never used after checking if the preparation had failed.
Task-number: QTBUG-127073
Change-Id: Iac1ff680887641888e00fffd17e0e49faab1d579
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 59133b16cd3adffc70833bb2b81332c9649fa51e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't deprecate them, yet, because there are way too many users in
Qt and 6.8 is too close by now, but we should give users a heads-up
that better alternatives exist these days.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-127110
Change-Id: Ic14e9d12fc746fdc65d6c0006756c37339aa25f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3f54c71b78e4ed4ab513190bbcda89ae27256377)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a small and trivially copyable type.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I7990d07a7062472108ab3fff8a135f1917c4f7c7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8448292074e72095ed177d77910abe47a24f318c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A qNNfoo.h should always include qMMfoo.h, MM=NN-3, if that exists, to
avoid a user having to include both qNNfoo.h and qMMfoo.h, which later
become two <foo> includes on automated replacement. For the purpoes of
this argument, NN=xp is considered equal to max({MM : ∃qMMfoo.h}) + 3.
Following this logic, qxptype_traits.h should include q20type_traits.h
(q23type_traits.h doesn't, yet, exist).
It didn't, so fix.
Amends def2a3de3741410bbf7ab31b59afc27b0777e09b.
Pick-to: 6.7 6.5
Change-Id: I8153d241783dc4e505fddf2407d27990e5c522f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 720ae32f79038a5db763a2371c0e8d25d32d93cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Posix doesn't seem to specify whether the stack of cancelled threads
is unwound, and there's nothing preventing a QThread from
terminate()ing itself, so be extra careful to drop the mutex before
calling pthread_cancel.
We can't drop the mutex in general, as that would open a window for
the following race condition:
T1 T2
t3->terminate()
lock();
read ID;
terminated = true;
unlock();
----------- t3 exits naturally -----------
t3->wait();
t4->start(); // gets ex-t3's ID
pthread_cancel(ID) // oops, cancels new t4
But we can drop it when this == currentThread(), because said window
does not exist: While this_thread is executing terminate(), it cannot
at the same time exit naturally.
As drive-by, scope a variable tighter.
Pick-to: 6.7 6.5
Change-Id: I77a628e62d88e383d5aa91cfd97440186c997fc4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 272c0215c2058bc267abf0a247da878f652eaffa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... it is. Filed QTBUG-125730 to track this and discuss how to deal
with it.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-125730
Change-Id: I2c680e1a9e8dda43700468a544ac645e1fa3aa53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3ff55648cee8365fb7825ca7a038596b63757ea3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Include what you need, don't rely on transitive
includes. Forward-declare what you need in-name-only.
Also port the one unchanged include in the header
(qabstracteventdispatcher.h) to idiomatic form. It's an unrelated
change, but it looked so lost among the QtCore/ headers, I felt pity.
Amends e0573e73645c0f57e46332a94160e28eb6c8ebac.
Change-Id: I4f25df7465f08378bc4e003bde12c28f4d231f14
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 49d5b0a5a10634841122bbbc5e986ce307e7017a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the missing documentation for the QT_NO_UTF8_SOURCE. The property
can be set directly or using the qt6_allow_non_utf8_sources function.
Fixes: QTBUG-126435
Pick-to: 6.7 6.5
Change-Id: I2a255e6d4f761f14a2fa30ae51b4f671ed75586f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 37e6159ab0c1456e8dc38f38f3b21643585c1273)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was in fact present in v44, but we overlooked it somehow. The new
version also fixes some inconsistencies in the data, that I reported
against v44.1; in particular, Tamil no longer claims to override the
root AM/PM markers (probably because it uses 24-hour time so doesn't
need them).
Add the test-file under util to the list of files containing generated
content.
Conflict at 6.8 resolved by regenerating the data; this only changed
the date of generation, not the data. Then hand-edited the date to
match the picked upstream commit, to avoid future conflicts.
[ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to
v45.
Task-number: QTBUG-126060
Pick-to: 6.7 6.5 6.2
Change-Id: I81a5bcca49519b55091fc541de6b73b606661bb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f79548e268a496698d77d0e78365334d0e507212)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Document cycle_p.h's provenance - thanks to Morten Sørvig for digging
that up - and update to its version in the most recent release of
FFTW. Include patches to apply (after purging dangling hspace) for
future updates.
[ChangeLog][Third-Party Code] QtTest's benchlib now uses FFTW
v3.3.10's version of the clock-cycle counter, Cycle.
Task-number: QTBUG-126080
Change-Id: Ib59bc53e5d74cfdc889c03e78f9dd72100168f64
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit 6e7c158152cef6a1ae6a628f08661fcc4b27de90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Warning messages are by default emitted for qt.* logging categories. But
neither the end user nor the application developer can do anything about
this particular warning (which gets emitted on macOS when using the
touch pad) - it's only useful for Qt developers.
So change the logging level to debug.
Pick-to: 6.7 6.5
Fixes: QTBUG-125589
Change-Id: I36e6e553494054488209139e3238b7bd11bd170a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 2b021b2f927eaabbb3b7892b3dfe35d41368cf32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QThread::terminate() is documented to be thread-safe, but had a race
condition: If multiple threads call terminate() on the same thread,
the following could happen:
T1 T2
t0->terminate();
lock();
read ID;
pthread_cancel(ID);
unlock()
t0->terminate();
lock();
read ID;
(OS thread finishes)
t3->start();
(creates a new OS
thread with same ID)
pthread_cancel(ID); // cancels new t3!
unlock();
To fix, record that the thread was already terminated using a new
boolean flag.
An alternative would have been to fetchAndSet() the threadId to nullptr
and only let the thread that actually nulled it call pthread_cancel(),
but that would be harder to restore to the previous state in case
pthread_cancel() fails, and a null threadId might cause other problems
down the line, esp. if cancellation is currently disabled. The
explicit state is much simpler to reason about.
Fixes: QTBUG-127055
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Iec180bdfaaf913a3a1560210c781966dc99c0d42
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d8bd4c2306f2acfefc75f8163b58f2037596dc65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When building qt with QT_NO_DEBUG/WARNING/INFO_OUTPUT set, then the
qDebug/Warning/Info macros expand to `QMessageLogger::noDebug`. That
helper is not defined to take a logging category or category function,
so using `qDebug(lcX, ...)` breaks the build. The correct way to emit
categorized logging is to use the qCDebug/Warning/Info macros.
Task-number: QTBUG-125589
Pick-to: 6.7 6.5
Change-Id: I968b0e826871a09023c11fec9e51caa5a2c4dc0b
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
(cherry picked from commit 1e1c68017338c89265d6664a27f4137fc8960473)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 99c8ffb9f259760e45618f0988bbd79237d6d291. It fixed
QTBUG-104201, which in essence pointed out a state mismatch between
widgets and platform windows on Linux (X11 and wayland). Mismatches
occurred in the margins between calls to QWidget and async screen
rendering: While the widget layer reported the expected size, the
platform layer did so only after the rendering thread had finished.
As mentioned in the comments of QTBUG-104201, the state mismatch is
predictable, temporary and consistent.
By bridging the time gab, an async operation was made to look
synchronous. That gave more comfort to application developers. By
oversight, it broke code that relied on the platform window state
reflecting physical rendering. This has caused QTBUG-126479 as a
regression.
Both purposes can't be served at the same time: The platform window
state either reflects rendering, or the expected state. It's therefore
justified to revert.
Reason for revert: <Causes QTBUG-126479>
Pick-to: 6.7 6.5
Fixes: QTBUG-126479
Task-number: QTBUG-104201
Change-Id: I22380a6a463822a1cb4be90a44d2775954c7ca82
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 7d7be38d95eb82ef3e0be5250440072d8b5bc4b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The tests are needed for the next patch where we modernize comparisons
and wrap the pointer, which involves changing most of the functions.
Pick-to: 6.7 6.5 6.2
Change-Id: If635538bfca33e410e19472d32b9666d258f96a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b44541d8a42b7fc0b24cde4086b0030623280cc0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They were added because of conditional noexcept on the relational
operators that was preventing the other constructors from being picked
up by the compiler.
Now when we removed the conditional noexcept on the relational
operators, we no longer need this constructors.
This patch reverts bd581e35e7485cf42fbefd250be7b146737d9d41 and
partially reverts fff6562f8c074d75bda8b80f844dc63c6f2e64d5.
Change-Id: I22cb4507bff0a929a25d2f15caed66cc30d20dc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6cafe0f2b48c5f07f07de52490b1d07c7325557b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The conditional noexcept in comparison operators is known to cause
problems in various cases.
For example, we had a problem in QBAV, where gcc and clang tried to
expand conditional noexcept before the class was complete, and, as a
result, discarded some of the QBAV constructors (see
fff6562f8c074d75bda8b80f844dc63c6f2e64d5 for a more detailed
explanation).
Other problem is related to the GHS compiler which tries to compile
the noexcept specification and provides a hard error instead of
SFINAE'ing out in case of failure
(see e1f45ad8187947e243c8247c5cbac2d884d68d55 or
0ac0b412c754e53d167716f207be9d76a7fe16be as examples).
This patch reworks the macros to get rid of the conditional noexcept.
Instead, it demands that all operators are noexcept by default, and
adds another set of helper macros that can be used if it's not
possible to make the relational operators noexcept.
The new macros end with the _NON_NOEXCEPT suffix.
The patch also adds static_assert() to the generated operators to
verify that the proper macros are used. However, some platforms
(e.g. QNX and Integrity) fail to handle conditional noexcept on
lambdas, and so we have to use yet another macro to generate the
checks only on platforms that handle them properly.
This patch also applies the new approach to qtbase, adding noexcept
where possible, and falling back to the _NON_NOEXCEPT macros
otherwise.
As a drive-by: fix the macro implementation to use
QtOrderingPrivate::reversed() instead of manually reimplementing it.
I decided to pick the patch to 6.8, because it allows to fix some
questionable APIs (see QBAV story above).
Change-Id: I72f56778acb469f18b578b3418c0c41b4f6d62e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d292648d0bbac50388dae035dc34782accb3807f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to RFC 9113: A CONTINUATION frame MUST be preceded by
a HEADERS, PUSH_PROMISE or CONTINUATION frame without the END_HEADERS
flag set. A recipient that observes violation of this rule MUST respond
with a connection error of type PROTOCOL_ERROR.
Task-number: QTBUG-122458
Change-Id: I1a052b1f4fc80aa73fad4fc18e3c063fb738ae4e
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 10b7b7fcf06d4ed5492e946ac93eb232c168e686)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use SetupDiDestroyDeviceInfoList() to delete the returned device information set.
Fixes: QTBUG-127168
Pick-to: 6.7 6.5
Change-Id: I810e0f284e0d53d9b84d8c64022e566d6b740ab4
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5183ca14344c04015b32ef407e4cdad1b370c841)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 361d0b7222fd35133186571762640aada67fa39b.
The qmake behavior is fixed by b66ecb295ecc3981b1c21f01d62c9066f5d6e6ca
so that the original fix can be reinstantiated.
Change-Id: I5338e4cbebc963f48469e7492f18375e56a46200
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 39c36d3230ea26ff327bb1d727c1fd049932fb93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To be implemented in 6.9, but added here to avoid a
QAbstractEventDispatcherV3.
Change-Id: If8bd98f6299e39999d09b2c8857565d5fd890eec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 404ad4e17d9d36566881e0f398e24ccbc2af4a72)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Calling _qt_internal_expose_source_file_to_ide after a target has
already been finalized did run the function's fallback code for targets
that are not finalized at all. That added the source files under a new
${target}_other_files target, which is a tad ugly in an IDE.
A situation where this occurs is for instance:
- qt_add_executable in a subdirectory
- adding additional files (licenses, documentation, .ts files) to the
"main" target in the top-level CMakeLists.txt
The code flow is like this:
- enter subdirectory
- qt6_add_executable(foo)
- leave subdirectory
- qt6_finalize_target(foo)
- calls _qt_internal_expose_deferred_files_to_ide(foo)
- _qt_internal_expose_source_file_to_ide(foo bar.txt)
- sees that the target does not need finalization and runs the
fallback code
Fix this by immediately running
_qt_internal_expose_deferred_files_to_ide if a target was already
finalized.
Task-number: QTBUG-127052
Change-Id: I1eda9acd48442ba35c6c61d9a185f6ed9ed6307f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 469533fe8108cc56e90201919126502235c5cee6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake by default generates an Xcode project with an overridden
CONFIGURATION_BUILD_DIR Xcode attribute pointing to an absolute path
build dir.
Due to a bug in Xcode, that causes dSYMs not to be included in an
xcarchive after invoking the Xcode archiving task.
This can be worked around by re-setting the CONFIGURATION_BUILD_DIR
attribute to have the value "$(inherited)". That ensures that Xcode
places the dSYMs into an expected location, that can then be included
in an xcarchive.
Unfortunately overriding CONFIGURATION_BUILD_DIR breaks certain CMake
build path preconditions, which can result in broken behavior like
$<TARGET_FILE:app> genex evaluation not working, as well as ignoring
of the CMAKE_RUNTIME_OUTPUT_DIRECTORY property.
So modifying the CONFIGURATION_BUILD_DIR can only be done as an
opt-in, where the project developer knows the risks and can decide if
it will affect the project.
The project can opt into the risky fix by setting the
QT_USE_RISKY_DSYM_ARCHIVING_WORKAROUND cmake variable to ON before
creating any targets using qt_add_executable.
If Xcode fixes this bug in the future, we can make the variable a
no-op when we detect a new enough Xcode version.
Pick-to: 6.7
Task-number: QTBUG-126866
Change-Id: I37e8dee569fc45654f149219b8933769ed237fda
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ff1ba4f1c9da383b357745c2261de5b0050cdf3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake by default uses the Release configuration for the Xcode archiving
task, providing no way to choose a different configuration. CMake also
sets the "generate debugging symbols" Xcode option aka the -g flag to
NO for the Release config, because it is not the RelWithDebInfo
config. This means that by default the archived project will never have
debugging symbols.
Change the GCC_GENERATE_DEBUGGING_SYMBOLS Xcode attribute to YES for
all the release configs (Release, MinSizeRel, RelWithDebInfo), as well
as the debug config. This matches the defaults of a project created
in Xcode directly and ensures debug symbols are generated for all
configs.
Another issue is that the Xcode project generated by CMake shows no
values for the debugging format option, which is controlled by the
DEBUG_INFORMATION_FORMAT attribute. In contrast a project created in
Xcode directly, sets the Debug config format to "dwarf" and the
Release config format to "dwarf-with-dsym".
This prevents inclusion of the dSYMs into the archive, because the
dSYM would not be created in the first place.
Override the DEBUG_INFORMATION_FORMAT per-config. The release configs
get the 'dwarf-with-dsym' variant, while the debug config will have
'dwarf'.
This matches the values of a new project created directly in Xcode.
Each of these assignments can be opted out by setting one of the
following variables:
- QT_NO_SET_XCODE_DEBUG_INFORMATION_FORMAT
- QT_NO_SET_XCODE_GCC_GENERATE_DEBUGGING_SYMBOLS
These changes improve the defaults for a CMake generated Xcode
project, but are not sufficient to ensure that dSYMs are included into
the archive created by the Xcode archiving task.
For that, the project also needs to set the CONFIGURATION_BUILD_DIR
attribute to '$(inherited)' to avoid a bug in Xcode, where it can't
copy dSYMs out of a non-inherited build dir into the archive.
Qt can't do that unconditionally, because it violates CMake's build
path preconditions, resulting in things like $<TARGET_FILE:app> genex
evaluation not working, as well as ignoring of the
CMAKE_RUNTIME_OUTPUT_DIRECTORY property.
A follow up change will provide an opt-in to do that, but only at the
project developer's own risk.
[ChangeLog][CMake] CMake-generated Xcode projects will now include
debugging symbols by default, regardless of configuration type, and
Release-like configurations will default to using dSYM bundles instead
of keeping the debug symbols in object files, to match Xcode project
defaults.
Pick-to: 6.7
Task-number: QTBUG-126866
Change-Id: Ie17b40e53ba22658a098f9a162c7bcfb1711c45b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 7ccf30ae46272ace13bedc33ccf5f116ff57091b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There was a typo in the original change, which caused none of the qml
plugins in a prefix per-repo build being picked up.
Amends 06fef6219e992489dae15e9851725e1675ff0bf6
Pick-to: 6.7
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ibf14d9e0cbb0302c69d32071f4ba090f24a5798d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1ab33d575a6993ceb8d9482c20d5c7d6deb252ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtCore][QMimeDatabase] QMimeDatabase can now pick up XML
mimetype definitions from :/qt-project.org/mime/packages. GPL-compatible
projects which provide self-contained binaries can use this to provide
a copy of freedesktop.org.xml that will be used instead of the TIKA
mimetypes.
Change-Id: Id363317f920ae2cb1e054f32feb732e0e9168de3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b12542c964c15d074393a7594c97a96d5c2b047d)
Instead of freedesktop.org.xml (which is GPL), use the tika mimetypes
definition (Apache licensed), as fallback on platforms where
shared-mime-info isn't installed.
[ChangeLog][QtCore][QMimeDatabase] For licensing reasons, QtCore
no longer ships a copy of the MIME database from freedesktop.org's
shared-mime-info project, but the one from the Apache Tika project.
The tika definitions don't have icons or translated descriptions, but
are sufficient for matching file types.
[ChangeLog][Third-Party Code] Added TIKA mimetypes and the corresponding
attribution file.
Change-Id: I360ed973f6d89a470dc2f17a21abdf5630c6d15d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 74ad4cbeef40b1f51a59b3168f8c0b62eb0b29c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While adding senderPort to the initializer list of the constructor we
have decided that NSDMI would be a better approach for the member
variables.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: Ibc65251f99a66f1d7ee0c3570e608c2b534aa8b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5e2635e3456f2a4251f8194b3115382e63fdb49b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address a "Do call the base class copy constructor or assignment
operator, if you implement a copy constructor or assignment operator
in a derived class." warning found by an Axivion scan.
Call the assignment operator of the base class explicitly in the
assignment operator of the derived class.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I5a76c9ea96275d569b3a036b1e1b791c57d0042f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 84bb06fc5699c88b6edc175cc3cf67d88307481b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a small and trivially copyable type.
Found by an Axivion scan.
As a drive-by, forward-declare struct BitPattern at namespace scope
instead of in the argument of a function declaration.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: Ic3f58cb71a0fd0ad5b0555767af879e813612e72
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 9a41ea0934a745aa4e33280a2cf7a45372cb4073)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QTreeView indicators in windows style are drawn with the help of
windows themes. Sadly, indicators have to be drawn in the explorer
style.
This was already done correctly for visible windows. Hidden windows, however, using this drawing method, were not dpi-aware.
As a consequence, the dpi of the primary screen was used for drawing. This lead to wrong results on a second monitor with a different dpi.
Create a hidden window for every screen and use this for the painting
instead.
The fix can't be covered by an autotest. It will result in baseline test
mismatches, which must be accepted as new baselines.
Fixes: QTBUG-126533
Change-Id: Ie86cdb69f4cef1b293a5ac65541e5ada12959180
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 7f08822c499f624246d3f4c35dd97a7ba81d85ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's a value type and should implement swap.
Change-Id: I811377843b6ede1d6d750a701ae7a6b12434f4e6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0789dd8723b03d255ff203c717c5e12b6945015e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QJniObject is a value type with move semantics, but didn't provide swap,
so add it.
Make it safe to check a moved-from QJniObject for validity, and to
compare it with another QJniObject. As before, two invalid objects
compare as equal.
Change-Id: Ie08bb7c50da831f3e7e98e731e8ddbc0ebb3af78
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3e0c21691dd2be6911c417f4cbfaf54d10b4d634)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "A constructor must initialize all data members of the
class" warning found by an Axivion scan.
Just as the destinationPort is defaulted to 0 initialize the senderPort
to be 0 as well.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: Ifec55ba4b6c23a6feed2b4816d4ba6aae061f1cd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 213127a013b6ecafb36eae1014d5988198736712)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Save duplication of fetching and sanity-checking the locale-dependent
calendar index data by packaging it as a lookup function. This can
then take care of making the assertion of consistency with the
matching QLocaleData entry and also lets me add, without duplicating,
the slightly messy assert that m_data is what we expect (and are
relying on) it to be.
Task-number: QTBUG-126390
Change-Id: Ib514bee669956f432c007c858d01a9f7b6bbf86e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c9c498b5d1f5797c714fb07f06a84df881edb928)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 7ae19cee1c782fadfbd0c617568fdad8aba9a493.
Reason for revert: breaks non-cross QMake builds on
Windows on ARM64. The QMake mkspec is now reported as
win32-arm64-msvc, and apparently, QMake is not prepared for this.
Change-Id: I45c19719c6f0862580dbff09244337283305ee6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 361d0b7222fd35133186571762640aada67fa39b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The class has a move assignment operator, it should have a move
constructor as well.
Found by an Axivion scan.
Task-number: QTBUG-125026
Change-Id: I71fe066a84baede3a8cd309977a4a73d849dcfd1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 488362257d668760eb7bb60eb860570bd8b70d4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The class has a move assignment operator, it should have a move
constructor as well.
Found by an Axivion scan.
Task-number: QTBUG-125026
Change-Id: I301e8e3f275b0d5217afc1559947870ff87bcf45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 1caee12b1ac8cef3aabd8d2e319c88a84c64c585)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Usually apps created by qt_internal_add_app() are not meant for
installation on Android, and are excluded from installation using
qt_exclude_tool_directories_from_default_target().
Some repos might be missing the exclusion call, which means the app
would be built and installed on Android.
qt_internal_add_app creates MODULE_LIBRARYs instead of EXECUTABLEs
when targeting Android. While the SBOM machinery only expects
EXECUTABLEs for apps.
If the app target is not excluded (in which case the SBOM would be
skipped), this would cause the SBOM code to error out saying the
target type is unsupported.
To prevent further errors like this, add MODULE_LIBRARY as a valid
target type for qt apps.
Task-number: QTBUG-122899
Change-Id: I3ec80add22f0584638990171c59b78c24725c052
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d24936dbdc85d5fe875b5d3df702630df4d4ba9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make it clearer in fileTemplate() and fileName() that the returned path
will be relative or absolute depending on the specified file name
template.
Task-number: QTBUG-124653
Pick-to: 6.7
Change-Id: Iccb7a6d0ced2cadeacea7d14d3f6e924705b4d58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9a5e3e1f4064e275da3370f5dd27e87900da8c45)
Move the implementation of fromSecs() from the header to the
qtimer.cpp file and make it file-static. There are no callers of the
function outside qtimer.cpp.
Amends e0573e73645c0f57e46332a94160e28eb6c8ebac.
As a drive-by, rename the function to snake_case to indicate that it's
a file-static.
Change-Id: Ifa32df8a28816cd9cae44cdb9d481df94d33d741
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ba80845ed16b784ac00dcc9e7715e4605e3344ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pantheon is the desktop environment of elementary OS. It is written
in Vala, using GTK 3 and Granite.
Fixes: QTBUG-52292
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I01140d8a2f3b0f2736515c1279e5d3150a0c313d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d58e7a3b11a5879dad27689c008d83a24d500ad7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Started with fixing a "Class with destructor should also declare a
copy or move constructor and assignment operator." warning found by an
Axivion scan.
However, the NetlinkSocket struct is used only once and the behavior
can be replicated with a qScopeGuard.
Remove the struct NetlinkSocket and use a qScopeGuard for resource
management.
Drive-by: remove a Q_UNLIKELY that's not needed (qErrnoWarning() is
already marked as Q_DECL_COLD_FUNCTION).
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I6b770e284fdda3ff97b8cabac205e9b5abe88b14
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 954bf6e18eb691ea95dab866831492a4494eff03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the inline keyword.
As a drive-by, mark the ctors explicit and the dtor override, and sort
the SMFs idiomatically (dtor _after_ ctors).
Amends e0573e73645c0f57e46332a94160e28eb6c8ebac.
Change-Id: I2496360e1f72a4ab54a7c090ca966e1c4828a314
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit b05022e8473d5517f0a8b0c8c4d5dff6e31c5a97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and split code between header and .cpp file. The goal here is to
just sort the lines into header and .cpp, not to change them, so
temporarily define inline away. This allows git to reliably track
this as copy instead of independent changes. The inline define will be
cleaned up in a follow-up patch; fixing inline and re-indenting would
reduce the similarity score too much.
Also includemocs and move qsingleshottimer* to the (lexicographically)
correct position in CMakeLists.txt's SOURCES.
Fixes -Wweak-vtable (and therefore prevents this class from being used
outside QtCore (not exported atm)).
Amends e0573e73645c0f57e46332a94160e28eb6c8ebac.
Change-Id: Ia5304434fd1c9a56eb6f2f1988bd14a80ab61442
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1ef5f50e28edd1bdfcb3828c3858640ba347b2bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are (at least) three RFCs, all non-obsolete, purporting to guard
the formatting of multipart/form-data filename parameters, and they
all disagree: RFC 6266, RFC 7578 and RFC 8187. There is also
considerable implementation divergence.
So, to not have to hard-code any one of the different strategies, add
Options controlling the formatting.
Found to be required in implementation review.
Task-number: QTBUG-125985
Change-Id: Ibc82ff8a3460580ee70eafcaf9b88de36751940d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 49ab4f156b7d1a0593f25680d0b841d2dc4c348e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Nothing hugely consequential, although __VALGRIND_MINOR__ was
previously out of step with the version given in qt_attribution.json.
[ChangeLog][Third-Party Code] Updated QtTest's Valgrind headers to
version 3.23.
Fixes: QTBUG-126080
Change-Id: Ie2c9d41d4f35cd497b1dcf9a366cf4b319b361ad
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit efab6e69831c7fc8d35f18e211bda20f854f2f39)
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Our use of the clock-cycle counter from FFTW involved a rename of its
type ticks to our type CycleCounterTicks. This unnaturally bulks up
the diff from upstream, so undo it and use a simple #define to achieve
the same effect, as seen by our code.
Task-number: QTBUG-126080
Change-Id: Icbe9c413b73dd9213b95f183b71585f4a9c38de1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit ed7becd9cba582640f19704b5c439e5f6807bc29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move from tests/auto/testlib/selftests/ to
src/testlib/3rdparty/cache2/, so that its path includes a 3rdparty
component and it's isolated from the rest of the selftest files.
Instead, it's now grouped with QtTest's other 3rdparty components, to
make it easier, when doing a 3rdparty update, to see what might need
an update.
In the process, document where in the upstream to find the file to be
copied, if an update is needed. The file is generated, so document its
generator, too, in case its output gets renamed. There is no more
recent release than the 2.13.10 we currently have, so no update will
follow.
Task-number: QTBUG-126080
Change-Id: I371bac233b00318f59d6043fb245ab44b914bf8a
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit 31adb73e289d1bd93276af2b1df9bc356ba14766)
In the process, update the Linux perf_event.h provenance details to
make it possible to find the latest version. Also, remove 3rdparty
headers from the module's CMakeLists.txt (where possible) so that
anything that includes them makes its 3rdparty dependence visible in
the relative path. That can't be applied to cycle_p.h, though, as it's
used by the tests.
Task-number: QTBUG-126080
Change-Id: I3a7099bc123ba7188ad096714cb7ed45ff35a392
Reviewed-by: Jason McDonald <macadder1@gmail.com>
(cherry picked from commit b14906884c63b3f5f239d7d008eb23aba66836fa)
Coverity complains correctly that the variable is not initialized.
std::atomic's default constructor doesn't do it, and we only do it
in QThread::start and QThread::finished. So initialize it using NSMDI.
Pick-to: 6.7 6.5
Coverity-Id: 466429
Change-Id: I36d4624d46718f50e10bec17ef5e437c60541fa9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d1f6d2258809ed7e2d7aa50de3b6d6f472cf1bd8)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
XMP 8.2.1.1 says that a boolean shall be "False", not "false".
Change-Id: Ifa4d1038fe481389e2c3914548382ee9c3c88e66
Reviewed-by: Albert Astals Cid <aacid@kde.org>
(cherry picked from commit 1b80d03e0f1d2498c98c11f5b5dca8a6b1b29fd8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The build on Android with clang results in a bunch of irrelevant
warnings. Disable them for the offending lines of test code.
Change-Id: Ica5d867e3a2b1215dc526cc5f945a39ac908ac23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8d523a098cc8068400a6138970c6382f8f56224c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_find_package is only meant to be used for looking up 3rd party
packages. Using it with Qt packages can cause issues where we record
the Qt packages as 3rd party packages.
When using a developer build, issue a warning when qt_find_package is
called with a provided target that starts with the Qt6:: namespace.
Change-Id: Ic2a2d613dbf4fa7e7c51e9b73696bf14e4af866f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2339cb3ea282d4ad31fd74fd2a127a986a29a3cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Backstory.
The main reason why we keep getting "unable to promote 3rd party 'X'
target to global scope" errors when building Qt repositories, is
because we try to promote 3rd party imported targets in a different
scope than where the imported targets were created.
What were the main motivations for promoting 3rd party targets to
global?
1) imported targets are by default local to the directory scope they
were created in
2) we want 3rd party targets to be accessible across subdirectory
scopes, but looked up once, e.g. qt_find_package(JPEG) looked up in
src/gui/CMakeLists.txt, but the target should also be usable in the
sibling scope
src/plugins/imageformats/CMakeLists.txt
Having the package lookup close to the consuming qt module is easier
to maintain, because all the other 3rd party dependency lookups are
in the same file. This goes against the conventional CMake advice
where each subdirectory should look for its own dependencies, or the
dependency should be available directly in the root project scope.
3) to make the 3rd party targets available in the root project scope
as part of the following flow:
QtPostProcess.cmake ->
qt_internal_create_module_depends_file() ->
qt_collect_third_party_deps() ->
get_property(INTERFACE_QT_PACKAGE_NAME) ->
write 3rd party Dependencies.cmake file for each qt module.
Properties can only be queried from an imported target if it's in
the same scope or was promoted to global, otherwise you get
'non-existent target' errors.
4) for prl and pri file generation, where we need the targets to be
available during generator expression evaluation within the
relevant qt module directory scope
Here is a list of approaches I came up with on how to improve the
situation.
1) Make all imported targets global during the Qt build, by iterating
over the directory property IMPORTED_TARGETS and making each one
global.
Requires CMake 3.21.
Status: Already implemented for a long time, but is opt-in.
Pros: Relatively robust
Cons: Minimum CMake version for building Qt is 3.16.
2) Make all imported targets global during the Qt build using the
CMAKE_FIND_PACKAGE_TARGETS_GLOBAL variable.
Requires CMake 3.24.
Status: Not implemented, but can be set by Qt builders directly on
the command line.
Pros: Should be robust
Cons: Minimum CMake version for building Qt is 3.16.
3) Abandon the desire to have a single qt_find_package in a single
directory scope, and embrace the CMake-way of repeating the
dependency in each subdirectory that requires it.
Status: Not implemented.
Pros: Should be robust
Cons: A lot of qt_find_package duplication, will require rewriting
various code paths, QtPostProcess would have to be done at
directory scope, unclear if dependency tracking will still work
work reliably when there might be multiple same-named
directory-scoped targets, other unknown unknowns
4) Move all qt_find_package calls into a $repo_name/dependencies.cmake
file which would be read at project root scope. This would
potentially avoid all scoping issues, because all dependencies will
have to be specified at root scope.
Status: Not implemented.
Pros: No duplication
Cons: Dependencies are not scoped anymore to module directories,
won't be able to conditionally look for dependencies based on
module feature evaluation, not clear yet how this will tie into
standalone tests which are in tests/ subdir, other unknown unknowns
5) Try to promote as many 3rd party libraries at project root scope
as possible.
Currently we have 2 general locations where we look up
dependencies.
One is each qt_find_package call. The other is
Qt6FooDependencies.cmake ->
_qt_internal_find_third_party_dependencies().
Many 3rd party targets are created by
_qt_internal_find_third_party_dependencies() in the root scope, but
not promoted, and then we try to promote them in child scopes using
qt_find_package, which causes the promotion errors.
Starting with 58eefbd0b6169d0749b312268c1ae1e594e04362 and
37a5e001277db9e1392a242171ab2b88cb6c3049 we now record the provided
targets of previous qt_find_package calls.
So instead of waiting to try and promote targets later during the
configuration process, we can make sure we promote the targets at
_qt_internal_find_third_party_dependencies() call time, right
when we lookup the Qt dependencies of the qt repo, in the root
scope.
Status: Implemented in this change
Notably, we only promote 3rd party targets to global for qt builds,
and not user projects, to not accidentally break user project
behaviors.
Also, we only promote 3rd party targets, and not Qt internal
targets like Qt6::Core, Qt6::Platform, Qt6::PlatformCommonInternal,
Qt6::GlobalConfig, etc, for a few reasons:
- the code that requires targets to be global only cares about
3rd party targets
- promoting the internal targets is more prone to breaking, because
there is more than one place where find_package(Qt6Foo) might be
called, and if that ends up being in a different directory scope,
we encounter the same global promotion errors.
Some notable cases where this happens:
- tests/CMakeLists.txt brings in extra Qt packages via
StandaloneTestsConfig.cmake files
- qtbase standalone tests qt_internal_qtbase_pre_project_setup()
calls find_package(Qt6 COMPONENTS BuildInternals) which ends
up creating the Platform target in the root scope instead of
the tests/ scope
- Qt6::BundledLibpng links against Core, which ends up trying to
promote Core's internal dependencies Platform and GlobalConfig
To only promote 3rd party targets, we walk the dependencies of
an initial target recursively, and skip promoting targets that have
the _qt_is_internal_target or
_qt_should_skip_global_promotion_always properties set.
Pros: Improves the situation compared to the status quo
Cons: Still not ideal due to the various filtering of internal
targets and having to mark them as such.
6) Avoid promoting targets to global if we can detect that the target
was created in a different scope than where we are trying to
promote it.
We can do that by comparing the target's BINARY_DIR to the
CMAKE_CURRENT_BINARY_DIR and skip promotion if they are not equal.
Status: Not implemented, but we can consider it because it's
quick to do.
Pros: More robust than newly implemented approach (5)
Cons: Requires CMake 3.18, because trying to read the BINARY_DIR
property on an INTERFACE_LIBRARY would error out.
Also, if we implement it and make it the default when using 3.18+,
we might 'collect' a lot more hidden promotion errors that will
only be revealed later once someone uses CMake 3.16 or 3.17,
because most will probably use newer CMake versions.
Perhaps the trade-off is worth it?
Fixes: QTBUG-89204
Fixes: QTBUG-94356
Fixes: QTBUG-95052
Fixes: QTBUG-98807
Fixes: QTBUG-125371
Change-Id: I088a17a98ef35aa69537a3ad208c61de40def581
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d2e85cede01c0898ca73cbc3fb9f53aa9612cab5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They will used from another Public.cmake file in a follow up commit.
Change-Id: I71b69ed76ca48c391ba45329eb9c305e4a2a238b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit dad49f5a1e91dbdf91a683e0a68d05cdfa2e1ef1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Will be used in a future commit to do target filtering.
Change-Id: Iaf7039ff456ca11d94c44c6e12f63408d2aaa484
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4801d4c708f27a1c29118b0dccd24d2e0d3d6ccc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Introduce some command wrappers for adding the Platform,
PlatformXInternal and GlobalConfig targets, to apply some common
options.
This will allow for less churn in the future when we need to apply
options to all these targets.
The Qt6CoreMacros, Qt6AndroidMacros and Qt6WasmMacros inclusion are
moved before QtBaseGlobalTargets to make the
_qt_internal_add_library command and other platform specific
commands available before we create the Platform targets.
Change-Id: I260fdbeb95a39f06951dfefc714d3da604abb0bb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit af60bdee8dcb86b73caa23d4d54611b0f1d33bf3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This ensures that the EGL::EGL dependency is promoted to global in
the same scope as GLESv2::GLESv2 if it is a link dependency.
Amends c4d3e5d7d31d4cd2bfec35ba8c86aeb7329288b7
Change-Id: Ia156676b40e6d04a5037a305db35192cad306a0c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 52a3ab1eb23915b620948dceb577cf23c1b2391f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It usually looks up the Threads target, so we want it to be recorded
as a provided target.
Amends 58eefbd0b6169d0749b312268c1ae1e594e04362
Change-Id: I0f06aaae98fd99da8fb6436d232a147e163580a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8c0fb7e07de071de56a74fc637f448afc8bbd102)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The link to QChronoTimer::singleShot seems to ambiguous for qdoc, as
it's both a property and a method. But linking from startTimer to the
QChronoTimer (and QBasicTimer) class rather than singleShot makes
more sense anyway.
Change-Id: I499b1008b8460d9529b8afd00b5dafbb314ceea1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6bbc9c714bf067d33ad2f487c552025aaa7278db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The last requirement for making the iterator random-access, so
change category type.
Based on review comments.
Task-number: QTBUG-126150
Change-Id: I617f38f92d0f9279781e62ea3ab1929dbf6a07cd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e4b2d7607c0243f2a7ca3f38f59e8532c543fcc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Required for making the iterator random access.
Based on review comments.
Task-number: QTBUG-126150
Change-Id: I80ee8ed584747759acb17ee956551caba4d5bdaa
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c4e406e3792405cfc0b8cc97a29f136c0fd44a2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Required for making the iterator random access.
Implement compareThreeWay, add tests. Comparing iterators operating
on different containers is undefined behavior, so assert if they don't
match (even if they are different QJniArrays referencing the same
Java array).
Based on review comments.
Task-number: QTBUG-126150
Change-Id: Ib3b94558fc66fb9cff19139d2110c6bbd4ac14b5
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d04f38f6f5e49a81211ab598ba23049dc4ef1507)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We implicitly support QString, QStringList, and QByteArray, as well as
C++ types that are equivalent to JNI primitive types (such as bool for
jboolean, or int for jint) in QJniObject and some QJniArray APIs. Make
this symmetrical for QJniArray::to/fromContainer.
Add more compile- and run-time time test coverage.
Change-Id: I8cc84e6181a93f889282d2d3f0a05207416c4dbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d9dd8c4986373789b8bd250d0c2b36b660fe210f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Add a template parameter that is defaulted to what our logic would
select as the appropritate container type. If the type is contiguous
and the element is primitive, use the optimized implementation with
the JNI helpers for copying the entire array region.
Otherwise, use an emplace_back loop.
Change-Id: I669bc3261f111bc0c7e3dd2af8fd33293c083801
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a6b1f80cd6c833f6eb2fbfb778254cd7fcbc000f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
glibc introduced the glibc-hwcaps/XXXX path in glibc 2.33 (2020) and
removed the old, legacy "haswell/" prefix in glibc 2.37 (2022). This
means anyone deploying HW-capable libraries must be deploying symlinks,
so we are not losing functionality.
Because it says "glibc-hwcaps", I am now making this dependent on glibc
for libraries.
Added unit testing for this feature. Tested on Linux, FreeBSD, macOS,
and Windows (the QLibrary test SKIPs everywhere except Linux). We do
create a "libtheplugin.dylib.avx2" on macOS with this change, but won't
attempt to load it (Darwin has fat binaries so lipo(1)ing the files
together would be the right thing to do).
Change-Id: Ic0adfa808d28487a8303fffd17d9e78ec87bbd9a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit a1db2959129cb4630adfffcaaece19bafe16db77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Start numbering Android touch points from 1 instead of 0.
The QPointingDevice was added in Qt6. This means we don't need to worry
about unique IDs for each touch point.
Different IDs are needed for multi touch. The touch point ID of each
physical finger must be unique and immutable as long as either finger is
still pressed.
Theoretically, it doesn't matter from what value we start the numbering
of touches.
The problem with numbering from 0 is that the touch point can be easy
overwritten. It is enough to create QSinglePointEvent (like QMouseEvent)
and by default touch point with 0 ID will be cleared and lose all
current data.
Because of that, Android's touch point numbering will start from 1
instead of 0.
Pick-to: 6.7 6.5
Fixes: QTBUG-112287
Change-Id: I83a4678a0751bdb7a5ff5353ec49866d4cca5f05
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit cb3b972bb128e0ee9e4e18a49119934eee4f7c6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
realpath() is supposed to return the canonicalized absolute path, so
there should be nothing left to clean.
Change-Id: Ie30a3caf09ef4176bb36fffd17cde30c7538dba9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 31cf699e69808403b6533b08b3194af24cac2eab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QThreadPrivate::finish() cleanup code is not prepared to be
subjected to POSIX cancellation: if, like on glibc, thread
cancellation is implemented by stack ununwinding, we get exceptions in
dtors and therefore std::terminate(), and otherwise, we leak
resources.
It would be very hard to make the code robust against this, as it
would require all cleanup to be wrapped in pthread_cleanup_push/pop,
with the added problem that these functions need to appear in the same
lexical scope. Another alternative would be to move all cleanup code
into a thread_local destructor, but it's not clear whether code
running as part of thread_local destruction would be exempt from
cancellation, and it would be a major rewrite.
The simplest method is to disable cancellation for the remainder of
the thread lifetime in the shutdown code, just like the startup code
only enables cancellation after initial setup, so do that.
[ChangeLog][Important Behavior Changes][QThread] On Unix,
fixed a race of QThread::terminate() with normal thread exit (running
off the end of run()) which could corrupt QThread's internal cleanup
code. The fix involves disabling thread cancellation for the remainder
of the thread's lifetime once control reaches QThread's cleanup
code. If you rely on a PTHREAD_CANCELED return status, be aware that
this change may mask late cancellations. Likewise, slots connected to
QThread::finished() using Qt::DirectConnection are now run in a regime
where thread cancellation is already disabled. If you need
cancellation in that situation to work, you need to define your own
finished()-like signal and emit that at the end of run().
Fixes: QTBUG-127008
Change-Id: I23030eefdfcebf0a6d6796db5cbbbf0812ae12c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 01d4be4a8327458a3242804594b498f840480289)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The siphash qt_attribution.json file was moved to the 3rd party
directory out of corelib, without adjusting the attribution file dir
path.
Amends da2d3e914c1b3f9da17c40502c8e7c1463d35612
Change-Id: I25cf9b9f19bc596898d51449ef9561eb9882a046
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0b0b30f7cf900ea0463f4073f0e82d014920fd1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In windows CMAKE_SYSTEM_PROCESSOR can be set to both arm64 and ARM64.
Make the comparison case-insensitive when defining mkspec.
Pick-to: 6.7 6.5
Fixes: QTBUG-127044
Change-Id: Id0c8f04bc0ec6b70993e400f9c285168d4c1499b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7ae19cee1c782fadfbd0c617568fdad8aba9a493)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Doesn't test anything, just that it doesn't crash.
Turns out we have a race between thread cancellation and normal exit
(filed as QTBUG-127008). Worked around by adding an infinite loop to
run(), after terminate().
Android doesn't support cancellation at all, and our Windows
implementation hits QTBUG-127050, so skip the test on those
platforms.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I47a635a31caaf116d3688f31b9b5c5875e9765f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a9f7e75a2647732ff998f1c0d112682dbd5c4e28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove duplicated comment and code that sets and resets the environment
variable. As a side effect, restore the environment variable to the
value that was set before overwriting it, instead of un-setting it
bluntly.
Pick-to: 6.7 6.5
Change-Id: Ife0b2631aff27dbcb23079c2162ffed797b351dc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit f984a6ab7a99ace65e0d73c3f37ef6ad79dd0aa0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On macOS with secure transport, set QT_SSL_USE_TEMPORARY_KEYCHAIN
environment variable to avoid the permission UI, which fails the test.
Amends b1e75376cc3adfc7da5502a277dfe9711f3e0536, and makes the test pass
reliably on a local machine.
Pick-to: 6.7 6.5 6.2 5.15 5.12
Change-Id: Id70ceaecfa523d5183236464fe6cfaf4cdbadf4a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 14a61026216d20eb3a2893420b7d51374e820b44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We're getting load() == false but errorString() == "Unknown error".
Not backporting past 6.8 because of a new translatable string.
Change-Id: Ic0adfa808d28487a8303fffd17d9ee19ce074e4b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 2be44b57da951007ecab4d6c9e4bc2f3b5cd067a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
ActiveQt already has a tst_bstr, so configure fails for top-level builds
with both Core and ActiveQt.
Amends 93686386c078e2be03fb8bc42dee60a9e36fc23f.
Task-number: QTBUG-126530
Change-Id: I4a3d67d72be14202fe487f241ecd3d7c97936e29
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
(cherry picked from commit 43a54cbe82a59a32ae666ddd0cc54e5edd0ccf50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... to make sure that the follow-up patch does not change the behavior.
Pick-to: 6.7
Change-Id: I4a1898ce0987940622ff38fd70819a83d62515db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 27fe14cf430980b133694bc86d1224bd56e3faeb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The assertion is about entries at the same index having matching
language, script and territory tags. I forgot that the system locale
has its m_index set to match the closest-matching CLDR data table, so
might not have the same tags as the locale_data[] entry at its given
index.
Fixes: QTBUG-126390
Change-Id: Icb8cc09cc2a9d66a0af301a300f44923d7400ce9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1df1c0b6fdc40a3cb9e89c4d07adc89c37c7582b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
PDF/A-1 and PDF/X-4 require the use of an output intent. Insofar this
has been hardcoded to be sRGB. Instead, expose the relevant setting so
that the user can choose another colorspace, and set the metadata
about the intent.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
[ChangeLog][QtGui][QPdfOutputIntent] New class.
Change-Id: Ib3f0620477ddcc8b294a7039c120e89cc318f513
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit e8fcdf9bb6318e75d64179a6682481154cdef14f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Isolate the code inspired by the SipHash reference C implementation
in a separate file. This makes it clearer what code is available
under the CC0 license, and which not.
[ChangeLog][Third-Party Code] Adapted copyright information for the
SipHash Algorithm (used in Qt Core).
Change-Id: I9b8fc27a4e791c0f1ccbdfa6244d4fa47c7a219b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit da2d3e914c1b3f9da17c40502c8e7c1463d35612)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use an approximation of the "Unicode Standard Annex #31"
for checking the property names and enumerations.
Remove check for dynamic properties and use character literal
formatting for them instead, which will escape offending characters.
As a drive-by, use QStringView parameters for the check function.
Amends 53c8d1fe7c59f3462b85193b688d02ff353b51d5.
Task-number: QTBUG-126265
Task-number: QTBUG-126860
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I90fe555e64327e4164a17c1af0a734e4b1d834db
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit aae20da52a11e0ebb8c4f5fcfb95ce6744f659a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Darwin turns out to know about offset changes a million years into the
future, but to not admit to there being any transitions more than (a
bit over) half a million years into the future. It thus failed the
non-ShortData part of tst_QDateTime::timeZones(), thanks to using
correct offsets that showed there must be a transition in the
interval, but not believing in that transition.
The discrepancy leads to QTimeZonePrivate::stateAtZoneTime() getting
valid data for before and after the transition, with different
offsets, so amend its "no later transitions" early return to check the
offsets do in fact match. If they don't fall back on the code that
handles the case where we don't know about transitions but do have
offset data.
Pick-to: 6.7
Fixes: QTBUG-126391
Change-Id: Iefda439377ebc3025f2b754e2ec686fcc6361a1b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cb870adad612018e7007f4a1b6066b49d0f2dc4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
macOS only claims to conform to POSIX.1-2001, but has had utimensat
since macOS 10.13.
By enabling the utimensat code path, using stat.st_mtimespec as input,
we get nanosecond precision when qmake installs files.
Without this the tst_qmake::install_files tests fails due to the source
file having a sub second timestamp -- 2023-07-31 15:58:12.468 -- while the
installed does not: 2023-07-31 15:58:12.000.
The reason this test passes in the CI right now is probably because
the source file archive we use to pass test sources to the test
machines does not support the same level of precision.
Change-Id: I6ca7a2a2f9e71981814cbf496aa55717b3a3f74f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a2779192eec649a15b909cd9becade7eb0bda34e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
PDF/X-4 is a subset of PDF 1.6, aimed at printing fidelity. We can
support it with a few refactorings of the existing code in
QPdfEngine.
* Add the new PDF version to QPagedPaintDevice / QPdfEngine.
* Always write the XMP metadata, no matter what's the PDF version
used. XMP used to be written only for PDF/A-1b, but it's supported
by PDF 1.4 and 1.6 so there's little reason not to write it.
* While at it, ditch the search&replace approach for the metadata
and use QXmlStreamWriter instead, since it gives us extra
flexibility that we need (emit different tags depending on the
PDF version in use).
* The old code had a bug where the timestamps in the XMP metadata
and the document information dictionary could fall out of sync.
Just use one datetime object in both places.
* Add /ModDate and xmp:ModifyDate (required).
* Add the required attributes in the xmpMM namespace.
* Add a way to set the document ID to a custom UUID, and use it
in the XMP metadata as well as in the /ID in the trailer. Emit
the ID unconditionally, as it's been available since PDF 1.1.
* Emit the output intent for both PDF/A-1b and /X-4. This will be
amended in a future commit to let the user choose the colorspace.
The only missing bit is §6.5.4 of the PDF/X-4 spec. This imposes that
all symbolic TrueType fonts shall *not* specify an Encoding, and have
exactly one encoding in the cmap table. This is basically requiring what
§5.5.5 in PDF 1.6 only suggests (page 400). However it seems that we are
not embedding a cmap table when extracting a font subset, and that's
already violating PDF/A-1b anyhow. This is tracked by QTBUG-125405.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
[ChangeLog][QtGui][QPdfWriter] Support for PDF/X-4 has been
added.
Task-number: QTBUG-125405
Change-Id: Ia81f29b07b819eca5767c9f17692d92a3010f5ad
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2fbece8a73cb2d2692c78c38e1576c0c9c62fce7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We used to mark Q_DECLARE_SHARED all our value classes in Qt 4 times,
but since many Qt types these days live in nested namespaces that
macro, which only works in the QT_NAMESPACE, has become less useful.
As we use it in more and more places and eventually add more
responsibilities to it, we don't want every module to define its
version by hand, like QT3D_DECLARE_SHARED did in 2016 already.
So add two namespace-aware versions of Q_DECLARE_SHARED, to be used
inside or outside nested namespaces.
Extend the test.
Despite the name, this is not a public macro.
Found missing Q_D_S in API-review, so picking this to 6.8 to aid with
fixing the 6.8 API.
Change-Id: I367ca0d5b005b64090de44f7b7541d8639f9a4e0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 37b2b2ea4ef3cf494d23885de186a9519763e744)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit ae64c54f8cc2491988241a7433f5e8cfc6016ab4 broke configure
arguments like
--webengine-jumbo-build=20.
That commit transforms the argument to
-webengine-jumbo-build=20
but single-hyphen arguments take values without an equal sign.
We need to store the unaltered argument (with the two hyphens) for
further handling instead of the single-hyphen variant.
Fixes: QTBUG-126872
Change-Id: I243eb072dfe5535a648bd78bb3aeb3b9e0e4ede0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 76d5bceba7f1c553b02def689f2010db671ec60f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise we lose the scheme when reading it back as QUrl
Pick-to: 6.7 6.5
Change-Id: Ice6e083611c93641ef33f00fa48f1b32dc25f718
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 46ffca13fb0705c54ad05bc2c1a37f7d5fb5132d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Apple platforms we no longer _debug suffix libraries (and plugins)
in single config framework builds. This is a follow-up for logic in
qmake that didn't get adjusted in d3be87ff1d558f05309b1f29f7e71f291498584f.
Change-Id: I6461fca9da5c3ac1382ffc46e63409ef0150ad46
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 20d89a2710488ca5f9f6674c4c6d167f3a193383)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As part of 5ba0982b2879a1a4c13bf97467b8e5ad296e57a2 we started calling
QWidgetPrivate::setVisible instead of QWidget::setVisible when showing
children, to avoid setting ExplicitShowHide.
Unfortunately some widget subclasses wrongly override setVisible to do
initialization, which resulted in these widgets not running their init
code. The documentation clearly specifies to use showEvent or Polish
for this use case, but to avoid a regression we temporarily set a flag
that prevents QWidget::setVisible from setting the ExplicitShowHide
attribute.
We can not rely on simply unsetting ExplicitShowHide after our call
to QWidget::setVisible, as the call might recurse into logic that
checks ExplicitShowHide and wrongly determines that the show is
explicit.
Fixes: QTBUG-126721
Fixes: QTBUG-126218
Pick-to: 6.7
Change-Id: Ibf88340b68cb4fcb20ce3d8ec5b76de0fd2d2551
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fc4c6fb5f6bd6bd63b13f1f8b5b7a7289a5fd230)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We no longer support fake fullscreen mode on macOS, and haven't for
a long time.
Pick-to: 6.7 6.5
Change-Id: Ic2eb6065239c4e5be5ab2011a6da50272c77460a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4079ecfb9b3dc794212a81154e18145256741cfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the QCocoaWindow is created it picks up the QWindow geometry,
and applies that to the NSWindow it creates. But since we haven't
created an NSWindow yet for the first step, our logic to adjust the
window geometry when the positionPolicy is WindowFrameInclusive is
a noop. As a result the NSWindow gets a client geometry corresponding
to what the user requested as the frame geometry.
To fix this we hook into [QNSWindow setContentView:], where we apply
QWindow properties to the NSWindow after creation.
The tst_QWindow::positioning test has been split out into a separate
framePositioning test.
Pick-to: 6.7 6.5
Change-Id: I85fe6ad10aee8346202de3d55d6b2cd89915c5df
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 31ec108dd08d6381a15e49b6fbec9337705c3b2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Repeated return types
- Make member functions static
- narrowing int conversions
- Use auto *
- Use list.isEmpty()
- Use modern includes
- Remove redundant access specifiers
- minor fixes
Change-Id: I14ddf1add667536739fbb5fabb357dbaa7ef35c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 6346c5b426935a767575ea758e99749bc6544f54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of default-construction followed by move-assignment, delegate
to the move ctor instead.
We can't expect the optimizer to do this transformation for us, since
fromLatin1() is out-of-line and compilers are not, yet, known for
optimizing atomics (ref-count) around out-of-line function calls.
Amends 6abdbb65e59779af56ae25372a853efca19eac59.
Pick-to: 6.7 6.5
Change-Id: I75b747c4d5269ae125bf12cda57a1f718aa7a467
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f7853680ef68ce2495662ffc7c7a933655436f22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We seem to be using more and more of these, and their definition is a
bit subtle (need to have an explicit default ctor to avoid {} being
an initializer for the type).
Port the existing tag structs over to the new macro and add a test,
even though we found two users of QT_DEFINE_TAG in QtBase alone, one
of which is actually widely used (Disambiguated_t). There are more in
other modules.
Change-Id: I046bb2b70a2c7e79be2315d91c43e5fd2f0968a0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 74a87a329498422db0dea3e469fb84704accbb2b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We return a default-constructed QVariant. What else could we possibly
return? Right: nothing else.
So document it and add a test.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: If9808703b8ddfd15ceb013996741af8cd4efea12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d1a5e602df5978cee6bd263db77745f8047e508e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Check that it marks types are Q_RELOCATABLE_TYPE and adds the ADL
swap().
Pick-to: 6.7 6.5
Change-Id: Ibde0f4ad594e4a6b3636357da2fd211507293b60
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 91a96ea8fb100fca08b37eb3ba644083b3316e6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Says ubsan:
tst_qtconcurrentthreadengine.cpp:96:17: runtime error: load of value 190, which is not a valid value for type 'bool'
PASS : tst_QtConcurrentThreadEngine::stresstest()
Initialize the variable using NSDMI.
Amends the start of the public history.
Reported-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-115264
Change-Id: Ie55bc0a697a71074066294d64821c8a7a0d1f467
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 32442c2b52381f5e4164ae217453a8e8391d9349)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We try to pass QSlotObjectBase as raw pointer through the ABI
boundary, because we hope to have the template-wrapper tail-call the
out-of-line helper¹. But that means that the out-of-line helper needs
to ensure that it deletes the slot object on every possible exit from
the function. The old code didn't do that e.g. when the qnam check
failed, or, theoretically, if requestOperation() threw an exception.
The new code places the slot object under SlotObjUniquePtr guard as
soon as possible (but, due to amount of callers, not before
executeRequest()). Port createActiveRequest() to receive the slot
object already in a smart pointer. Tail-calling isn't required here,
because caller and callee are part of the same TU so the optimizer can
do whatever it wants. Unique_ptr passing shouldn't be that hard to
optimize.
¹ If we were to pass by SlotObjUniquePtr, tail-calling would be
impossible due to the need to run the unique_ptr's dtor after he
call to the helper.
Amends 9ba5c7ff6aa42c5701cf950d2137467a2d178833, but
e560adef213301318dcc13d4db155624846e0420 already had the
requestOperation() problem.
Pick-to: 6.7
Change-Id: I2ab5eadb35625393f274e3391d7b7c393ed8f08a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 11725d46344105325a1dec8628708ab88483ca12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... to be strongly exception-safe and call placement new correctly.
The old code could call user-provided overloads of new, because it
didn't cast the pointer to void* before calling placement-new. It
would also "randomly" stop when an exception was thrown. It correctly
updated the size of the container only after successful construction
of the element, but that's just weak exception-safety. There's no
reason this operation shouldn't be strongly exception-safe.
So instead of a raw loop around raw placement-new, use the
corresponding raw memory STL algorithms. They handle exceptions and
call placement-new correctly, and the code is both simpler as a
consequence, and more efficient, as it updates this->size only once.
Found in API-review.
Amends 73bf1c1a9bcc2615370d6a199420da0c6f380a44.
Change-Id: I535f393a3c378e1eea104bd3a05a274b9ec17964
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f699248c0f3ad44f09a422304870f40c1998a1a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Even though we've decoupled QIOSScreen from managing UIWindows, we still
have one UIWindow per screen, so we can pull out the bounds of that root
view to determine Qt's screen geometry.
Change-Id: I05993ad6d629dd2158681dd17355b7e216bfbb49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 16483487c4e37546cf296a72e137d49d28b55e05)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a RAII class the result of the constructor call should never be
discarded.
As a drive-by made the constructor explicit.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I651dda87b5191d50e111732d11bab8d5aa58e9af
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b9511f582a37b6dfc58d7ce9c2526565cda655c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And restructure the logic a bit for easier maintenance in the future.
Pick-to: 6.7 6.5
Change-Id: I6ff7396378bf02e177a4fb06978683474a79ad2f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 61b70bd7de91a2aab8609e1f878043d2aceb6bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "A constructor must initialize all data members of the
class" warning.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I46a7dd358d107670846fa35c0b02d2591258438d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 69bf95e2e05fb1ded0d74a7ebc5fa112e0854a5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't seem the property was ever used even at the times it was
introduced.
Pick-to: 6.7 6.5
Change-Id: I55d8b558e548908306178827c4149728ce35d0e8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3bfd1c4ded8cb4a7d1d501401a82e812fc631fc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
add_compile_definitions allows having the generator expressions as
the items in the definition list. add_definitions do not support pure
$<...> without the prescending macro name with the assignment.
Pick-to: 6.7 6.5
Change-Id: I1e79f1cf395b62b1e481eb0f3c74f93c61f06381
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 032fdcbcc00380e9a181f5adf2be767194bb35d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "A constructor must initialize all data members of the
class" warning.
Found by an Axivion Scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: If78cde6a9c3771eb87e62729523b848f2efc2d83
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6c755dcdd921431b26d22d499ebebb2a0b7de566)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change QFormDataBuilderPrivate to store a vector of
QFormDataPartBuilderPrivates and pimplify QFormDataPartBuilder such that
it stores a pointer to the QFormDataBuilderPrivate and an index into the
vector. This makes it robust against QFDP::m_parts reallocations and we
can make QFDBP copyable which has the benefit that if the user wants to
"go back" to an earlier part, she can do so by storing the result of the
original part() call by value.
Found in API review.
Task-number: QTBUG-125985
Change-Id: I56e9018e539457e9494751bdb62509f84a680889
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit aca8235c753d673abe7442cdf8b628fe4e05c471)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Ensure that -D is not prepended to the special sequences like generator
expressions.
Pick-to: 6.7 6.5
Change-Id: I295c289e3d188780d697ff8c62d8c8fc2df6522c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ff391b5c17309ca8b7bbbaef9028d8b31b847683)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The file was missing from both installation and inclusion.
Pick-to: 6.7 6.5
Change-Id: I3e904071cc28f674750aca38050fbe89d75a585d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 084911a67bde29e49bcb001d593e96fca7836142)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fixes some tests for MsSQL Server.
Change-Id: I38b1ce5c8761706cafe63a4969770104e8b07bfe
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 73311fb506834d23ca52daaccaa0901327d3e6c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Setting a query in forward-only or scrollable mode was done with
SQL_ATTR_CURSOR_TYPE in ODBCv2. Nearly all ODBCv3 drivers also honor
this value but some don't and need the ODBC v3 conformant
SQL_ATTR_CURSOR_SCROLLABLE attribute instead. Fix it by setting both
attributes.
Fixes: QTBUG-126118
Pick-to: 6.7 6.5
Change-Id: I6d974b7b3e94113b0a87f1cc7f8cff0deb53642b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 730de6fbb09f082f32dfa355502551a0d6b8ae34)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don'tprint a warning on empty connect options/when no connect option is
set. This ammends 5a03e5c51b4e5f699d4bf4cf10226758a10e8120.
Change-Id: I83ba8a34a3c08dc596c81ccb494f50af80f9b57c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 385c9397712b771e0f2c3f0a6322f0f624f09a8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Address the "A constructor must initialize all data members of the
class" warning.
Also, move the isCompressed bool variable next to another bool variable
to save some space.
Found by an Axivion scan.
Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I6f0e789a8188ff141ec7e4e4eb8a1823e8eea0d2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 13a04975fdc32ead6fe8dc78522e34de065c8908)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When building user projects replace the FATAL_ERROR about the missing
Qt targets with the WARNING and mention that the linking might be
incomplete. The updated check affected some user projects that used
the linking to the versioned targets and our deferred finalizers. If
Qt targets are not propagated to the global scope or not found in the
top-level directories, finalizers might fail to resolve these targets.
Now users will see the warning. The side effect of the missing targets -
missing plugin linking, or incomplete deployment, both use walk libs
results.
Pick-to: 6.7 6.5
Change-Id: I5c68b548122775424909c62f904f887417816fbc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b5fa9085146043c9d34025e273b5c9b9918d3db4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While available in their respective function level descriptions,
add a note about the behavior of the sortColumn() and sort()
functions in the sorting section of QSortFilterProxyModel's
detailed description in order to promote this information
to the reader.
Fixes: QTBUG-125718
Pick-to: 6.7 6.5
Change-Id: Ib7a3c206cd49b446b11063850d294da0811a282c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 014d2f075ebf811e560aad89a4e8de491e3a179c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In case of password fields, the narrator may return a emptry QString,
this was not checked when using operator[]. This patch explicitly checks
for an empty string returned by the QWindowsUiaProvider.
Fixes: QTBUG-126822
Change-Id: I9e2c3cfc5fb6dc9a7dd7badff4280f60b24c0a4b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 1ee349bf9d249ea45bc01c45473db44b9d335eed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the frame of ToolButtons in QToolBar area when not hovered or
selected
Pick-to: 6.7
Change-Id: I11bd7b513871d6d1e0d9bfba761acf061f50e524
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 85c4084331a1049d3e2377f5516cd0d93819ac04)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These seem to have been unused from the initial QSpan commit,
f82cf6333e4e21c96d8b6bb272392f8142ead2b7.
Pick-to: 6.7
Change-Id: Ifa00d042e750145b688a238099506f56f96bad0b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 281044015ff62eaf1473a6fd5f79709b077e19fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1. Use QWasmInputContext by default
2. Use QInputMethodEvent instead of KeyEvent
Todo:
1. Platform dependent preedit control
especially when cursor moved with preedit.
(Tested on Android, Linux, Windows)
(Firefox still has a problem but it's not clear
why PointerEvent doesn't happen.)
2. Apply existing text to inputMethodQueries.
3. Test on touchscreen devices.
4. Test on IOS devices.
5. When dragging selection, freezing
6. Support context menu
Fixes: QTBUG-107139
Fixes: QTBUG-124932
Fixes: QTBUG-117096
Pick-to: 6.7
Change-Id: Iceb6af3489b3d1195ad58cf8f3deb91275fd1bf4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit c844a7a5429e74d7cefb9774f288dbaa76fc2bbb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The color space meta data was retained through most image conversion
functions, but missed in the optimized code path for 90/180/270 degree
rotations.
Fixes: QTBUG-126575
Pick-to: 6.7 6.5
Change-Id: Icbd5aa71e88b4d2d79b00b3cadfe850e6714637b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit bea8beef85d1b5a163021ba4a671bbaddcc1738d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implement comparesEqual, declare the type as QUALITY_COMPARABLE.
Task-number: QTBUG-126150
Change-Id: I5a2371a850525dbf2e29fefa1a6cf85bb9b59cff
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b5ec0f7a4663f201167e856e5534d7fee5314e8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It can be hard to distinguish QThreads without object names when
debugging.
Change-Id: I42643495344063b7c05c7639dcc15c6600e617dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ba13bbd2d32652c8ffeef691c9a2ed3a7a65a82f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
WrapBrotli::WrapBrotliDec depends on WrapBrotli::WrapBrotliCommon.
OpenSSL::Crypto depends on ws2_32 and crypt32 on Windows.
These dependencies are currently missing in generated pri files, because
WrapBrotli::WrapBrotliDec and WrapBrotli::WrapBrotliDec are
UNKNOWN_LIBRARY. Currently only INTERFACE_LIBRARY's
INTERFACE_LINK_LIBRARIES are processed when generating pri files.
Pick-to: 6.7
Change-Id: I45a7ecbbb843adbe3aea7fdc68cec6c794015552
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 4dce218ac400afcb54aa2a85a0b27947fec583cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_find_package() sets QT_TARGETS_OF_QMAKE_LIB_<NAME> to all provided
targets, without checking if each target exists.
qt_generate_qmake_libraries_pri_content() iterates targets listed in
QT_TARGETS_OF_QMAKE_LIB_<NAME>. If a target does not exist,
qt_generate_qmake_libraries_pri_content() trusts it as a library name
and adds it into QMAKE_LIB_<NAME>_<CONFIG> directly.
3073b9c4dec5e5877363794bf81cbd4b84fdb9ee adds zstd::libzstd_shared to
the PROVIDED_TARGETS argument of qt_find_package().
When WrapZSTD::WrapZSTD is found but zstd::libzstd_shared doesn't exist,
QMAKE_LIBS_ZSTD now contains wrong content "libzstd::libzstd_shared".
Pick-to: 6.7
Change-Id: Id2a79d6c028a80e53d7b9a6a6d11f436d40dde65
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 56853235458799bbf993fa7f2fa19ecf9bbdae9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
FFmpeg records its library dir in INTERFACE_LINK_DIRECTORIES, its
INTERFACE_LINK_LIBRARIES are library names without directories.
Currently FFmpeg's linker flags in pri and prl files is broken,
such as "-llibavcodec.a" in QMAKE_PRL_LIBS (should be "-lavcodec"),
and "libavformat.a ws2_32" in QMAKE_LIBS_FFMPEG (should be
"-lavformat -lws2_32").
Fix this by enabling qt_get_library_name_without_prefix_and_suffix()
and qt_get_library_with_link_flag() to handle args like "libavformat.a"
and "ws2_32", to produce correct -l flags.
Also avoid adding duplicate "-L" flags in pri and prl files, since all
FFmpeg libraries are installed in the same location.
(Amends 2c49f85380d7ad79d9473e0f42e7afaa36d31af9 and
2915921ad2a79a4ce1651dc7297f6571788d1413)
On a Mingw static build with static FFmpeg, and FFmpeg libraries isn't
installed in compiler's implicit link directories. Before this change:
// mkspecs/modules/qt_lib_multimedia_private.pri
QMAKE_LIBS_FFMPEG = libswscale.a libswscale.a libswresample.a
libswresample.a libavutil.a bcrypt libavutil.a libavformat.a ws2_32
secur32 libavformat.a libavcodec.a ole32 strmiids ole32 mfuuid
libavcodec.a
// plugins/multimedia/ffmpegmediaplugin.prl
QMAKE_PRL_LIBS = ... -llibavformat.a -lmfuuid -lstrmiids -lole32
-llibavcodec.a -llibswresample.a -llibswscale.a -lbcrypt -llibavutil.a
After this change:
// mkspecs/modules/qt_lib_multimedia_private.pri
QMAKE_LIBS_FFMPEG = -lswscale -lswscale -lswresample -lswresample
-lavutil -lbcrypt -lavutil -lavformat -lws2_32 -lsecur32 -lavformat
-lavcodec -lole32 -lstrmiids -lole32 -lmfuuid -lavcodec
// plugins/multimedia/ffmpegmediaplugin.prl
QMAKE_PRL_LIBS = ... -lavformat -lmfuuid -lstrmiids -lole32 -lavcodec
-lswresample -lswscale -lbcrypt -lavutil
Fixes: QTBUG-126773
Pick-to: 6.7
Change-Id: I71a06c960a4f9b6010fc2847cc08833d58b74e1c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e154da485e83d2867da391088ea4acb31eef6293)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This also fixes a discrepancy in fileTemplate() API docs.
Pick-to: 6.7
Change-Id: Ie36278417406848db2a9759e996ce98b87d19f89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7fc2eae710c885e5152ed37c75fe6993c36c7171)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The whole point of separating comparesEqual() and compareThreeWay() is
that the former can fail faster than the latter.
To wit: segmentCount() is an inline operation and, for the common case
of SSO storage, a single byte read. compare(), OTOH, is an out-of-line
call.
So compare the segmentCount() before calling compare().
Amends ecb0878cbc3bc677d0f440950d2d1e304bcea495.
Change-Id: I3e46e73d4b8827532cc16428ca5e7f25bfa8608e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 9bd3d39b3fe2d760b9c484663bdc6c863a68e22e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code's use of ranged-for loop over a QHash would trigger said
QHash to detach. We don't require a detach here, so avoid this
unnecessary program shutdown slowdown using std::as_const().
Possibly-related: remove the pointless std::move() around QMetaType
passing - QMetaType is trivially copyable.
Amends 1697fbdf05ff643d617a9ba1614454926e86a3d9.
Pick-to: 6.7 6.5
Change-Id: I7b8d404e93ae4dde71a30e22e9e2f56a4b5354fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 167382beaad38fd7cbd9764abe76055544e61c20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It used to merely default-construct the QString member (which is just
zero-initialization), but since we discovered that we need to set
m_signature to empty instead of null, it's doing too much for inline
code (temporary QString (atomics), compile-time), so de-inline.
Amends ed6d1fa71a79a70b7e6a20fbbc737ed9f6c287b1, but since this is
adding a new symbol on non-Windows platforms, only pick to unreleased
branches.
Change-Id: I610dad86ac4a080f5a45495ebc9536aa1d0bcbea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 271876bbcecedccf66179bc46c26e78d04732d6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QDBusSignature default ctor is noexcept since
49f7281d36028055e61175c23bc455b4147480b9 (Qt 5.5-ish), so detach()
(which must needs allocate memory) cannot be used without breaking the
contract.
Fix by assigning ""_L1 instead, the canonical way to access the shared
empty state. While fromLatin1() isn't noexcept, fromLatin1(""_L1)
never throws.
Amends ed6d1fa71a79a70b7e6a20fbbc737ed9f6c287b1.
Pick-to: 6.7 6.5
Task-number: QTBUG-124919
Change-Id: I5f0c3bdc199998deaa22971a60388f8f3ed0eaa8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 11dbf821942dbda6e53d7bfcf378904318634196)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QBenchmarkEvent::nativeEventFilter() was changed with Qt6 but the old
Qt5 version was still there and no longer used.
Pick-to: 6.7 6.5
Change-Id: Ia740ce0dc743666c9b3bcbe12d1d310fb9ffcd7b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit ef215fdd8bd36c0312d657e0aafaa766d7c297f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The progress bar drawing only works correct when the topLeft corner is
at 0/0 therefore we have to translate the painter to fix the drawing in
such a case.
Pick-to: 6.7
Task-number: QTBUG-126426
Change-Id: I51086dab65cc0d4a360ee539e59e3f3f4af2a375
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 369b5a3194f69072a961283c4d5e19395e0d8b06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While retaining the old sorting order, this allows us to simplify the
ifdef'ery and produces much better code.
With Clang, an equality check is
vmovdqu (%rdi), %xmm0
vpxor (%rsi), %xmm0, %xmm0
vptest %xmm0, %xmm0
sete %al
in C++20 mode.
GCC generates four 64-bit loads instead of using vectors:
movbeq (%rdi), %rax
movbeq 8(%rdi), %rdx
movbeq (%rsi), %r8
movbeq 8(%rsi), %rcx
movq %rdx, %r10
movq %rax, %r11
movq %r8, %rdx
movq %rcx, %rax
xorq %r10, %rax
xorq %r11, %rdx
orq %rdx, %rax
sete %al
(the four MOV in the middle don't seem necessary)
For the sorting case, the compilers need to generate extra code
because of the check on the variant, something I'm scheduling for
removal in Qt 7.0. For long-term sorting code, both GCC and Clang
generate four 64-bit load-and-swap-endianness instructions, but Clang
for some reason also kept the 128-bit vector code (I'm guessing it's a
minor optimization bug that will be corrected in due time).
Change-Id: I46feca3a447244a8ba19fffd17dceacc8e528c3e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 15f753ca5a60b5273d243f528978e25c28a9b56d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We have one in the theme already. If that observer gets called we update
the palette from the system, and let the style polish the palettes. So
we can clear the cached cocoa controls when the palette gets polished.
Change-Id: I1dcfba67ca0d60f79741c0a0cf0d07c9fd217a9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cb9f5b5d0a538e69dbb099c5c8069fa8716e03cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When adding support for ARM64 hosts a typo sneaked into the mkspec
detection. This typo broke deployment for mingw builds.
This patch amends 81984807b30b1865a98fbd928a29d5ab6d8f5375
Pick-to: 6.7
Fixes: QTBUG-126775
Change-Id: I37ee3617dc6b92520250da3ff0665ce06cea1cb8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 3b789ed01e1efead3538b7cdc08f456e55f1d882)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Just as was done earlier with the autotests (in commit
8450ab8dec83f075ee028f35b3035c9478fa13ce), add the boilerplate
standalone test prelude to each baseline test, so that they can be
opened with an IDE without the qt-cmake-standalone-test script, but
directly with qt-cmake or cmake.
Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor
Change-Id: Iaf3d490211c5f3404bcc31f4dd0a6c02821f4232
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5d1ded3359ee8bffa33a4b83d5e72b855d61dcc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We cannot go from member function pointer to method index for slots (we
can for signals), so using string-based syntax to connect and PMF-syntax
to disconnect doesn't work, and vice versa.
Document this in a (partially failing) test, and add a warning to the
relevant QObject::disconnect documentation.
Task-number: QTBUG-126580
Task-number: QTBUG-126581
Change-Id: I4b17662aa9aa7b624049c5b0a3b046ed35230f05
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 27a3229626249a100d8e6fa495927715aba6963d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We have the encrypted() signal that lets users do extra checks on the
established connection. It is emitted as BlockingQueued, so the HTTP
thread stalls until it is done emitting. Users can potentially call
abort() on the QNetworkReply at that point, which is passed as a Queued
call back to the HTTP thread. That means that any currently queued
signal emission will be processed before the abort() call is processed.
In the case of HTTP2 it is a little special since it is multiplexed and
the code is built to start requests as they are available. This means
that, while the code worked fine for HTTP1, since one connection only
has one request, it is not working for HTTP2, since we try to send more
requests in-between the encrypted() signal and the abort() call.
This patch changes the code to delay any communication until the
encrypted() signal has been emitted and processed, for HTTP2 only.
It's done by adding a few booleans, both to know that we have to return
early and so we can keep track of what events arose and what we need to
resume once enough time has passed that any abort() call must have been
processed.
Fixes: QTBUG-126610
Pick-to: 6.7 6.5 6.2 5.15 5.12
Change-Id: Ic25a600c278203256e35f541026f34a8783235ae
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b1e75376cc3adfc7da5502a277dfe9711f3e0536)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By having all known a11y elements in the cache, the iOS Screen Reader will
stay up-to-date with the UI elements that are currently present.
Do ensure this behavior, the ctor is made private.
Fixes: QTBUG-126622
Pick-to: 6.7
Change-Id: I23452ffd60128889a49e5844a6fc17d45683cee5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9a6c32bed15ed3aa13ff82e15ac6834d6e7bdc3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... to handleSourceLayoutChanges(), as this is more in line with the
Qt naming guidelines.
Amends 675b4f63feab7c81c75e49f6dea82a39dd18f489.
Change-Id: Iea515693337b8b5332df192191bd9ec3e6cdd65c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ae7a8c84b0c65696ca6eda188bb54a50d8ef6e28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The value of QT_I18N_TRANSLATED_LANGUAGES is reflected in generated
Info.plist files. We should do the same for QT_I18N_SOURCE_LANGUAGE.
Pick-to: 6.7
Fixes: QTBUG-126790
Change-Id: Id9d680a183047942585e00f5d8cf1ac3c2352c9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ea435bb12766fea1a20cfdf67b8433593d20aeae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 10c3dd87d3bc2e84d4f477888622f5fc7ed5d502.
QtWidgets depends on the old QApplication::topLevelAt() behavior too
much, especially for the single top level window case. It's not easy
to be decoupled in this way.
Task-number: QTBUG-113404
Task-number: QTBUG-125878
Task-number: QTBUG-126313
Pick-to: 6.7 6.5
Change-Id: Ica9753bfc85f54ef24ff3db12ea954b06b50b1f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 04b8b61ce56d552c1240a8f5e3f089edc7b56f52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some of the function doc refers to icon engines, but the concept was
never properly introduced. Also explains why order of adding icon
files matter.
Task-number: QTBUG-125772
Change-Id: I342d3d90e3cb58f0c12b205a226aaf78b2136dac
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 17bf4cd98084ff882bdddb1bd55a9ee52613b4bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, disabled text colors were a darker version of the normal
text color. However, when the text color is black, the darker version
is also black, making the disabled text indistinguishable from the
enabled text.
To fix this issue, a source struct called `MixSources` has been
implemented. This struct contains the mixing sources. For disabled
texts, a mix of the background and text color sources creates a more
sensible appearance, making the disabled text look more like the
control's background color.
This solution does not require access to the system's color scheme, as
the disabled color depends only on the background and foreground colors.
Fixes: QTBUG-123449
Pick-to: 6.7 6.5
Change-Id: I469e4fc05ddd4851120b89646bd7ab17a3ee2c00
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 21a070052716c8ce1c471817b985f43e5b19af0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QComVariant RAII wrapper automates lifetime management of VARIANT
structures and elements that it contains. For example, it will
call IUnknown::AddRef if a COM interface is assigned to it. It will also
clear all held resources at destruction.
Task-number: QTBUG-126530
Change-Id: I543d236293d25cbc70ff25046e553351eccfb850
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 717580c1985dd0804363bafb8822f82dacfb3f90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This makes transfer of ownership explicit. The code is from ActiveQt.
If this patch is accepted, it can be removed from ActiveQt.
Task-number: QTBUG-126530
Change-Id: I613004ba784f87a9b935b2bbaead2205243c3033
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 93686386c078e2be03fb8bc42dee60a9e36fc23f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With ComPtr, transfer of ownership is explicit in the code because we
see the 'Detach' function being used.
Task-number: QTBUG-126530
Change-Id: I815c22f21b4a9b174d0d49ceb014bbffe41b6e82
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d7edf2894c94271c3794a85ecf24a24ce92d2fcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch reworks "Fix cache maybe invalid while the signal is actived
from queue" (80f44954f6872afb5aa37e6737c3e1ac68ad3577) and associates
a mutex with the QWindowsUiaProviderCache tables instead of with the
QWindowsUiaMainProvider reference counting. This makes it easier to
switch to using COM smart pointers to manage QWindowsUiaMainProvider
lifetime, where AddRef/Release may be called as part of copying smart
pointer instances.
It is unclear if the QWindowsUiaProviderCache tables can be concurrently
accessed, still this patch maintains a mutex to protect them.
Task-number: QTBUG-106653
Task-number: QTBUG-126530
Change-Id: I2fc3ba6b6666412ebc86461ebc8f008e1fd6a165
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit caa560931929d544ab816de09ba5f23912585ade)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A drag'n'drop operation on a screen with a dpr != 1 tries to scale the
(optional) QDrag pixmap. This results in a confusing warning
"QPixmap::scaleWidth: Pixmap is a null pixmap". Avoid it by checking if
there is a pixmap available before trying to scale it.
Fixes: QTBUG-122755
Pick-to: 6.5
Change-Id: I554675b79840e34ddd3f53153b68e913fd333122
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit db328ca975bc63f3baf3d021dcff1ea37fa6b6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a check for localtime_r/localtime_s to avoid the usage of a sqlite
mutex when a time needs to be converted.
Change-Id: I536497da1938131298c1198db85dab74d6157e35
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bcfa0102e5910d99263ebb73515cc9d35b818b5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As part of fee15182949e88682131399c50b679be83a75385 we enabled framework
debug builds, which left us with an inconsistent library naming. The
framework libraries are always unsuffixed, e.g. QtGui.framework/QtGui,
while we were adding _debug suffixes to the plugins and static libs.
This was confusing macdeployqt, as it uses simple string matching logic
for "_debug_" to detect that a Qt build is a debug build, and since
the framework library didn't have a suffix it then failed to deploy
the suffixed plugins.
We now follow the requirement from the framework naming and skip the
suffixing for all libraries in this configuration.
Change-Id: I982253fc46c65aa3fab52f8658f62ef63cdac49f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d3be87ff1d558f05309b1f29f7e71f291498584f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A static member in QCocoaMenuBar relies on the app having at least
one QCocoaMenuBar, and also stays around after the qGuiApp has gone
away, potentially leading to a crash.
As a drive-by, clarify the comment and variable name to point out
that we're closing popups on _any_ native menu opening, not just
menus in the main menu bar (NSApp.mainMenu).
Pick-to: 6.7 6.5
Change-Id: Ib14919e317d70e4c76f3d89c78331edb958bf048
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit daad2b28fdb884e6d796ab024bcb962155cf5534)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add rvalue-this overload to be called by corresponding
QHttpServerRequest::headers() method.
Task-number: QTBUG-125859
Change-Id: I2b12d2b80614f627c1aca514a10e1e86a2c5b24d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5e9212c1069604dd88fef9f0877459abeb87ad27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When creating non-aliased versionless targets, make sure we also add
the config-specific IMPORTED_LINK_DEPENDENT_LIBRARIES properties, so
that for older CMake versions, we still get the -rpath-link handling
of the dependent libraries.
Amends 173164cd477211e574c0d04abef51aa0f4c3f78d
Task-number: QTBUG-126727
Change-Id: I22618a51bd98cc851ec1a01a27086e0b878bee8d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 16f49f6a1c58919fb15c82d8381d7fc0ff5557ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a shared library target has private dependencies to another
shared library, they are exported by CMake into the target's
IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG> property.
This property then is read by the consuming project to determine which
file paths need to be added to the -rpath-link linker option.
Due to the simple logic that CMake uses to process this property,
if the project CMAKE_BUILD_TYPE does not match the _<CONFIG> part of
the property, the dependent libraries will not be added to
-rpath-link, causing link failures.
Make sure we explicitly set all the possible variants of the property
in our custom Qt6FooAdditionalTargetInfo.cmake file, to ensure we
always pick up the relevant dependent libraries for processing.
In conjunction with 173164cd477211e574c0d04abef51aa0f4c3f78d and
1c287cea291d2a88770ff02771845d2a34e80964 in qtbase, this should
hopefully avoid most -rpath-linking issues for QNX and Yocto builds.
Task-number: QTBUG-126727
Change-Id: I16a9cb5553d57e5ea3edc28cc2aab89c77f02a75
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9fe100e270cb5b60fe5d1100c0b5074226873213)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QGtk3Json::save() function does not save the palettes properly. The
bug was occurring as the QFlatMap::value() method returns a copy of the
value stored in the object.
To fix this bug, the QFlatMap::operator[] operator is used as it returns
a reference to the value. Then the update happens on the original value
in the QFlatMap object.
Pick-to: 6.7 6.5
Change-Id: Ib6f9e350f5447027de4d0a8e6cb8a84012ea8990
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit e17245505ea4ae2bdc05608114586bc5fa933d58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Whe the QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS flag is present the
AndroidDeployQt generates nested classes with the same name as target
and QML module names. When the target name is the same as the QML module
name, the code gets generated successfuly but will fail at compile-time
in the target user project.
With this fix, we detect such cases and fail early, providing a proper
output message
Fixes: QTBUG-125160
Change-Id: I6303d76bc437f7eee806e4429bef81b5fbeb1e27
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit abfeb4542c9107fa40511209d25bc7d0b5db1a8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1) Add a QBASELINETEST_MAIN macro as a replacement for QTEST_MAIN,
relieving the clients of reproducing the kludgy workaround
2) Add a -server command line option to baseline tests, as an
alternative to specifying the server in an environment variable
3) Fix command line parsing so that it exits on syntax errors.
Change-Id: I36f38267143a308e971e2e7b2fdbe4be44370043
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1036e9d4f1cbeb7c7e43b65eb1678b76ac4c2f2a)
Most QWindows are shown in main(), at which point the app is not
active yet. When the app is then activated by the OS only the key
and main window is brought to the front, leaving auxiliary windows
behind other applications. This differs from the behavior of showing
windows once the application is active, in which case all windows
will end up in front of other applications.
To remedy this, we bring all of the app's windows to the front
when the app finishes launching. But the way we do this fails
on macOS < 14 due to a bug in macOS, where the OS will deactivate
the app as part of activating all windows, resulting in losing
the original key (focused) window.
To fix the immediate issue we skip the workaround of bringing
all the app windows to the front on macOS < 14. Longer term
we should consider other methods to bring all the windows to
the front, e.g. manual orderFront calls, or deferring the
original orderFront that happened when setVisible was called
from main().
Amends b49211c12543c3369b286b507c4277c66ef9fdef.
Fixes: QTBUG-126043
Pick-to: 6.7 6.5
Change-Id: Ia9bc07a41daeb9e5b5b3306df08e5d97fa38f96f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2fcab872bc28b39b549d941ec6bb71bd25f20593)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These macros generate a a three-column grid of items in online
documentation.
These make for a clutter-free and more visually pleasing result
in many cases, compared to a standard \table layout.
For compatibility reasons, these macros continue to output a table
structure in offline documentation builds.
Task-number: QTWEBSITE-1144
Change-Id: Iab994b383f488dbd225c6a04d64cf41e2dbb20e9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit a65314d5da0176224279c11398ff3c76b4cf6878)
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
After mentioning 'resolve texture', link to the QRhiColorAttachment
class to provide more information.
Fixes: QTBUG-126165
Pick-to: 6.7
Change-Id: Ib6af6b238be2c1ee1f3b15ff08e39dc07d69515d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit c26bf302963e354ef0f2e3e0bb0a6a4f6dbafc22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The call to destroy() happened in QWindow destructor, after
̃QWidgetWindow destructor had run. This is to late since destroy calls
setVisible which ends up in QWidgetWindowPrivate which accesses
QWidgetWindow.
Calling destroy from ̃the QWidgetWindow destructor makes sure the object
is still alive when setVisible is called.
Tested manually by running the documentviewer demo as
given in the bug
Fixes: QTBUG-126456
Pick-to: 6.7 6.5
Change-Id: I2ca0384c453d59c5ffb9f3588d592701bebf3aa8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9b99361698219a73ce1b54fe56497560e02b2229)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To make menu items accessible in Cocoa we need to:
1- Tell the accessbility framework that the focused element is now the
popup menu
Since we don't give focus to the popup menu in Qt, we have to work-
around this in the cocoa accessibility framework by sending a
NSAccessibilityFocusedUIElementChangedNotification when the
QAccessible::PopupMenuStart event happens.
2- Ignore the PopupMenu role
In a native context menu in macOS, the expected accessible element
is not the menu itself, but the menu items. That is why we should
ignore the PopupMenu role and directly access the menu items.
Fixes: QTBUG-68465
Pick-to: 6.7 6.5
Change-Id: I6b45fa3c762734274b4288cddeb038018327a4fe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit b17a8a9b26368ea39d6cec36b39286ff1b307cd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added the text as a \note in QString::replace and QStringlist::replace
to make it more visible to the users.
Fixes: QTBUG-63485
Pick-to: 6.7
Change-Id: I519ab079ec86103a768f313cbc5ac625a0170839
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3e56757d651ffcba9ea65aa990b4e02b05e00b17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While not needed from the C++ side of things, the missing dtor in
conjunction with the out-of-line copy SMFs is freaking out style
checkers that check for Rule Of Three/Five/Zero, so just =default
the destructor.
Pick-to: 6.7 6.5
Task-number: QTBUG-124643
Change-Id: Ic21e7c0e4f0630d60eaff724e2f9d6897b720164
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dd7ad8f8ae44e1ad01c370cd4a0558c5e66efeb8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is not clear how this change fixes the issue. Maybe it is bad code
generation by the MSVC 2022 compiler?
Fixes: QTBUG-126702
Change-Id: I56f4be789aa3d1783d6305b59339984c99454bc7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit aa3e6ab27dacaef339997c85d3859bcf077b6db7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of retaining the data in the buffer forever.
The downloadBuffer function was only added because there may be data
received before there is a chance to connect to the signal. But then
there is no reason to keep it there forever.
Removing the downloadBuffer() function might be an idea at some point
in preference of using these.
Change-Id: I0b66676c8827570c5a25de2a28617880ccd9cf18
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit ff26a209eaac9a9013a0cc41185a38d448af97e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For a function whose only purpose is to count active streams it was missing
a quite important aspect.
Change-Id: I9110949c0f00acc9fb3bc115f7a66e0c0f4502d0
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3fe9c38053774ea3dd6b20d14dd664dd8464208c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pair up all calls to QWindowsUiaMainProvider::providerForAccessible
with a corresponding QWindowsUiaMainProvider::Release().
This fixes memory leaks when the Narrator application is running
for applications that are recreating UI elements frequently. RAII
ComPtr is not used here because going directly to ComPtr would make
the change harder to review. Switching to ComPtr can be done in a
separate patch.
When the Narrator application is running, we may see that the memory
usage temporarily increases, but it is reclaimed later.
Fixes: QTBUG-126530
Change-Id: I1fd76da5759354633dbf040ba42a007d349264a6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 0e65cbc82fbd8585a201c7feb16df410078a8cfb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If QWindowsUiaMainProvider::QueryInterface does not return an interface
after successfully calling QComObject::QueryInterface, it must reduce
the refcount because no client will do it on its behalf.
This reduces slightly the leak rate of QWindowsUiaMainProvider
instances when no Narrator application is running.
The patch also fixes an issue where the returned pointer was still
pointing to a valid object even if E_NOINTERFACE was returned.
Task-number: QTBUG-126530
Change-Id: I96c4f6e8cfcee41e80e49f3fc874e2e0cdfa55c1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a9561e15e86d65e732da7f07d712325c8f16d7c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a minimal fix to reduce leaks of BSTR instances from
QWindowsUiaMainProvider. Introducing a VARIANT wrapper can be done as a
follow-up task.
Task-number: QTBUG-126530
Change-Id: I0c146049644517aca1b6ad7b096833faf5296329
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a03931095dde102fdfac82e8f6dd874706cadc6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The sources pull in X includes that don't play well with unity builds.
Change-Id: Ie50aa6663adc45c86d1798872239b256c1803638
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 48e896baf6e317985c33a761048ef18b089ff891)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a prerequisite for making QFormDataBuilder::part() return an
existing part instead of creating new parts with the same name
(idempotence), which was pointed out in API review.
Task-number: QTBUG-125985
Change-Id: I642e56cc7cb3562304573930a01aa1aafa817f36
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 9503e2c92c2d3b8f5bb9c86274d2430eb0a57880)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... by adding more arguments, but then constraining that they don't,
actually, exist.
This makes the the signature of a normal qHash(T, size_t) consistently
a better overload (for same T) than the 1-to-2 adapter. It doesn't
solve the problem that the adapter inserts hash functions for types
that were never defined to be hashable (cf. e.g. QTBUG-116076). But
the adapter is already slated for removal in Qt 7, which will solve
the issue, though maybe we can expedite its demise in 6.9.
Add the test from the bugreport to tst_QHashFunctions.
Fixes: QTBUG-126659
Change-Id: Idb3f275f0409652d55b318d56092764371269c06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 798c23189c7fb73629c1a98361cb1f50446fecf1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some compilers are picky about that the declaration needs to match the
definition also for the inline keyword:
qt5/qtbase/src/corelib/io/qfilesystemmetadata_p.h:239:27: error:
'QFileDevice::Permissions QFileSystemMetaData::permissions() const' redeclared
without dllimport attribute after being referenced with dll linkage [-Werror]
239 | inline QFile::Permissions QFileSystemMetaData::permissions()...
| ^~~~~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors
Fix by declaring the function inline, not only at the definition.
Change-Id: I68d1fd2f9952ec3bf54b1ba27461bf1751c9d301
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
(cherry picked from commit b950ec2525af789b3d447218ae62906c2f78f5a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dogfooding the new QtTest 6.8 feature. Allows to get rid of a wrapper
macro.
Rename the underlying lambda to use imperative mood.
Change-Id: I6e7513c7e4052d157be4b7609f2fbbc99ad3c7e6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit e357dcb8d72d14a3bd59c1532ac2a0b13e6ded1f)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
By moving the "isDir" check to the end of checkAndPushDirectory().
The other checks could be done without calling stat(), depending on the
implementation. E.g. readdir on Linux (and BSD) fills the d_type field
in `struct dirent`, so we know if it's a symlink without stat'ing, but
to know if it's a symlink to a dir, we'll have to stat.
Thanks to Thiago for pointing this out in code review.
Change-Id: Iad9e954413afddfd4eb4890fb475655cda668385
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 104f8b23f236b1abd840eeaa4b82f54412d8a3b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drive-by change: check the return value of QFile::open() to avoid a
compiler warning about [[nodiscard]], and to show users recommended
practices.
Change-Id: Iba55962c8beb008e63ad9da42e611371e7f8a6e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 834ff5f996aa6f93180e898db13c146a24e1f85a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By extending IteratorFlag so that it replaces both QDir::Filter and
QDirIterator::IteratorFlag enums, but with better defaults (based on how
QDir/Iterator is used in 15-20 years worth of code in Qt and KDE).
Make the QDirListing(QDir ~~) ctor private, also change it to use
QDirIterator::IteratatorFlags; it will be used to port existing code.
If QDir is ported to use QDirListing::IteratorFlags, instead of
QDir::Filters, a public QDirListing(QDir) constructor can then be added.
Fixes: QTBUG-125504
Task-number: QTBUG-125859
Change-Id: Ide4ff8279f554029ac30d0579b0e8373ed4337f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e583c3d5163a5512abac85e32359652e28a053f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
TlsKeyOpenSSL has a custom constructor but no other special member
functions. Instead of disabling them in TlsKeyOpenSSL, disable them in
the base class.
Amends 1a0da3ae69964142b3a31d87ecc88a925006a4de.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-125026
Change-Id: I54f3ac01f89a21b8665c4d82a8f38dedab9bb5c3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 05d4740623477eda83c1ce544aeadffba3014806)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The class has a custom destructor, we should handle the other special
member functions as well.
Found by an Axivion scan.
Pick-to: 6.5
Task-number: QTBUG-125026
Change-Id: I172aeb02d81a0f66ab724892d9f938a12f371ffa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit d8e86a93303244286881d732aa570cb551b230e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They were added in 6.8, not in 6.7.
Amends 675b4f63feab7c81c75e49f6dea82a39dd18f489.
Change-Id: I4cb84a592dc60d3ca0a8b98c6436b324817d1c55
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 3fccdd541b6aa5f4ef785b3f4b19d215969165c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The commit af6afad3b390c0ed7de6d3c4314cc394d8f8e2c2 reordered the
virtual functions in the Qt 6 block, which is known to be BiC.
This patch restores the order of the virtual functions in Qt 6 block.
To save some #ifdef'ery, it also duplicates the unregisterTimers()
function declaration in the Qt 7 block.
Amends af6afad3b390c0ed7de6d3c4314cc394d8f8e2c2.
Found in Qt 6.8 API review.
Change-Id: I30ff670fd89d37ee4261f77d16f1388dff8f6680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4f164ca9bc27338056ccf597e1aa00d3c4a1e88b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "many-0 max dec" tests check if a large number (512) of leading zeros
interferes with parsing the number.
The std::from_chars implementation available on VxWorks cannot handle
strings longer than 255 characters.
The number is properly parsed, but the ptr returned as a part of the
std::from_chars_result does not contain the correct result.
It should point to the end of the string (as there is nothing left after the
number), but it wraps and starts to point to other places.
This leads to a wrong value returned by qstrnto(u)ll and to a failing
test.
The issue has been acknowledged by WindRiver. For now, blacklist the
"many-0 max dec" tests.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I0a897728c71503e6817c69f8ced8ebb0a45295af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aea27282b783059ef52e928e811029cedb98ebf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A list view should always expose a table with a single column to
accessibility tools even if the underlying model has multiple columns.
Several functions need to be changed so that they only consider the
model column that was set on the list view.
For a list view logicalIndex() must only consider indexes for the
model column. For valid indexes the logical index is simply the row
because list views have neither row headers nor column headers.
The column count for list views is always 1 (unless the model has no
columns). The child count needs to use the column count of the
accessible table instead of the column count of the underlying model.
child(), cellAt(), selectedCellCount(), and selectedCells() get
separate implementation for list views.
Fixes: QTBUG-33786
Pick-to: 6.7 6.6
Change-Id: I18c604efa2014267bb6e3b68e403e436bdcbc4ce
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit cd00ce4bea6f0386048bd267495433cffe83ab12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The android multi-ABI builds should consider the
QT_USE_TARGET_ANDROID_BUILD_DIR value too. Propagate the value to
the ABI-specific projects when building Android applications.
Fixes: QTBUG-126678
Pick-to: 6.7 6.5
Change-Id: Ifada0d1be7b4f11a82758ba0ee6f69051a2d53d5
Reviewed-by: Tero Koponen <tero.koponen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1313c5d3601b47d010eea28d6b104538974d212e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's sometimes useful. QEventPoint debug output includes the timestamp;
but for ordinary mouse events, we're often focused on the event itself
rather than its eventpoint.
Change-Id: Ib65922331c8601bbed5aea3ea96c820906c89ef2
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit ac1ee25bcfe812adb9d57ee0b78214d91223fde3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the body is sequential, QNAM::post should be called after body has
emitted finished.
As this is already mentioned in the documentation of
QHttpPart::setBodyDevice it probably won't hurt to mention it here
as well.
Task-number: QTBUG-125985
Change-Id: Iaa29c45b8da41a9af893523ff140afa9a0945f95
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 704362f3dd06798c8c33ce48aa6c71fa3ac4624f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need to pass all dirs where sboms will be generated, for external
document referencing.
We also need to set up dependencies between the repo sbom custom
targets, so that qtsvg sbom is only run after qtbase sbom.
We use the dependencies.yaml info to set up the dependencies.
Task-number: QTBUG-122899
Change-Id: Id3331e11742bc2c86e7ed52ce26b3ff21eace359
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 31126b2b775ae52a0d74aadf1aff8f6d79d0c6be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Repositories like qtwebengine and qtinterfaceframework might search
for a Python interpreter earlier than _qt_internal_sbom_find_python is
called and might find an older version of Python that is not
sufficient for SBOM purposes.
In that case Python3_EXECUTABLE would have been set, we would not try
to look for Python 3.9 and then fail trying to find python
dependencies or when executing one of the SBOM steps.
Rework the lookup process to be contained in a function rather than a
macro, make sure we temporarily reset any found python executable so
far and explicitly look for Python 3.9 after which we cache it into
custom cache var.
This allows finding and using a Python interpreter for SBOM purposes,
without interference from a possibly older version already found for a
different purpose.
Because the macro is now a function, we can get rid of some of the
backup state management code.
Task-number: QTBUG-122899
Change-Id: Ia846843a4e5cc8c91963ea76557639fc19e25913
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e7bfdb976a2478c0d6d33cffa40b475ca106a28f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a target has the _qt_internal_excluded_from_default_target property
set, don't try to add file SBOM information for the target, because
the file will not be built nor installed by default.
We check for a new custom _qt_internal_excluded_from_default_target
property instead of EXCLUDE_FROM_ALL, because EXCLUDE_FROM_ALL might
be set to a genex that excludes all configs except the main one, but
we are interested whether the target is entirely excluded.
Task-number: QTBUG-122899
Change-Id: I79d6a4b0c65356da14f7ff50ee3639705f5fabbd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 34b5dc041b0d34a76c081719fafa8f48265e34ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need it to disable generation for certain repos like qtqa, even
if the platform config says that SBOMs should be enabled.
We can't just set QT_GENERATE_SBOM to OFF, because the general SBOM
CI instructions are added later that module specific ones, and thus
would override the value back to ON.
Providing a separate internal variable allows us to disable it with a
higher priority.
Task-number: QTBUG-122899
Change-Id: If7803ae4aac0886d605a542e3f05ad9533bb8108
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0ea3164969bbc7eda71bcf77e716e2a8ec23c8c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Un-alias system target names before processing them for the SBOM,
otherwise we'll get errors about trying to set properties on alias
targets.
Amends 37a5e001277db9e1392a242171ab2b88cb6c3049
Task-number: QTBUG-122899
Change-Id: Ifef2108be123549505ed67f0b9c258a10431c84e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 089111aee0d4a98900aa35fa24d1a9cbbb03b905)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In certain cases the qt_find_package(PROVIDED_TARGETS) might not
exist, so we shouldn't record the targets for SBOM spdx id
registration in that case.
Amends 37a5e001277db9e1392a242171ab2b88cb6c3049
Task-number: QTBUG-122899
Change-Id: Iada6b5a20a3e7526f18ae4385db8a29fee68ab36
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0f5699ee3ddb2ec426f1b9c51484ec96241db8bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In diff of below change, patch set 4 to 5, the list(APPEND) was
replaced with a string(APPEND), but the escaping of semicolons was not
removed. This caused an issue with packages that provide multiple
targets when configuring qtsvg in a static qt build.
Remove the unnecessary escaping.
Amends 58eefbd0b6169d0749b312268c1ae1e594e04362
Change-Id: I1755f31b333e7cf76722cff490349bcc159d7e93
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9279a2f60e15ae02eb74f12db74a83cf3c1848d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logic for deploying QML modules copies the entire QML module
directory, which includes build artifacts such as qrc files.
Pick-to: 6.7 6.5 6.2
Change-Id: I7fa5c4c5247d1e2a04b83bb8f897cb58e417dded
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a962f45adebbc6ea0c83bc9be3a50da245976a77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logic for deploying QML modules copies the entire QML module
directory, which includes build artifacts such as dSYM bundles.
It's unclear why we special case QML resources, as the needs of
a Qt module to deploy its resources goes beyond QML, but that's
for later investigations.
For now let's skip the dSYM bundles explicitly.
Fixes: QTBUG-56590
Pick-to: 6.7 6.5 6.2
Change-Id: I0f87c452ca3f8f58b0b2a407159881cff071eac0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 35801a6a8c6c5f1e89e5e3132ae103e7a3bf1812)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We already had code to strip ending slashes, which makes sense if trying
to trash directories. In the case of symlinks to directories, that also
changes from trashing the directory to trashing the symlink. But had to
removeFile() on the same modified path.
Fixes: QTBUG-126621
Pick-to: 6.7
Change-Id: I46feca3a447244a8ba19fffd17dc0b56f2b1c68c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3302b0cdc15995fb9e70cf9e911d3ab408691b42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the missing interface include directories to PrintSupportPrivate
and record the dependency on Cups package in PrintSupport if the
cups feature is enabled in UNIX systems. PrintSupport doens't require
the Cups library to be linked, but still rely on it's headers in the
private part.
Pick-to: 6.7 6.5
Fixes: QTBUG-126594
Change-Id: I9409fedc0f1e457ab740a40c18a04e31be074b02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 30bb15e7bf42a07b49700b6e822513f125d9ed4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to avoid using the NEW behavior of CMP0156, since the linking
order we specify matters in several cases, even if this lead to
library duplication in linker command line. Until the NEW policy
behavior with the Qt code is not fully tested we should force the
policy to OLD, and keep the existing behavior.
Pick-to: 6.7 6.5
Change-Id: I61641f499e71a14d90b4d92419a6b916029dbc0b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9702c3c78b2c16db6a9d0515d7d7698d9b064cd8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This partially reverts commit 77f5846d213b8355d369695c68d585d0d5fa47ce.
Reason for revert: caused a link error in Qt for Python.
Change-Id: I0e8034cb35b7b6cfc0f70e1d46d8fb7486c4aae3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 53e44e753b7cfc5c873ef5a1fc577cfb6308d9d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A very particular glyph in one particular font would hit an assert in
the glyph path simplification code. It is not clear why this happens,
but at least it should not crash. So instead, this patch makes the
code bail out cleanly, just leaving that glyph empty (invisible).
Task-number: QTBUG-124310
Change-Id: Id3b9c0b03fb82800f029fc718000ee6ca81408f7
Pick-to: 6.7 6.5 6.2 5.15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit b6f962c87f5084eaf962bfb033b1398f80475120)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A few methods only had SSE2 versions, this adds NEON version the last
optimized QRgba64 methods.
Change-Id: I61fc916183a08a7d3c41572af10ca92d73ef831a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 9612547343098174e2317ded3f52cdab160aa0b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit a3ab79ec8 fixed the "leading digit" case, but
broke the original "replace invalid chars" case.
Fix regexp usage. Use "^[0-9]" for matching a leading
digit and then "[^a-zA-Z0-9_]" for matching all chars
not valid in a JavaScript identifier.
Change-Id: I2ab2dcb73b201a996c38b0cab55a049eb39d8b2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ba42c48dd460110d02b078c1460be0e268624faa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously when configuring on the first run,
when qt_configure_process_path was called with the default "./plugins"
for INSTALL_PLUGINS, we would write that value directly to
qconfig.cpp.
After a build, if we reconfigured qtbase, the function would then
canonicalize the path via file(RELATIVE_PATH), and write 'plugins' to
qconfig.cpp, which would cause unnecessary rebuilds.
Make sure we canonicalize the path on the first configuration as well,
to avoid the rebuilds.
Simplify the code a bit, and fix a drive-by where we set rel_path to
"." before, but never actually set the cache variable in that case.
Amends 48dbcefe57860f70e9bc4859983d2596634ea8f3
Amends c269d8f0862fd2c581d57584e8d7e2493f387ee7
Change-Id: I8749a85946e93cdf8672113638b499d0d3a31e5c
Pick-to: 6.7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0856387f5a6b3b928400045054b60cfd896ee06b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Plasma 6 defaults to double click. When the default value is read we
get an invalid QVariant. Use the proper default value in that case
Pick-to: 6.7 6.5
Fixes: QTBUG-124481
Change-Id: I4cdbb04ee8f56b48bb6ab66ec6b3cd42bcf1b187
Reviewed-by: David Redondo <qt@david-redondo.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 92de89a941e48f5cd95cce40cd997022c3dc0ab9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to migrate away from non-spdx licenses in LicenseRef.
As there's no license equivalent in SPDX (yet), let's use a custom
license.
Pick-to: 6.7
Task-number: QTBUG-126403
Change-Id: Iaf705af167c63f76fa5c8d732272523a42c3b661
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 5707bb2556108272185b62622354a24be23a7aaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Sadly, inline namespaces are resulting in ambiguities. With two
declarations
QtJniTypes::android::io::File
and
QtJniTypes::org::qtproject::qt::android::QtWindow
referring to QtJniTypes::android already is ambiguous if `org`,
`qtproject`, and `qt` namespaces are all inline. This breaks the
idea behind Q_DECLARE_JNI_CLASS as a variadic macro that generates types
that we can transparently use as QtJniTypes.
So remove the inline keyword from the namespace declarations. The macro
might still be the way to go, but user code will to either fully qualify
the types, or use `using namespace QtJniTypes::java::lang` to use e.g.
the `String` type without ambiguities.
Types declared with the two-argument overload continue to live
directly in the QtJniTypes namespace anyway.
As a drive-by, break the excessively long lines.
Change-Id: Ie9303e6c9117fb96b3cff31c7df4df92237b5520
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d1b89671de70ac9ffca52337058e976d86a367c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
No need for std::optional<> here - simply use QPixmap/QPicture::isNull()
instead. Also use non-static member initialization instead
initialization list and cleanup the needed includes.
Change-Id: I255e9e068cff1e66fbaf35be51be64228e48ffac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8bd532b1e54e220c81cd742fabaa236b1e7679c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The string based suffix check is fragile, and doesn't account for Qt
builds where the build is debug but we don't suffix the library.
The check was added in 27239f4fcfa6f64d60e7b79185ff413878152ebd, where
we started linking explicitly to the debug library in a framework,
in which case we could end up loading both the debug and release
Qt libraries into the same process if we loaded mismatched plugins.
However 7044409c878f100c005b76fc90717b4f71667f04 removed the explicit
linking, and nowadays we always link to the release version of the
framework library, and rely on DYLD_IMAGE_SUFFIX to switch to loading
the debug libraries, which applies globally to all libraries loaded.
This means we no longer need the _debug suffix check in the plugin
factory loader to account for the logic introduced initially in
27239f4fcfa6f64d60e7b79185ff413878152ebd.
And as we now have logic to avoid loading duplicate plugins in the
case of a debug-release-build we can safely remove the check.
Change-Id: I75685afa16a33aa41448f9a369dbefa8539418fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 195d9f1ce7753a38c4dd871b981749017839227a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Passing options such as `-codesign` or `-fs` without an additional
argument would just print an error, but proceed with deployment,
giving the user an app bundle that didn't reflect the intent of
passing the command line options.
We now treat such errors as fatal.
Change-Id: Iff1b3fac3eb8defadea0425dc13996ed80fe3840
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 58615c066707d0c3592e79b5a03f1330e28c64b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In debug-and-release builds (on Windows or Apple operating systems),
we will scan for plugin libraries and find both debug and release
versions of these libraries.
However, we do not end up loading both, thanks to additional logic.
On Windows we rely on logic in QLibraryPrivate::updatePluginState()
that uses the IsDebug metadata of the plugin, skipping any mismatch.
On Apple operating systems, there is logic in QFactoryLoaderPrivate's
updateSinglePath that ties to match the `_debug` suffix of the plugin
with the Qt build config.
As the string matching logic for Apple platforms is fragile we want
to remove it, but we can't re-use the logic for Windows, to ensure
we only load a single copy of a plugin, as the Windows logic prevents
_any_ mismatch between plugin config and Qt config, even for non-
debug-and-release builds (due to the Windows runtime being incompatible
between debug and release).
To solve this we add logic to QFactoryLoader to prioritize plugins
based on the Qt build config, similar to how we prioritize plugins
based on their Qt version if we find two or more plugins claiming
the same plugin key.
Change-Id: I772ba8ae79627e39418ba80107e3729bba8f9ac8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 90773b501795a088762dd540c442a7cd251a5d8e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify the code - member cachedimage is not really needed as QPixmap
has a scaled() function by itself.
Change-Id: I89cc237ef611f8516588e8b2e7b4056845bc6c69
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit cf0c9de6ed6a4edd6e8e21734e975d2554caa74f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The tree view widget draws a border for both the decoration area and
the text that accompanies the first column whenever any background
color is set to the row. The background color set for the row
shouldn't affect the border of the decoration area.
This patch fixes that issue by handling the background draw for the
decoration area separately by drawing the background for the
decoration area without considering the configured borders.
Fixes: QTBUG-122778
Pick-to: 6.7
Change-Id: I308998a29d16c910a5370633e5bff18418c96a44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3ca615d9735f7ddb8e2ae5c13e5effd419a56300)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The plugin was built into the base directory of any build that included
its CMakeLists.txt. Subsequently it was required by any project built
against this version of Qt and linked against QtGui. Since it couldn't
be found in the usual places to look for plugins, all those builds
failed.
Amends commit 87896c03c1baccff0049b582dcbf512716aeb8bc
Task-number: QTBUG-126393
Change-Id: I4c577c60459d5f6cb654714ce6e97f87c1f6f640
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit b01dd59d764cf5787b36075cc273a9a56be55a8e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIconEngine::scaledPixmap() takes the size in device independent pixels
and therefore it must not be multiplied by dpr here (dpr is given as a
separate argument)
This amends 245bdc8ec31755d6ab38b796014bdcab6a1d17ae.
Fixes: QTBUG-126388
Change-Id: Ib6cb5d07dd40f39749eb27bf8ed170480d10d28a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6887986bc509374995e5d838fe2a414cc23ee257)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIconEngine::scaledPixmap() gets the unscaled size of the pixmap, not
the scaled one. This is correctly handled by QSvgIconEngine,
QAppleIconEngine, QAndroidPlatformIconEngine and QWindowsIconEngine
but not internally. Therefore fix this here and also make sure the
pixmap with the correct dpr is saved in the QPixmapCache to avoid a
detach resulting in an increased memory usage when the pixmap dpr did
not match the expected dpr.
Fixes: QTBUG-124573
Change-Id: Ic75d7a89dae89da326c72cac326490f49d135fa7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 245bdc8ec31755d6ab38b796014bdcab6a1d17ae)
Assigning to a variable named `previous` to promote a library to be the
current/prioritized library is needlessly obfuscated.
Amends 6675e8c942c2f9797d66269368c729c5556528c2.
Change-Id: Ibdd48cbb5daba60c231f9f71133c3b58d32f7781
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 67bf3f9625c50a2af2d79d85247c1eee5b727682)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
idx.data(role) is much nicer to read than idx.model()->data(idx, role)
As a drive-by, mark some QVariants const.
Change-Id: I00c0a5ac311a03095050b2542a5c396a6c1c2c6a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 319cca2e2b8679bc553e8ebf97505f0625ee1c94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for picksUtf8NameEncodingIfAsciiDoesNotSuffice(), too.
Requires to revert the needles from QString back to QByteArray.
This completes the port away from QFormDataPartBuilder::build() use in
the tests, allowing us to remove the tst_QFormDataBuilder friend
declaration and unexport build().
Task-number: QTBUG-125985
Change-Id: Icae84f54c6f768e097b36b4c4f964eeb6d676809
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit d0b0fe76663a4c7fe007cb66afa936ea7fe3d918)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for specifyMimeType(), too.
Requires to actually open the QBuffer and to revert the needles from
QString back to QByteArray.
Also anchor the needle between two CRLFs, because they each represent
one full header field. This is like anchoring a regex with ^~~~$.
As a drive-by, use QVERIFY2().
Task-number: QTBUG-125985
Change-Id: I8f7830e49d05044ef7388338498c96334a489c90
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 9bcf320fc1d3b484a39d692fd2c69c96f05e63e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for setHeadersDoesNotAffectHeaderFieldsManagedByBuilder(), too.
Requires to actually open the QBuffer and to revert the needles from
QString back to QByteArray.
Also anchor the needles with a CRLF on each side, because they each
represent one full header field. This is like anchoring a regex using
^~~~$.
As a drive-by, fix indentation and brace placement of initializer_list
QList consruction and rely on CTAD to deduce QByteArrayList from QList{}.
Task-number: QTBUG-125985
Change-Id: I405b5d67212e906a3b914d9e5b815835bdee5bc6
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit ab859d5f96855eeec50f3b39c925203ba7def73f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for picksUtf8FilenameEncodingIfAsciiDontSuffice(), too.
Requires to actually open the QBuffer and to revert the needles from
QString back to QByteArray.
Task-number: QTBUG-125985
Change-Id: I13c41e8df86296ae8652c460039798eb529d4628
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 2541f1945d2a64de7b2c13465a178ef70d96da89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for escapesBackslashAndQuotesInFilenameAndName(), too.
Requires to actually open dummy_file (so make it a QBuffer, because
there's no file of that name in the filesystem) and to revert the
needles from QString back to QByteArray.
Task-number: QTBUG-125985
Change-Id: I888b3cac45ed24b2e877dc1642a95e3f1d64f2ff
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 14f68c9d44472966a66b5cf3b16f4fc7f60068ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't want to have to rely on QDebug:toString() and the private
QFormDataPartBuilder::build() function for checks, so use the
framework originally introduced by Máté for the the moveSemantics()
test for generateQHttpPartWithDevice(), too.
Requires to actually open data_file and to revert the needles from
QString back to QByteArray.
Task-number: QTBUG-125985
Change-Id: Ie4518fedb58530ae98b44f1ba9e000e6f088ba86
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 4b21146ded83badfeb9f2c905f6602ff460adc63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Packages everything needed to build the actual serialization into a
helper function that's parametrized with a function_ref. Said helper
provides the function_ref with a default-constructed QFormDataBuilder
as an argument to the function, but since we're checking move
semantics here, it also expects to receive, via the return type, the
builder object to eventually use for building. This need not be the
same as the one it originally supplied.
If this looks a bit complicated, it's a necessary evil for
conveniently rolling out this way of performing the test to the rest
of the test functions, to eventually, finally get rid of using QDebug
to introspect individual QHttpParts when, in reality, we're only
interested in the QHttpMultiPart's wire serialization (iow: the
observable behavior).
Centralize the QSKIP in the helper function. This increases compile
coverage of the rest of the code, but requires QTEST_THROW_ON_SKIP,
so add a check for that alongside the QTEST_THROW_ON_FAIL one.
Task-number: QTBUG-125985
Change-Id: Ib6217a02159c79f48f0036e90d7bbbf43e69d0ba
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 9fcafa715ecb1c6e45fc51d599178bbde3cc1b12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... so we don't have to guess around when the follow-up
checkBodyPartsAreEquivalent() fails.
Task-number: QTBUG-125985
Change-Id: I008eb7a1fa1c5457a5405838730d9e98b1cc20b4
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 4da130838ba0a0f4f7c659f8c58f7bb4304b032c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Default constructors should be implicit. No Q_IMPLICIT needed.
Found in API review.
Change-Id: Id0ca95102330a345b58bdf5641cf07bae0a8c6b3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit ed1774584d0231fadda0e9197d92ddcdb6bf2ea3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were doing it only for MinGW, but it's now showing up everywhere.
Pick-to: 6.7
Change-Id: Ic0adfa808d28487a8303fffd17d9deab60f6cd0a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ae71a00c611ce07965d6a4e54e7a5aee3105da5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
LLVM's libc++ became pedantic and insists on only accepting
instantiations for one of the standard Char types, so remove all uses of
it with a template parameter.
Complements dc2ae08e02730ab795445bc047221aa56914f723.
Pick-to: 6.7
Fixes: QTBUG-126214
Task-number: QTBUG-122753
Change-Id: I8c5c4dba62924541bfb0fffd17d7d8ddc78338bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ab05e05f60253b9be615c09aa340ee75f2e5bcaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QCss::Declaration::brushValues to parse the values into a list. This
will not only lead to correctly parsing the values, but also prevent an
an assertion from firing when ValueExtractor::extractBorder is called.
Fixes: QTBUG-126381
Pick-to: 6.7 6.5 6.2
Change-Id: Ic6f3d722ffe0d72dcb5faa9916a23c804211ce49
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit a37ca7c85933979351d99f1bb22191763a78de46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the top level window that a QWindowContainer is in is about to
be destroyed the QWindowContainer must reparent the contained window
into a dummy window, as otherwise the destruction of the top level
will bring down the contained window as well.
We were notifying the window container about this situation when
the window container was moved from being a top level itself, to
being a child widget, but did not have any logic for other ways
the window container could lose its parent QWindow.
An example of this was when RHI-needs would result in recreating
the top revel with a different RHI backend.
We now have a last minute call to toplevelAboutToBeDestroyed in
QWidgetPrivate::deleteTLSysExtra().
Fixes: QTBUG-126303
Pick-to: 6.7 6.5
Change-Id: I5b14e156956ae76a8f53cac31904eaadee9e791f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 006cbf658ea1f5986bbe1baafa7c146780320661)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There is a function throwIfEnvUsedButNotExported in qtloader.js that is intended to warn the user when they attempt to use environment variables without adding ENV to EXPORTED_RUNTIME_METHODS. (Presumably) through various changes this function no longer works. This change fixes it and adds to the warning to give Qt/CMake relevant advice.
Pick-to: 6.7
Change-Id: Ia04c087d43bfe5ba988e0cf98230d796f1aaa069
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 8e04cb27357ab5dffa3d1fd00a416635c7881bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Define both move SMF out-of-line, otherwise MSVC complains that the
private class isn't fully defined at the point of destruction of
std::unique_ptr<QDirListingPrivate>.
Both move SMF are = default'ed; GCC didn't show a warning about this
issue... different implementations, I guess.
"partially-formed" docs boilerplate borrowed from other existing
classes.
Found in API review.
Task-number: QTBUG-125859
Change-Id: I98b57a14bd94e407d9bfafa9ef32cf40c978d7df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e32a45d492fb057cc996efc6791030f3dd525d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When checking whether the current application was the active one
during launch, we compared the pointers of the frontmost and current
app, but these two can be different even for the same app (PID).
This was not a problem in practice, as the result was just that we
would always activate, just as we did prior to the change that
introduced the code.
We now check NSRunningApplication.active instead.
Amends 6343caae25179b5895b4169d7b97d61293e49b0f.
Pick-to: 6.7 6.5
Change-Id: Ib3557e5ea676be5291904aaa444f7ede2160e1fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0255d3a9af69c9accb23f7ac2c08b19bec9dd6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The VxWorks implementation of std::variant is broken.
std::visit throws std::bad_variant_access when called on a variant with
duplicated types.
Skip the tests that are affected by it.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I45227cc543ef7db2217b1d53313c2e2b140988d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0e9c0c0847bd09c8a2b5166a2bafc103db0d3abc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make saveFile(char *, size) make an immediate copy
of the data also for the case where we use a save
file dialog.
Previously it would make a copy after the file dialog
was closed, but at that point the content pointer may
be stale if the calling code did not keep it alive.
This makes the behavior for the two save code paths
be identical: a copy of the data will be made right
away, before the function returns. This is also the
only behavior which makes sense, since the function
has no way of communicating to the caller when it is
done with the data.
Pick-to: 6.7 6.6
Change-Id: I890a4897f20251e9abbf90d0a4b96d8ba12d3740
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 4b324202433365ff43f623903beefc4286345839)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Same will be done with QFormDataPartBuilder in a follow-up patch.
Found in API review.
Change-Id: I863faad8b59ba16ef35b10afd9990c1b82c8634b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e763177209a9b50347acae4ddeb9806145385717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Bitstream-Vera was added to the SPDX database in v3.17 onwards.
So let's use it.
Pick-to: 6.7 6.5 6.2
Change-Id: Ief4b8614d10d1914eb1cc824e7abce789c07250a
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 672382cd43d9be578c3a27c00c85f1d51338544e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A locale's UI language includes the script, e.g. the QLocale::uiLanguage
list for the Australian locale en_AU is {"en_Latn_AU", "en_AU", "en"}.
The old code iterated over each language in the outer loop, and for each
language tried several times, removing a segment from the back with each
try in the inner loop. The de-facto search order was then
en_Latn_AU
en_latn_au
en_Latn
en_latn
en
en_AU
en_au
en
Usually, translation files are provided for country_Territory, i.e.
en_AU. But if an en file (for a generic English translation) was also
present, then en_AU was never tried.
Fix this by breaking the logic into two loops: first, create a list of
candidates by removing segments from each UI Language. Then sort that
list of candidates so that entries with more segments come first. The
search order is now:
en_Latn_AU
en_latn_au
en_Latn
en_latn
en_AU
en_au
en
This way, en_AU gets loaded correctly, before en is tried.
Adjust the test, which was essentially duplicating the logic from
QTranslator to generate files. This only tested that two identical loops
result in the same thing. Instead of using the system locale, make the
test data-driven, and explicitly try en_US and en_AU, with candidate
files generated based on a hardcoded list for each data row.
Pick-to: 6.7 6.5
Fixes: QTBUG-124898
Change-Id: I6bdcff289d2843e61c9053c116e955b79e09e95a
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 9a11273b745a30cebb5cd648c89eb224e9704492)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We would previously try to json-parse the 404 error
message and then abort with an json parse error.
Throw a custom error instead.
Change-Id: I7240294b2b107cd758f22187ae6f2b1d6923fdd7
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit ce62b60d8590f707a0d011e6b95f1f7c729ba4e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a function returns a unique_ptr by value, the caller cannot but
take ownership of the payload object.
Change-Id: I0465e4daf42b57aa33203d66fdc3231ae9a88751
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3d2a194edd7aa758f3df3b2b853929945dbc6659)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It makes no sense to document (non-virtual) private functions.
Change-Id: Ifeed52ea5e9a5b8e358277140419c8d68204a45b
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 19b7a08fc24c5947fb1ea921e3d24f4efce4d1fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Setting StaysOnBottom creates a special case where
the first window is always kept at the bottom of the
window stack.
However this becomes confusing if the first window
is not maximized or fullscreen, since it's then not
possible to bring it to front by clicking the title bar.
Add a check on the window state, and set WindowStaysOnBottomHint
for maximized or fullscreen windows only.
Change-Id: I0f43874cfcdc7c951c47cd278f5acdd42368cd5a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 1d612c5100a02d3d4f9b1caba3489e76ef6a81fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The distance field size calculation is floating point math
and sensitive to numerical errors. When used in Qt Quick,
it is vital that the allocated memory is the same as what
we calculate in the cache, otherwise we will get memory
corruption. In certain cases, numerical errors would cause
a qCeil() to round what was actually an integer up, and
we would end up with an allocated size that was off by one.
To avoid this, we allow the user to specify the size to
allocate, so that we can do the calculation in a single
place.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-124572
Change-Id: I14e381952fdf331286f1ae4b51bb5fef9e39d704
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit b959b8f5ed537f530221e0174b723ea39a34cd58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
JS identifiers may not start with a digit:
em++: error: EXPORT_NAME is not a valid JS identifier: `2dpainting_entry`
Change the regex to match leading digits as well (note it is
inverted).
Prepend an underscore instead of replacing the invalid character;
this makes sure we don't create new conflicts between for example
"2dpainting" and "3dpainting".
Change-Id: If78a87e7ed352b88bc99aee7c5829facf1fc35a0
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit a3ab79ec8cab51255b108646f475c5796448d1a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Calling mkdir with mode == 0 works just fine on Linux - it creates a
directory and the permissions are set to 0.
On VxWorks, calling mkdir with mode == 0 uses the default mode set in
the system.
This leads to a failing test (tst_QDir::mkdirWithPermissions(0000)) and
potential confusion when the same code does not behave in the same way
when called on Linux and VxWorks.
To keep the same interface between unix-like systems, explicitly set the
permissions to 0 when on VxWorks.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I75e429c086500cb7c19f9bb14693bb4266e18046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Michał Łoś <michal.los@siili.com>
(cherry picked from commit 90e79aea8e3f297de65a69d4e6c82a5d753b9c86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Putting `inline` on the definition and not the declaration could cause
some issues with some compilers, e.g. MinGW[1].
Putting `inline` on a method's declaration and definition is redundant;
I am not sure if that could cause an issue with MinGW, but just in-class
on the declaration is enough/more-idiomatic.
Amends a5953d20e27ab73774058dd06ac514f9310a41e8.
Found in API review.
[1] https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews#Methods item
1.2
Change-Id: Ieaba422670261330b5558f60dce2fcca2cb2723b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 77f5846d213b8355d369695c68d585d0d5fa47ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test failure seems to be related to code optimizations and not
to the c++ standard that is used. With a recent version of MSVC
(>=19.40) the test fails on both x64 as well as ARM64 if the build
configuration does code optimizations (aka we have a release
build).
Pick-to: 6.7
Fixes: QTBUG-126349
Change-Id: I01781ea5b20f80a6cbd7ccb284d30b5d078ad958
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d8cb2044e3e86633c732f1f1b28926062b08b76c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the Java array that we hold a reference to is changed on the Java
side, then our reference continues to be valid, and references a
different object than the new array in Java.
Change-Id: If8743cc1b2fabb254b9c0009f41377455719ec3e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 37bb00d8507a4def05b5d85a6ef4ea23cca70ab6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This avoids that we or users have to declare e.g. String or Uri in
several places in Qt. This also prevents problems where multiple
declarations (possibly from different headers) cause build errors.
As a drive-by, remove some unnecessary type declarations (e.g.
UriType, which had the same class string as Uri).
To ease the submodule update process, define a preprocessor symbol
that submodules can use to conditionally declare the type locally.
Once the dependency update is through, the symbol can be removed
and submodules can use the declaration from qjnitypes.h.
Change-Id: I7d96edf644a54246302b5c5cb478e66fa615e73e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 457a1c973d68e705f9cf72ac72b19fc26cdb2917)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the macro variadic. For N > 2 arguments, interpret the first
N-2 arguments as nested namespaces that are declared as inline
namespaces. We can then construct the signature string from those
namespaces, so
Q_DECLARE_JNI_CLASS(String, "java/lang/String")
is equivalent to
Q_DECLARE_JNI_CLASS(java, lang, String)
except that with the second overload, the C++ type will be in the
QtJniTypes::java::lang namespace. Since both the java and the lang
namespaces are made inline, QtJniTypes::String still works.
This helps with avoiding conflicts, as there might be Java classes
in different packages, but with the same name.
Change-Id: I0355239e7fc3c91cb26e041f19c4e0853d3678ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2b1312bc954b72f59d0c1d7b1192e2f029016012)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the VerifySBOM feature is enabled, pass additional options to
CMake configuration:
- runs syntactic verification of the SBOM
- so it converts the generated SBOM files into JSON files (and
installs them). This does additional useful validations.
- runs the NTIA SBOM verifier
- shows some of the content in the SBOM in a more user-friendly table
format via the sbom2doc python app
- runs sbomaudit to show things like packages without a license
expression, doesn't exit with errors if issues are found.
To ensure the tables are wide enough in the log on the CI, we set
an explicit value for COLUMNS env var, which is used by sbom2doc
to determine the table size.
To ensure the sbom2doc and sbomaudit python applications are found,
we supply additional locations where they can be found, via the
env vars that coin python provisioning sets.
We also make sure to pass the found application paths when executing
the python apps, because they might not be in PATH by default.
Task-number: QTBUG-122899
Change-Id: I0baef8b9c949209b15ab304e1e840b4dcdf5a61c
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 83ff34d1c626759224a95f39bca8337a8390ed52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The fullscren geometry when an application is in full screen includes
the area above the menu bar. Unfortunately, when clicking on areas of
a Qt popup that overlays the menu bare area we get a callback for
NSMenuDidBeginTrackingNotification, and as a result we close all
popups. As macOS for some reason treats the menu bar area as special
and tracks clicks there even if another window is on top, we should
not put our popups there.
This also matches the geometry of windows shown full screen, which
does not overlap the menu bar area either when using the native APIs
to make a window fullscreen (which we do).
This change does not affect the original issue (QTBUG-39403), as the
QScreen::availableGeometry() nowadays does not exclude the area of
the Dock when in fullscreen mode.
Pick-to: 6.7 6.5
Task-number: QTBUG-39403
Fixes: QTBUG-123298
Change-Id: I5890d7fc7a9b95a98b8fd2b9ce58ed9789e7f36e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7f63b0fabb3f2ae67596cc061f202ddd77ddf56b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fell out of my tracking of a failure of the new QPointer
conversion feature, and it would be a waste to throw it away unused.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ie255b4a6432b4763071e5712d92e9ccd57927052
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0e40a3f6645a684458cbb09bef1353df2eec5e0b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Technically the Qt Core documentation builds without warnings, but
testing in CI two warnings are observed:
warning: Already generated qtcore-attribution-extra-cmake-modules.html
for this project
warning: Already generated qtcore-attribution-kwin.html
for this project
These pages come from a qtattributionsscanner-generated source file,
codeattributions.qdoc.
The warnings do not affect the generated output. Increase the
documentation warning limit temporarily to let integrations pass.
Task-number: QTBUG-126546
Change-Id: Ic8641c69b2818c72af72cdc23161314caf376c27
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit cec470561df663a7ea8f0a0ab65fb80b50cacb12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid duplication and move finalizer code to a new
function "_qt_internal_finalize_wasm_app", which can
be called from the add_executable functions.
Change-Id: I4859a3999725ebf61a496d78665b6a259dfeb0f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 2116c62256bbf1bc3d516430509a93177572d86f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This prevents setting it more than once, which will
on recent Emscripten versions cause 'duplicate symbol'
linker errors.
Change-Id: Ie6c2ede0569271cf3a02fc993b14bbf27f69ff57
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 320cb68ce5c0c718c6434adfefa6c7460e3cb08a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This linker option is now deprecated (and not needed,
since stack traces always contain demangled symbols).
Change-Id: If42c692c006b214fa3df418c09680aaa07ea2bbd
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit a8b7da59cba56b535393f50cd7432a412021d8d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Loading QLibrary("library_manager") and QLibrary("lib_example") is not
possible if their binaries are called liblibrary_manager.so and
liblib_examplep.so.
Remove this prefix check: if (!prefixes.at(prefix).isEmpty() &&
name.startsWith(prefixes.at(prefix))
,in order to allow calling dlopen() with "lib" prefix added to the name
even if the name starts with "lib".
The drawback of removing the check is that extra dlopen() calls will
take place in other cases such as: "libexample.so". In this case we
will have two extra calls of dlopen() taking "liblibexample.so" and
"liblibexample".
Fixes: QTBUG-23470
Pick-to: 6.7 6.5 6.2
Change-Id: I2c0b1b81edf8253443388aa67d24f4cd64d4123d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2f11edad9e87311a977cb6edbd908a9fdd86a567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
JObjectBase has a protected destructor, but JObject doesn't, so
inheriting from it might result in UB. Declare the Type as an alias to
JObject<TypeTag> instead. Specialize the traits for the TypeTag, and
add a partial specialization of the traits for JObject<T>.
Adjust the return type of the named constructors of JObject.
Change-Id: Ibe74c3cd3b3a2a81779117dd2d228684c365a845
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 691f6b5b0c9dc69f8d019abc53747e7a6bbf6ef8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dogfooding the new QtTest 6.8 feature, and greatly simplifiying the
source code.
Change-Id: I0731d7291048e6bbed19666d1b6672e5cccaf27a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 157fcdf5afbe4e6b421713947ccdb4ee35116ee4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dogfooding the new QtTest 6.8 feature.
This not only helps with the sourceModelBinding() test with its manual
currentTestFailed() calls, but also the old verifySubSetOf() helper
function that's there from Qt 4 times.
Use Ye Olde Scope Guard Trick™ to replace the qDebug() messages
recording where failures occurred.
Change-Id: I4d1460bde5315dfcc3b261b6e09c7293bbd9ff89
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 32fc8b936d1d036ba5b70ec1cac7681e1c9359c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was only needed to support a smooth submodule update.
Change-Id: I7546b8565bd3f2cb2c5141fc6ea36d1c76f11c48
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 5ee8ca2e94336e28374308e768f541c58b7725a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QFileSelector tests fail, because VxWorks is not properly categorized.
Even though it is not a unix-like system, it does provide a
compatibility layer that enables some unix utilities.
It has also been treated as unix on the Qt 5 customer branch.
Solve the issue by assigning VxWorks to the unix category in
QFileSelector and its tests
Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: Icab80764b66b121995f51ddf149de55dc8c9eb55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit da5de2926ac9573b13d0d743e43e685cbdb2abaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Right now VxWorks is not recognized as a known platform in QSysInfo.
This leads to issues with classes that depend on it to properly handle
the OS specific functionality (like QFileSelector).
Solve the issue by adding vxworks-specific implementation of
kernelVersion, productType and productVersion.
Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: Ib544d19f604f3f2d1f088f6160dd210cd6743717
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65b5debe3a22ff47cf77dd25cf1ec85582ca0f6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The use case is where blocking test building is wanted but they cannot
be uploaded due to being static or they would simply be unused.
Pick-to: 6.7
Change-Id: I32ad20fea2ec032fb1f1a9b86025b34f192e0ed2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a0c94b62d948d3da0da241cf1e6c15188069169)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to the documentation, it should be:
LicenseRef-Qt-Commercial OR BSD-3-Clause
Task-number: QTBUG-122899
Change-Id: I8c614926c9f2811d5dd926ffcb89c59f4f25b47b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d78ee6933089fa9b131eb08b8b376f8c9c396f2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a NO_ATTRIBUTION_LICENSE_ID option to allow to skip including
license references from qt_attribution.json files.
Add a QT_LICENSE_ID option that can take an "id" value and return one
of the common license expressions we use throughout Qt repositories:
- GPL3 with exception for tools / apps
- GFDL for documentation
- GPL3 only modules
etc.
Add a QT_SBOM_DEFAULT_QT_LICENSE_ID_LIBRARIES variable that can be set
at directory scope (or root repo scope) to use a specific license id
for all qt modules / plugins created within that repo, e.g. the
Commercial + GPL3 variant. These can be opted out, to fallback to the
"default" license by passing NO_DEFAULT_QT_LICENSE_ID_LIBRARIES.
Add a similar variable QT_SBOM_DEFAULT_QT_LICENSE_ID_EXECUTABLES
for tools / apps, including a NO_DEFAULT_QT_LICENSE_ID_EXECUTABLES
option.
Modify the logic for setting licenses for qt targets:
- use whatever is set in QT_SBOM_DEFAULT_QT_LICENSE_EXECUTABLES
for tools and apps
- or use the 'GPL3 with exception' variant for tools and apps
- use whatever is set in QT_SBOM_DEFAULT_QT_LICENSE_LIBARRIES for
modules ands plugins
- or use the default Commercial + LGPL3 + GPL variant for
modules and plugins
Amends 37a5e001277db9e1392a242171ab2b88cb6c3049
Task-number: QTBUG-122899
Change-Id: I3a8abac62b9f4b342f91ef139064884f02aa935e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit fe90ba704168d47cf88d0c6512380b525f38f5d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, only a very short subset of options related to attribution
files could be specified to qt_internal_add_module /
qt_internal_extend_target.
It is more convenient to allow specifying most (safe) options, instead
of calling another function.
Unsafe are considered paths like INSTALL_PATH and derivatives, TYPE
which is too generic, and some other ones like LIBRARIES which would
be duplicated, and causes warnings in cmake_parse_arguments if
duplicated.
Change the code to allow specifying most SBOM options and forwarding
them to _qt_internal_extend_sbom.
Task-number: QTBUG-122899
Change-Id: I6eb723e165edf59973d83c66eace43acdce237de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 81162cc8b6931c8659dc722be97eb788e344812a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The value should be taken from the QT_SBOM_LICENSE_EXPRESSION
variable. The '_qt_internal_sbom_get_default_qt_license_id' was a copy
paste error.
Amends 37a5e001277db9e1392a242171ab2b88cb6c3049
Task-number: QTBUG-122899
Change-Id: I4bcfaaf06af8903af7081130ba3c8285a53d8f4f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8f04225c5af2a5cb31d2452342b4ec35a10bf77b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were comparing the variable name of single and multi arg options,
rather than the value.
This accidentally worked when the variables were set, but forwarding
empty values if the variables were not set.
Explicitly evaluate the variable values to compare them against the
empty string.
Amends 96abceb64e5dc0570ca7c3419f401cfafe946ba0
Change-Id: I1a701c681f5af5e665601972687024ce734aa014
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6f475a05a1a035b07ed66f93aa92d0e8b2396047)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While better in some benchmarks, it turns out to be less efficient to
first find an event to the receiver, and then checking the event-ptr
and -type in other benchmarks, compared to just iterating the list and
checking these values.
Partially reverts 3e6b42ae9dbf4f90ba890d78a4c49f9936f4976b
Fixes: QTBUG-126394
Pick-to: 6.7
Change-Id: I748bda3d31350aea6e87db9bd57359ab17cf5d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: YAMAMOTO Atsushi - Signal Slot <atsushi.yamamoto@signal-slot.co.jp>
(cherry picked from commit b039d2251a14281947a43e226bae6c6fbae7312a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This avoids a "must set EXPORT_NAME when using MODULARIZE
with pthreads" error when linking libQtGui.so.
Both settings only apply for the final executable since
they affect how the wasm module is loaded from JS;
setting them together here makes sense.
Change-Id: Ibebeeee38203486675c43b416cb674e8ece9c147
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 9768d8e1ba21adace1f590420791e6924a9fad8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Delay-load the icon within QPixmapEngine::addFile() when a proper size
is given - this speeds up QIcon creation and also allows to let
QIcon::actualSize() return the correct size of an QIcon instead the
given one. This is especially useful e.g. when a 32x32 icon has a
smaller width or height and it should be centered during painting.
Also add an optimization for multi-image formats to check for the
correct size without decoding the image.
Task-number: QTBUG-59621
Change-Id: I7ed930ae3f65a8b3a272f70bcc2958980f9f02f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 94a3a492f52398eb1c08ea910fbd007b31228525)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It just called QAbstractFileEngine::entryList().
Change-Id: Iae154c8aba8c48488f525cc3543bb24467e85088
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b9c486ed8cd6120a1c60e39325cecd497f26265d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is in preparation to adding constructors that take
QDirListing::IteratorFlags, I would have had to add an init() private
method to deduplicate the code, so instead add a constructor that can be
delegated to.
Task-number: QTBUG-125859
Change-Id: Idbc76fcba50f9d0016e4ddba03b2f532a33231bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c203c41109e41d03de8145a541ff5c8fbe976492)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a span is selected, we used to assume that rows and columns might be
moved, and made a selection with a range for each cell in the span. This
resulted in very large selection models.
We already had optimized the case that we didn't have any moved rows or
columns, skipping the mapping for the respective (or, usually, both)
directions and just making a single range. Apply that same optimization
for the case where a span exists and intersects with the selection area.
Avoid code duplication by only updating the top/left/bottom/right values
depending on the configuration of the table, and then create the
selection based on those.
Adapt the test case; we now get a single range, even when a span is
present, and the range includes all cells included in the span. Add a
debug streaming operator in the test case, as there is none implemented
in QTableWidgetSelectionRange, to ease debugging. That operator can
become a hidden friend of QTableWidgetSelectionRange in a follow-up
commit.
Pick-to: 6.7 6.5
Fixes: QTBUG-119076
Change-Id: If699463944ca2abaed8f93a2cd3ea30f33b79145
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 57d209c4fdea4766f24479a1f20c2975d34a1a0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Makes the follow up patch clean to review.
Pick-to: 6.7 6.5
Task-number: QTBUG-119076
Change-Id: I38c2b02876af93ce668ade7bce97b32a9ec2cef0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 71d0ea7d042d61e8d42e9cf2700c439d4337345b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends a6a56814702612d8981f594a6158d70a7928cb99 where I replaced a
function that correctly did QString::fromLocal8Bit() with
QLatin1StringView.
Pick-to: 6.7
Change-Id: Ic0adfa808d28487a8303fffd17d9ec0817eda3e8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0a1a8355f313ac951e3e615f47aca40f421fc4bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix the change of the InvalidEvent value to be the same as in Qt 6.7,
where AcceleratorChanged was the last valid event.
Add trailing comma and Q_ENUM. Remove superfluous inline, make
QAccessibleAnnouncementEvent constructor explicit, declare destructor as
override.
Amends 010952a55ee9ca9731f8ad15f2773d0bae645840 and
9ec1de2528b871099d416d15592fcc5ef9242a64 based on header review.
Change-Id: I96f00871acd2bb340ac7fc762a7fca8ac2f61dc9
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 902dfd08a03b86cb65bfb5da55faad671f7dad20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Better name given the value names, as discussed during header review.
Keep AnnouncementPriority as an alias until dependencies are updated.
Change-Id: I7b60c429fb60fc30378a9560da12abb87499225f
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit bb305e63ff856a8c6f9649a27a5eabfb31df8aa7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is expected behavior for default-constructed containers.
Also add the missing isEmpty() member function to QJniArrayBase.
Change-Id: I23111f6906ef5476567272cb23746fec962afa35
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e5516191b25d70ee9d6e87246d932fa559ef0b59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And adjust the encoding of 'name' parameter to always
use UTF-8 / ASCII. This aligns with how other frameworks
behave. Also amended docs to recommend ASCII for 'name'.
Found in API review.
Change-Id: I54d1148bf95dece54b75c76914c49985da05e0b2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6b23a3c5e4316c5f889ea5e9bbfd785b78716268)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The RFCs around these encodings are loose and allow
several ways for dealing with non-ASCII characters.
The encoding introduced in this commit should be
interoperable and aligns with other frameworks
(checked Curl, JS FormData, Postman, and Python
requests).
This consists of several adjustments:
1. Enclose the filename attribute in double quotes
2. If filename contains only ASCII characters, use them as-is
3. If filename contains characters beyond ASCII:
3.1. Encode them directly as raw UTF-8 to filename=
3.2. Set an additional filename*= parameter with
percent encoded UTF-8. This is a legacy encoding
for compatibility.
Task-number: QTBUG-125985
Change-Id: I5a6ad5388e4bb69e142caa7f6de7127526f441ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8c8a0c06d4f77ba8a707ec0a101b423543bf30f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Hide the construction details of QFormDataPartBuilder, change
the verification to be QString based instead of QByteArray based,
and use raw string literals (where useful) for readability.
Task-number: QTBUG-114647
Change-Id: I16fb6c943cf6fd7385e78bbffe3b2780ab0a6ac8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cb8abb718da4e18232de525ef1bb611f3a5dd929)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The pattern "*debug*" also matches libinvalidplugin_debug.dylib
on macOS. As the CMake target for the plugins include the 'plugin'
part, let's look for that as well when finding matching plugins.
Change-Id: Icf3177d42c104829890a8c404a6b9782bf190bb4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 087ace615a6399f6bf7a020bce07365689bd4784)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't do anything about a failed write at these code locations. In
particular, we can't QVERIFY() their success, so suppress the warning
with the idiomatic cast to void.
Amends 13a1995e9dc987d1560b38d16b76442261b4aa8d,
bd32c7d7055b436b8c33486a5b5ce1c29db77fd4 and
c5221f6be00c16187e0abf008b33c230fea56c29.
Pick-to: 6.7
Change-Id: Ia7ef57f01eeb8608079a12724c0b4f03a59081c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 97f31a68795e1d492f98a9942cce5228cbe64cf8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC 14 doesn't understand that neither q_check_ptr() nor
qCompare<int*> dereference the pointer.
Since the missing initialization isn't part of the test (except,
maybe, to provoke this warning if the implementation indeed changed to
dereference the pointer), fix by initializing the int, like we do for
the string a few lines below.
Amends the start of the public history.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I6033e026f041b03821b776daa8e65586b8054136
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8e914e07fbac8b40e51d0e6da764fa13a6af8181)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC doesn't have a specific warning flag for this warning, so we can't
add a GCC case to the existing Clang suppression in the header.
Hovever, the issue can be fixed by including the moc file into
tst_moc.cpp, so that the compiler sees the definition of the inline
signal provided by the said moc file. This means we can also drop the
Clang warning suppressions.
To prevent duplicate definition linker errors, remove the header file
from JSON_FILES, and the forced separate compilation that entails.
I'm pretty sure that some cmake magic could preserve the JSON test
coverage, but a) the file doesn't emit anything special in its json
(certainly nothing about the inline'ness of the signals) and b) the
presence of mySlot() and mySignal() as slot and signal on these
classes is already tested by singleFunctionKeywordSignalAndSlot().
Amends the start of the public history, but not picking back far,
because a) a prequel commit to this commit wasn't picked further,
either, and b) this has been such a long-standing issue that it's
clear no-one cares and so it's just not worth the risk, however small
that may be, to backport.
On GCC, the only remaining warnings thrown by tst_moc are now
moc-generated ones.
Task-number: QTBUG-119042
Change-Id: Icde1eee6c97bd48d72e15461b6ec80c50c044eaa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b1b3af02c0fb8084d2eb984b1f7ae68f1861f9a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Needed for the tests of the move semantics of QFormDataBuilder.
Change-Id: If4ea9a0d50addbbeaed1262517b58e7da82c0883
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2fb79421ee22649eab4ebf6a76d2835022ce43c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
UTF-8 doesn't per se contain illegal characters from
an HTTP header RFC point of view. UTF-8 is the dominant
character encoding outside of ASCII, and is used
directly at least with HTTP multipart headers.
[ChangeLog][QtNetwork][QHttpHeaders] Allows UTF-8 in header
values now.
Task-number: QTBUG-125985
Pick-to: 6.7
Change-Id: I2d8d8f00855c96c1d2ba190f2e27e2d48fcd4975
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f39b39b8c72b5c3428396d5e74cf15cafd5bbc42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QTemporaryDir(const QString &templatePath) API docs say the path is
relative or absolute depending on whether `templatePath` is relative or
absolute.
Pick-to: 6.7
Change-Id: If77f9b378158235a68344689ded6756ac3f083cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9dc189e632bd5b6921361af786cf54434d2adf45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During shutdown of the app the QUIView may hang around longer than the
QIOSWindow or QGuiApplication, at which point we can't deliver the
resigned responder status to QGuiApp as a focus out event.
Fixes: QTBUG-123018
Change-Id: If377f037c3fb4c2026a2d8d757011f12171e8dd4
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a40d546496462e5366c24115707e43a0c8598dd3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
tst_QCoreApplication test fails due to leaking object. Investigation
about the reason of this issues was started, but no conclusion was made
and reason for object leak is still unknown. To prevent this test from
crashing exclude this check for VxWorks as well.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I2c543a3b8320e2d96b2e7cd7e14c1980e500ce0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 92e420aefb373c2dc1dd39a05ff43037edb2a145)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dogfooding the new QtTest 6.8 feature.
Removes a lot of manual currentTestFailed() calls.
Change-Id: Id8bb0bad9b90b0a51315e9a9677d7009ebc090e4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 561a1cae9df85a7a03f73ce77948ef235fff7c5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Suppress the warning. Found that moc doesn't like QT_WARNING macros in
Q_SIGNALS section and filed QTBUG-126395 to track the issue.
Amends the start of the public history, but not picking back far,
since older GCC could reject the suppression, and it's such a
long-standing issue that fixing it in LTS branches is not worth the
risk of breaking compilation.
Task-number: QTBUG-119042
Task-number: QTBUG-126395
Change-Id: I15ba9ed3b83cce0f4c2a1536317e5167d56f3a57
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4111059b2ee3818ab68033198fb1dd057e6d09eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A lexicographical ordering chain with 3way-compare should call op<=>
(or it's stand-in, compareThreeWay()) exactly once per element pair in
the source ranges.
First checking for != and then with <=> means we do the check
twice.
In this case, when comparing built-in types, the optimizer will
probably fold everything for us, but code like this, at this time, has
a high chance of being the source of a CnP operation, and the target
may compare QStrings this way, so use the idiomatic form to let
copy-pasters fall into the pit of success.
Amends ef964c254c7a72bc05b1f4f0c6f270f9ad21fecd.
Change-Id: Ib8344087f23435fc58740165afecd499722d1f00
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1e6b7e08cf5f5a36fa3007e315a9282054c1a140)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code checked themes first, and only went through the platform's
file-based icon resolving code if the theme didn't provide an icon. With
the added support for theme icons on macOS and Windows, this broke
standard file icons on macOS and Windows: the icon theme provides the
font-based icons, but they are significantly different from what users
expect a folder, drive, or generic file icon to look like in a file
explorer-like UI.
To fix this, we cannot simply turn the priorities around, as we get a
standard, default file icon for any file that doesn't have a specific
icon configured. The behavior needs to be different on each platform:
on Linux desktop we respect the icon theme, on other platforms we prefer
the file-type based icon.
Add a theme hint that tells the icon provider which one to prefer.
Implemented in on Linux desktop to return true, otherwise returns false.
Adapt the logic in QAbstractFileIconProvider accordingly.
Pick-to: 6.7
Fixes: QTBUG-124829
Change-Id: I9ff3f543c000aec8238bdf36b18be5c7a2349098
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e10308769592222b97153956feeb9531863bef35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.
Task-number: QTBUG-126371
Change-Id: I1155ba7912e2b89c681b57d259170087e840817f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 9eed1704a1bf7cdf03825e99260e47c392213165)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.
Task-number: QTBUG-126371
Change-Id: I5149a583eb2695ff97203d81a059adcc5d1a69a5
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 900911abee41fb424312dc6675baa47b0792635a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.
Task-number: QTBUG-126371
Change-Id: Ic111439a929fa5ad05aca98dd7fa024791a00883
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit eb4e417ef64b832cddfb60fb9e20b0a04ec1ad2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.
Task-number: QTBUG-126371
Change-Id: If2d8386a985757b5d107ece1625bc694d7ae1272
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit a833d431c70054260a556f2f4429dd28c6483201)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 54c373faa4f9582fd09a802727821fd544a7b2c5 updated the bitwise
operations to be more efficient, bypassing QByteArray and going straight
to QByteArrayData (a.k.a. QArrayDataPointer<char>). This meant we also
bypassed the initialization of the null terminator.
This wasn't caught in our unit testing and with some runtimes because
the memory we allocated happened to be zero or contain the information
we wanted. But with Visual Studio, the debug-mode runtime initializes
all newly allocated memory with pattern 0xcd, which showed up as a
problem.
[ChangeLog][QtCore][QBitArray] Fixed a regression introduced in 6.7.0
that could cause QBitArray to report wrong bit counts after a bitwise
operation.
Pick-to: 6.7
Fixes: QTBUG-126343
Change-Id: Icdc467f26dea4b05ad90fffd17d939c3b416adca
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8ac57ff6bc778519bb1edc4036ce79ab8f688e27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the filesystem is mounted in a read only mode, Linux returns true
on an attempt to create a dir that already exists on that fs.
However not every platform behaves that way.
VxWorks is not a fully unix-like system.
It is possible to enable a component that provides a virtual root file
system (VRFS) so that devices and paths can be managed using "/" as a root.
The root itself is not an actual path that can be used like on other systems.
It is not possible to store files directly in "/".
On Linux, mkdir on "/" returns EEXIST.
On VxWorks, it returns EROFS (read only file system).
That leads to a failing test (tst_QDir::makedirReturnCode).
It also leads to a broken contract, since the doc for QDir::mkpath states that:
`If the path already exists when this function is called, it will return
true.`
The doc for createDirectoryWithParents has no such comment and it is
used by other functions that also do not promise such things, but the
implementation behaves that way anyway: when errno == EEXIST -> return
true if the target path is an existing directory.
Since the existing unix implementation already returns true for existing dirs
(without checking if it was called in the context of `mkpath` or any other
function), fix the problem by checking if errno == EROFS after a call
to mkdir and then checking if the target path already exists and is a directory
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I849bca56618bf675933cccc5a9d5313e0014628b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io>
(cherry picked from commit 8915ae3a75c4a356d94962dd9b31e1458f2a506f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
MSVC quite incorrectly errors out saying that weak_ordering's
conversion to partial_ordering cannot access the private constructor
that takes the internal order.
The problem goes away when the types are forward-declared before they
are declared as friends.
Fixes: QTBUG-126386
Change-Id: I50ad6d08ee648eb15109dde4a9ec9c753ee18e68
Pick-to: 6.7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit d2b4aec865bd834747cd824658e567b83bf081e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We rely on a valid Xcode (command line tools) installation to run qmake.
Change-Id: I8d6746942507680dd585a41f32cbe4e4d34822e4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 06b33134b38ffabdf0c0d80c2c3b9581294ff715)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pass QPointF by value (also in the private API), and mark new
constructors explicit.
Amends 05b84673045a5f4432a6caa9bea08d8fba1e1a03
Change-Id: I461d50d9220404746ee6d3544acdeb0f0956ee2f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6c2d6cb53a1dc8fb98f7f6447e08762e7e839a23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was forgotten when the other set*Margin() methods were moved to
removed_api in 6c72080f26e9b70041434c6d762f7d601a2bf19c.
Fixes: QTBUG-126374
Change-Id: I4be96c23540fac812ddb456699218bc437c4a3f7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ad922bbac1d65ff044c63160c73324fa27f44793)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove redundant OS version checking (via @available) and stop
supporting legacy macOS (< 11) an iOS (< 14) versions that were
already unsupported in previous 6.5 LTS.
Change-Id: I505217e0f4f4c19bbdb27b535e658d158a5bafea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9c199a39d228658a20c1d6650ab6a7aedfaeccf6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test requires allocating 4GB of memory to handle a big file.
On a 32b architecture, this leads to a std::bad_alloc exception and
abort in result (tested on VxWorks 24.03 on an imx6 board).
Because of that, the test can't work properly and it can't be
blacklisted.
Work around the issue by skipping the test.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I46002a27aed09706cd61d2e2c8d4bd1e12a16c36
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4d2744e4345193cdf7ec2bbf06b0a0d169827d8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1. VxWorks 6.* and older are not supported in Qt6 due to C++17
requirement (among multiple other issues).
2. `_WRS_VXWORKS_MAJOR` and `_WRS_VXWORKS_MINOR` are defined in header
`version.h` on VxWorks 7, which is not included anywhere, causing
`QThread::idealThreadCount()` to always return 1. As a consequence,
instance of `QThreadPool` returned by `QThreadPool::globalInstance()`
have always only 1 thread. This causes failure of
`tst_QEventDispatcher::postEventFromThread` test case.
To fix that, remove VxWorks version checking from qthread_unix.cpp.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I08ffc4acdb74d13dd822402407a71f5916603440
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8fec93e9a7bf3f8cb80aafb1e2329d998552fbcc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the Qt libs have not been loaded before the QtView is attached to
the window, it leads to accessing the input delegate, which only gets
initialized after the creation of the libs, so we get a null pointer
expection. Add a null check, and a boolean to make sure we update
the input delegate with the view once the libraries are loaded
and the input delegate has been created.
Task-number: QTBUG-126177
Change-Id: I7372596884c7d0ed6c9cca812b46399ecfb74367
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit dc62ddd1521a5754aec0031ade17743da3ed0585)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From the API review.
Change-Id: I91bee8899ba12c44453a989f2388fa68d6e75149
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 55796dee5af41e4cce638d04944302864788e5e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's always been like this, but the documentation never said so.
See https://github.com/httpwg/http2-spec/issues/202 for why.
Task-number: QTBUG-126278
Pick-to: 6.7 6.5
Change-Id: Ie83b105dd78fc1c6c09db46ae8cb5e113cd8a062
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 365a1ba7d9a3d731968cb053d5d0677c7a372e0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we ever want to expose the class or the enums to QML, we need to have
already done this so no one else exposes it first without the enums
being scoped.
From the API review.
Change-Id: I0ab32743b3cb61d44cc159397435801280d74b80
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f60c03f26562224574b180699a9518471e879a2b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QAction(Group) were moved from Qt Widgets to Qt GUI, the
documentation for QActionGroup's signals - triggered() and hovered() -
were erraneously dropped. Restore them.
Pick-to: 6.7 6.5
Fixes: QTBUG-121586
Change-Id: I7ce5ec715c0d3df7a4f9837a0822c245063eb74d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 22761f13d342df677e653c07b3d066ed2b7354ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
New Roles in user code should start from `Qt::UserRole + 1`; whereas in
Qt code itself it should start from `Qt::UserRole - 1`; adjust the
enumerators accordingly, to have less differences between Qt6 and Qt7.
Change-Id: Ib20f95e841d4d252fa9dd085530e6f3257d2776d
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0a133035963b83e886578b9621b1275780c7d9cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The instructions will only run if a coin platform config has the
'GenerateSBOM' feature.
The -sbom configure option is not sticky across repos,
similar to -headersclean, so that if a user wants to build another
qt repo against a prebuilt qt, it won't try to generate the sbom
automatically.
That's why we append -sbom to all the repos configure args, and not
just the qtbase one.
Task-number: QTBUG-122899
Change-Id: Ice91cbc430826838119ce3085cbd52c0909f2746
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d940399b3e6e9403f94190ffc71a5f5db68f51f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove redundant OS version checking (via @available) and stop
supporting legacy macOS (< 11) an iOS (< 14) versions that were
already unsupported in previous 6.5 LTS.
Change-Id: I772d6ca9ca638f00116c9782315e0d0b7139fe23
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 95c7e6565dc0a182f6ca8ec7c73dce58ceb04f47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some platforms, such as macOS, do not natively have icons in menus,
except in a few specific cases, so the default for AA_DontShowIconsInMenus
and in turn QAction.iconVisibleInMenu should be to not show the icon.
QActions with iconVisibleInMenu explicitly set to true will still show
the icon, even if the user does not override AA_DontShowIconsInMenus.
[ChangeLog][QtGui] The default value of Qt::AA_DontShowIconsInMenus is
now determined based on the platform. On macOS icons will not show by
default. To override, use QAction.iconVisibleInMenu for individual
menu actions, or set Qt::AA_DontShowIconsInMenus to false.
Pick-to: 6.7
Change-Id: Ie4fb3e6618486233d64a7818be19a42ed9a2a852
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d671e1af3b736ee7d866323246fc2190fc5e076a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently the internal flags of QWindow are not up-to-date when querying
them during QWindowsWindow::setFlags with QWindow::flags(). QWindow
updates its flags after QWindowsWindow returns from setFlags. This patch
adds a getter, to query the updated internal state of
Qt::FrameLessWindowHint flag from QWindowsWindow's m_data.flags.
This is needed due to QWindowsWindow is calling SetWindowPos, which
immediately enters the WndProc without access to the newly set flags.
Pick-to: 6.7
Change-Id: I826f29ef608d1e0a4b416e123aa4116587a035a7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0e6907d2f0e95a8892df55e075837cc0e81e0f3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is far from complete, as per path coverage, but it should at
least have 100% statement coverage now.
Pick-to: 6.7
Change-Id: If2a9a3d61695cca253a4e12c33a505b5afe50aa4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 171ff57be1b8fd1c1b33cffbffa389790f239b5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's harmless and enables the pointer-idiomatic assignment of nullptr
without having to resort to reset().
Found in API-Review.
Change-Id: Id3a02f55b3578a29943f729d8d734fc3b1d3af11
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 62d3b3c680ed2c6ca417f30fb3ca57482339c2c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
syscall(2) returns long, not int. Says Clang:
qfutex_linux_p.h:48:18: error:
implicit conversion loses integer precision: 'long' to 'int'
[-Werror,-Wshorten-64-to-32]
int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't truncate to int in _q_futex(), pass it as long into the few
callers that care about the result.
Amends the start of the public history, but not picking back all the
way because the code moved around a lot. In 6.7 it found its current
place.
Pick-to: 6.7
Task-number: QTBUG-103528
Task-number: QTBUG-126219
Change-Id: I54ccaf5564bcaf38f05fab153b1b32379a66a178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 962539d12b5584e28d32dbc8c6d61a509128d910)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When 2cf66d49ef926ee53b6c394d8be0b8e8bcf148e8 removed support for
c++14, it incorrectly also removed support for explicitly setting the
default, C++17. This broke build scripts for no good reason, and made
it impossible to undo an earlier -c++std c++20 again.
Accept C++17 and C++1z again, as an explicit disabler for C++20 and
C++23 features.
Amends 2cf66d49ef926ee53b6c394d8be0b8e8bcf148e8.
Fixes: QTBUG-125015
Change-Id: I99b80cd5f41fa5a23259630eae85ef807982f526
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 68e6406623afe5aaaa79e116cbd6b07e8f295e8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
5b7422f74d73822aeab76163811ea1fcaafabc12 fixed falling back to CF_DIB
when CF_DIBV5 is not provided, but the way the logic was written
depended on that typo to load synthesized CF_DIBV5. This change restores
that functionality and simplifies the logic.
Pick-to: 6.7 6.7.2 6.5
Change-Id: Icffbe8d969a47b5337701e13b35ce426e4d32166
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5eb7141788ae3c0051b9f9c49870c88e209e71b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implement them out-of-line in removed_api.cpp to call the GLsizeiptr
overloads explicitly.
Change-Id: I7a4b937c2c6f444f2dc8e874ab9e07ddd52437e9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 756e4d463610c27818a86aa5a063f6dbdd623f57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After recent changes to widgets and backingstores, attempting to run
any widget-based application with eglfs resulted in a crash. The
backingstore implementation used here was not fully migrated. Update
flush() to create the rendering infrastructure if needed, and make it
call into rhiFlush().
Amends eb4cb719257d3b57cd801273d4011579d8c81714
Change-Id: I253c37200f5a902a0e61b62581ac456549f3aeba
Fixes: QTBUG-126221
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0a10d23c4a49dd14a1ded41b7cc6921909b0ee7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Test the setHeaders method and the option of manually setting the mime
type.
Task-number: QTBUG-114647
Change-Id: I86644b243830259156e60239adf370e5894450dc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 132498a69a626be6feaf1855cf63dd79d1ac9445)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This change adds a new -sbom configure option to allow generating and
installing an SPDX v2.3 SBOM file when building a qt repo.
The -sbom-dir option can be used to configure the location where
each repo sbom file will be installed.
By default it is installed into
$prefix/$archdatadir/sbom/$sbom_lower_project_name.sdpx
which is basically ~/Qt/sbom/qtbase-6.8.0.spdx
The file is installed as part of the default installation rules, but
it can also be installed manually using the "sbom" installation
component, or "sbom_$lower_project_name" in a top-level build. For
example: cmake install . --component sbom_qtbase
CMake 3.19+ is needed to read the qt_attribution.json files for
copyrights, license info, etc. When using an older cmake version,
configuration will error out. It is possible to opt into using an
older cmake version, but the generated sbom will lack all the
attribution file information.
Using an older cmake version is untested and not officially supported.
Implementation notes.
The bulk of the implementation is split into 4 new files:
- QtPublicSbomHelpers.cmake - for Qt-specific collecting, processing
and dispatching the generation of various pieces of the SBOM document
e.g. a SDPX package associated with a target like Core, a SDPX
file entry for each target binary file (per-config shared library,
archive, executable, etc)
- QtPublicSbomGenerationHelpers.cmake - for non-Qt specific
implementation of SPDX generation. This also has some code that was
taken from the cmake-sbom 3rd party project, so it is dual licensed
under the usual Qt build system BSD license, as well as the MIT
license of the 3rd party project
- QtPublicGitHelpers.cmake - for git related features, mainly to embed
queried hashes or tags into version strings, is dual-licensed for
the same reasons as QtPublicSbomGenerationHelpers.cmake
- QtSbomHelpers.cmake - Qt-specific functions that just forward
arguments to the public functions. These are meant to be used in our
Qt CMakeLists.txt instead of the public _qt_internal_add_sbom ones
for naming consistency. These function would mostly be used to
annotate 3rd party libraries with sbom info and to add sbom info
for unusual target setups (like the Bootstrap library), because most
of the handling is already done automatically via
qt_internal_add_module/plugin/etc.
The files are put into Public cmake files, with the future hope of
making this available to user projects in some capacity.
The distinction of Qt-specific and non-Qt specific code might blur a
bit, and thus the separation across files might not always be
consistent, but it was best effort.
The main purpose of the code is to collect various information about
targets and their relationships and generate equivalent SPDX info.
Collection is currently done for the following targets: Qt modules,
plugins, apps, tools, system libraries, bundled 3rd party libraries
and partial 3rd party sources compiled directly as part of Qt targets.
Each target has an equivalent SPDX package generated with information
like version, license, copyright, CPE (common vulnerability
identifier), files that belong to the package, and relationships on
other SPDX packages (associated cmake targets), mostly gathered from
direct linking dependencies.
Each package might also contain files, e.g. libQt6Core.so for the Core
target. Each file also has info like license id, copyrights, but also
the list of source files that were used to generate the file and a
sha1 checksum.
SPDX documents can also refer to packages in other SPDX documents, and
those are referred to via external document references. This is the
case when building qtdeclarative and we refer to Core.
For qt provided targets, we have complete information regarding
licenses, and copyrights.
For bundled 3rd party libraries, we should also have most information,
which is usually parsed from the
src/3rdparty/libfoo/qt_attribution.json files.
If there are multiple attribution files, or if the files have multiple
entries, we create a separate SBOM package for each of those entries,
because each might have a separate copyright or version, and an sbom
package can have only one version (although many copyrights).
For system libraries we usually lack the information because we don't
have attribution files for Find scripts. So the info needs to be
manually annotated via arguments to the sbom function calls, or the
FindFoo.cmake scripts expose that information in some form and we
can query it.
There are also corner cases like 3rdparty sources being directly
included in a Qt library, like the m4dc files for Gui, or PCRE2 for
Bootstrap.
Or QtWebEngine libraries (either Qt bundled or Chromium bundled or
system libraries) which get linked in by GN instead of CMake, so there
are no direct targets for them.
The information for these need to be annotated manually as well.
There is also a distinction to be made for static Qt builds (or any
static Qt library in a shared build), where the system libraries found
during the Qt build might not be the same that are linked into the
final user application or library.
The actual generation of the SBOM is done by file(GENERATE)-ing one
.cmake file for each target, file, external ref, etc, which will be
included in a top-level cmake script.
The top-level cmake script will run through each included file, to
append to a "staging" spdx file, which will then be used in a
configure_file() call to replace some final
variables, like embedding a file checksum.
There are install rules to generate a complete SBOM during
installation, and an optional 'sbom' custom target that allows
building an incomplete SBOM during the build step.
The build target is just for convenience and faster development
iteration time. It is incomplete because it is missing the installed
file SHA1 checksums and the document verification code (the sha1 of
all sha1s). We can't compute those during the build before the files
are actually installed.
A complete SBOM can only be achieved at installation time. The install
script will include all the generated helper files, but also set some
additional variables to ensure checksumming happens, and also handle
multi-config installation, among other small things.
For multi-config builds, CMake doesn't offer a way to run code after
all configs are installed, because they might not always be installed,
someone might choose to install just Release.
To handle that, we rely on ninja installing each config sequentially
(because ninja places the install rules into the 'console' pool which
runs one task at a time).
For each installed config we create a config-specific marker file.
Once all marker files are present, whichever config ends up being
installed as the last one, we run the sbom generation once, and then
delete all marker files.
There are a few internal variables that can be set during
configuration to enable various checks (and other features) on the
generated spdx files:
- QT_INTERNAL_SBOM_VERIFY
- QT_INTERNAL_SBOM_AUDIT
- QT_INTERNAL_SBOM_AUDIT_NO_ERROR
- QT_INTERNAL_SBOM_GENERATE_JSON
- QT_INTERNAL_SBOM_SHOW_TABLE
- QT_INTERNAL_SBOM_DEFAULT_CHECKS
These use 3rd party python tools, so they are not enabled by default.
If enabled, they run at installation time after the sbom is installed.
We will hopefully enable them in CI.
Overall, the code is still a bit messy in a few places, due to time
constraints, but can be improved later.
Some possible TODOs for the future:
- Do we need to handle 3rd party libs linked into a Qt static library
in a Qt shared build, where the Qt static lib is not installed, but
linked into a Qt shared library, somehow specially?
We can record a package for it, but we can't
create a spdx file record for it (and associated source
relationships) because we don't install the file, and spdx requires
the file to be installed and checksummed. Perhaps we can consider
adding some free-form text snippet to the package itself?
- Do we want to add parsing of .cpp source files for Copyrights, to
embed them into the packages? This will likely slow down
configuration quite a bit.
- Currently sbom info attached to WrapFoo packages in one repo is
not exported / available in other repos. E.g. If we annotate
WrapZLIB in qtbase with CPE_VENDOR zlib, this info will not be
available when looking up WrapZLIB in qtimageformats.
This is because they are IMPORTED libraries, and are not
exported. We might want to record this info in the future.
[ChangeLog][Build System] A new -sbom configure option can be used
to generate and install a SPDX SBOM (Software Bill of Materials) file
for each built Qt repository.
Task-number: QTBUG-122899
Change-Id: I9c730a6bbc47e02ce1836fccf00a14ec8eb1a5f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 37a5e001277db9e1392a242171ab2b88cb6c3049)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUtf8StringView is not a class, but just one of the template
specializations, so use the actual template.
Amends fff6562f8c074d75bda8b80f844dc63c6f2e64d5.
Found in API Review.
Change-Id: I8e28704382765e85096885787172a38ea0f1f23b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bd581e35e7485cf42fbefd250be7b146737d9d41)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QtFindWrapHelper.cmake file retrieves the version of the
underlying system package version or bundled package version, and
passes that to find_package_handle_standard_args to show which version
was found.
But it did not set a ${PACKAGE_NAME}_VERSION variable, which means
we didn't record the version in qt_find_package, and thus in the final
SBOM.
Make sure we set the variable.
Amends 7ad8c347feb5e336c3833d6d3ac021a0a14b714a
Change-Id: Ia0d5b895de36017949e6607d17093459dca302b3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0be79f14865c0a19fde0abad7d1722f0bac3b7c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the variable name but not the unwrapped value.
Pick-to: 6.7 6.5
Change-Id: Ie392a4875fe412b8eb273a457a83cd08cd9f5e15
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e960fb136e77437e158367f86bc926504e0fdab6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The behavior that argument was enabling is the default one now.
Task-number: QTBUG-90492
Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1ef3bd05eb45d53cdcf92b933603b995283b3432)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QtWindow is not at 0,0 of its parent, not mapping the position
leads to offsets in the touched position in Android vs where it is
received in Qt, e.g. needing to touch below a button's actual
position to trigger a click.
Task-number: QTBUG-126178
Pick-to: 6.7
Change-Id: Icd62ed59f0f323ba3977145c3304e4e874aa4fa2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 15674f4ce9ea455b47f68d8871d5676d7a731630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't move them around during deprecation.
Change-Id: I647fec5a440ea063463dc285def5d793726a9e61
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 70475a652a9a44651c25126f6615770e8b43ca1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From and to algorithms were accidentally reversed before submitting
final patch.
Change-Id: I16e0afda26b77047facf4f65065224c8f3dce6c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1b1f613b56fce643a7565e9280acc90e171caf7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This enables doing QtGui testing when using QAbstractItemModelTester
in Qt for Python, where the QTestlib binding only links against
QtCore.
Port the code to check against QMetaType constructed from type names.
Task-number: PYSIDE-2772
Change-Id: Ifcd8f1ea4758459d8a178226e3f215e5c2b273b8
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit bb542a55b28dd591709ed2c68e4505ec08fc62b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Delay-load the icon within QPixmapEngine::addFile() when no size is
given and the format supports it (e.g. png) - this speeds up QIcon
creation as the whole image is parsed later.
Fixes: QTBUG-59621
Change-Id: If165ca97c4b91f68a7d98f57de711390de060012
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a843db6e2d80a99be38c2b66aac92cb912613bd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a note to all functions now taking a QAnyStringView that their
signature changed from QString to QAnyStringView
Change-Id: Ib9743b5b2c437724c6308e74ef3c5820136a34f5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a736a3c670929e3b73e11b33cc1705957c42961b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pointer handling API was added in Windows 8. As we no longer support
Windows 7, we can make mouse handling code easier to read/maintain be
removing the legacy implementation.
[ChangeLog][Windows] Legacy mouse handling has been removed. It is no
longer possible to enforce legacy mouse handling by passing
"-nowmpointer".
Change-Id: I58387471999a371fd20c644abbcf855e192d220b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3a38de71da13103fbe5bdf6b822263e282e68368)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the Activity restart path is run while m_layout is null,
it would lead to a NullPointerException when trying to
access m_layout. Moreover, the code here doesn't make sense,
as m_layout.getParent() should probably be only done when
super.updateActivityAfterRestart() returns true because if
it returns false, the app will be restarted anyway.
Testing the restarting behavior of the Activity, it seems
that the code code doesn't really work in bringing the app
to a usable state after an activity restart, and this code
path should be re-evaluated. Thus, I'm simplifying the logic
to only restart the whole app, and later figure out a way to
do a proper smooth transition instead.
Fixes: QTBUG-124786
Pick-to: 6.7
Change-Id: I79f0c53c815bf71c831d0b930f358c9fd820a2d4
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7602f71aa6cd10ff1b16d154fa967c8fce8e8d0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is safer against slicing and more explicit, ie. doesn't leave
readers of the code wondering whether the JObject move SMFs are
actually working or call something else, because the JObjectBase move
SMFs are disabled due to the protected dtor.
Change-Id: I5c94c95c2e2b807a8ea3bfbcc2b80b390b2bd837
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 51c5259fe9c5f5e41a22622830f1ca532f989685)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Consider a feature that has ENABLE and CONDITION expressions. For
example, system-libb2 on a Linux machine that does not have the
libb2-dev package installed:
qt_feature("system-libb2" PRIVATE
LABEL "Using system libb2"
CONDITION Libb2_FOUND
ENABLE INPUT_libb2 STREQUAL 'system'
DISABLE INPUT_libb2 STREQUAL 'no' OR INPUT_libb2 STREQUAL 'qt'
)
If the feature is enabled by the user by setting
FEATURE_system_libb2=ON, then there's an error:
Feature "system_libb2": Forcing to "ON" breaks its condition...
This is expected.
If the feature is enabled by the user by triggering the ENABLE condition
via the -system-libb2 configure flag (that sets INPUT_libb2 to
"system"), we did not get an error message.
This was unexpected and inconsistent.
Now, we consider features that are enabled via their ENABLE condition as
set by the user and yield an error if the CONDITION doesn't match.
Fixes: QTBUG-126144
Change-Id: I249baf9ab4f434f5a96894f4ec055f70859ffca9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ad227368c3ab3a9dc68208bce2d075edefe7e6e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test checks if paths in /etc and /home are properly completed.
/etc and /home do not exist on VxWorks.
Use /tmp instead.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I6203fabb003a9a81eb4cdb666a972f47a53f06d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 843f8fb043a0812ab01f0a378be1a821f2e1534d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The rationale given for the addition of these functions was that they
are a more efficient way to check these things in public API.
If so, they shouldn't cause compilers to insert exception handling
around their calls, so mark them noexcept.
This is safe, as both conceptually and practically, these functions
should not and cannot fail, so we'll never need to remove noexcept
again.
Found in API-Review.
Amends 7a374c38d288435b3c0a76b82a1c2ca53ea9c003 and
a3d50112e44bc42b310d9d3a8e6c7805ef31ef53.
These two commits also lacked each the changelog entry, so adding them
here:
[ChangeLog][QtCore][QThread] Added isMainThread() static member
function.
[ChangeLog][QtCore][QThread] Added isCurrentThread() member function.
Change-Id: Iaf39ce2cc0abd45049bff60b24693e84bf76d9e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d73a2bf0fb3e0a00691c858645a5a5bb2b55b40a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There was a small mistake in:
d2ae5ef51e3339c11b1c0ed0b09f9d17b9708f53 commit, which caused a
regression in the input method.
While the function parameter name has been changed, the assignment name
has not. This resulted in the values never actually getting updated.
Fixes: QTBUG-125410
Pick-to: 6.7
Change-Id: I8e64e991d02546ddd078fd273f0b57491c63b55c
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 79e00b0b25765b85b112b601fee70184b1efe3c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Extending headersclean_check to private headers has shown that
Q_DECLARE_PUBLIC needs to know the Public class in-size, so a
forward-declaration is not enough. Says Clang:
qfuturewatcher_p.h:31:5: error: static_cast from 'QObject *' to 'QFutureWatcherBase *', which are not related by inheritance, is not allowed
Q_DECLARE_PUBLIC(QFutureWatcherBase)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends the start of the public history.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I1e132aaa844f5c87d57446e8818280fd141d2b1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b58d926090620079f602f4f2ce9f17fe7025c962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace code that manually operates on jarray with QJniArray.
The comment about using separate jobject and QJniObject didn't make
sense; we didn't construct the QJniObject via fromLocalRef(), so
allocated a new local reference anyway, in addition to the local
reference returned by GetObjectArrayElement.
The implicit code now creates a QJniObject (-like object;
QtJniTypes::String contains a QJniObject) as well, but it's also
just a temporary. It would be cheaper to iterate over a
QJniArray<jstring>, but only if we then duplicate the code from
QJniObject::toString to not create an intermediate QJniObject.
Change-Id: I9f10541f533dd2fbd2f7ba6fdacc7d79b3ac3ae9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 64127a7a0db657cbc844938f02b623f90cdd78ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit f8359084b948fd8f6027d23a869f1a0d50cc30c1.
Lookup-by-string functions should be all taking QAnyStringView, not be
overloaded on QString/const char*.
Found in API-review.
[ChangeLog][QtCore][QStringEncoder/QStringDecoder] The (name, flags)
constructor now takes QAnyStringView (was: const char*).
Fixes: QTBUG-126108
Change-Id: If68343ce5ec2ff60ce55156f9f2dc2bb6938e07f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d4c4e6b876b948c1a34abdd46cf7f5be1c302137)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These kinds of lookup functions are no-brainers for QAnyStringView.
This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.
Because this is API-Review-relevant, keep the implementation
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.
Task-number: QTBUG-126108
Change-Id: I4a0d1840d4754670b2e2f20d768ed98f7e1937d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f6c11ac4f20a16d0b2113014e2dac63b95d946ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These kinds of lookup functions are no-brainers for QAnyStringView.
This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.
Because this is API-Review-relevant, keep the QStringView case
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.
[ChangeLog][QtCore][QStringConverter] The encodingForName() function
now takes QAnyStringView (was: const char*).
Task-number: QTBUG-126108
Change-Id: I02cc53bfbc8f1eebe539816487a10b39e96fac2d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b3edce58e5aea76d1d84c868f76171c2b40520a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've had this workaround since Qt 5.4. It's due time we get
rid of it. This commit deprecates it, in preparation for removal.
[ChangeLog][QtCore][QExplicitlySharedDataPointer] Support for
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST has been
deprecated, and will get removed in a future version of Qt.
Change-Id: I3000ea606b37714542916e105ebd50871dc42935
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ed039fd134fb8025236847295681f13f1775847)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On macOS, we see unexplained white flashes of the UI when
overriding the scheme in the widget's constructor. This only
happens when running the bundle, but not when running the
executable.
Work around that problem by setting the scheme immediately
after constructing QApplication.
Task-number: QTBUG-126248
Change-Id: I4a5fe467d628fca5e52e1e36f43af8143239c7fa
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 88322f69a20fddedd9c45a1bb25f6c1d2dcf31f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That way, an override through QStyleHints::setColorScheme is
immediately respected by the style.
As a drive-by, make the helper static and inline.
Change-Id: Ia6cde1f5099d9194b25fac812c3184f5a61bf1dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 4245987f6875d01853053c50d13ecf42b61fc0ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify the relevant QJniObject calls to not use callObjectMethod,
but rely on the return type that we have to pass in anyway. Replace
manual loop unwrapping with QtJniArray, and declare the QtNetwork
Java class so that we can use it directly.
This removes the last usage of Q_DECLARE_JNI_TYPE in qtbase.
Change-Id: If872684c8b52bc7789e248cfc3046817c411903c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 909493bae27eeb55c985aa9522a57bc4e60d0893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the forward argument was meant to be 0, it was not forwarded
because it evaluated to false in if(condition).
To pass it along, instead check for empty strings.
Change-Id: Ia366df147de0c2d333017da43dc0643b56a89e9c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 96abceb64e5dc0570ca7c3419f401cfafe946ba0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QGuiApplicationPrivate::processTouchEvent() sees that the
touch event was not handled, and calls processMouseEvent(), the latter
uses the QEventPoint with pointId 0 regardless of the original
touchpoint ID. Now it updates the persistent QEventPoint from the
original touchpoint so that a double-click event will not be ruled out
because of the timestamp delta or position delta (movement since press)
being too large.
Fixes: QTBUG-125993
Pick-to: 6.7 6.5
Change-Id: I8e9b007818107ac2329454e0ccfb2ac9e506b617
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2a0b907f11b9c0ad46322ba06482861423246d93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The docs claim that this is the default, but in practice it's not
the case.
Change-Id: I5f6184cbfded2efedbac88023644d3c1e80e9901
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit a05f5457ca033214c1efcf528b85a09a9c758920)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We always create UIView via initWithQIOSWindow, so there is no
need to keep part of the implementation in initWithFrame.
Change-Id: I5311ed78fff3294ed49af70d482449cbf3b8211b
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 29b6674d3f8d1012def9dbcf89521e4773175dc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test checks if two paths test equal if they are pointing to the same
place, but one of them is not a canonical path.
Example of such paths: /tmp/.. and /
The test assumes that /usr is an existing directory on platforms other
than win, haiku and android.
The reason /usr is used instead of /tmp is that /tmp is a symlink on
macos and that interferes with the test (as described in 0b67ad9d).
However /usr does not exist on VxWorks (unless created by the user).
/tmp can (and is in our CI env) enabled by turning on the
INCLUDE_TMP_DIR component.
Solve the problem by using /tmp instead of /usr on vxworks.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I98b0d46d1b879f404c0b5bd655031e7c3f19ba33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 70e2fe2bba71ea0a4d1d1e533c1130c97f77df55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The #if-ery on the removed API's definition still needs to match its
declaration. Spotted by Axivion.
Pick-to: 6.7
Task-number: QTBUG-122619
Change-Id: I4e3dc03291a8fb7fbc01065bce8e5dc58a051166
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 76f82b8f1334d8a377630876ef2d9681c05d7ee8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From the API review.
Change-Id: I74140a9268670575488ddc3c31b09c84bc83eae0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit df85c6fd9d65abf44ccdcd1d6e6594cab3fc7d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
TSAN has the same issue as ASAN when it comes to the SSE2 usage here.
WARNING: ThreadSanitizer: heap-use-after-free (pid=621)
Read of size 8 at 0x721000049f78 by main thread:
#0 _mm_load_si128(long long __vector(2) const*) /usr/lib64/gcc/x86_64-suse-linux/13/include/emmintrin.h:700 (libQt6Core.so.6+0x2ba056)
#1 qustrlen_sse2 qtbase/src/corelib/text/qstring.cpp:431 (libQt6Core.so.6+0x2ba056)
[...]
Previous write of size 8 at 0x721000049f78 by main thread:
#0 realloc <null> (libtsan.so.2+0x5bdbd)
#1 QArrayData::reallocateUnaligned(QArrayData*, void*, long long, long long, QArrayData::AllocationOption) qtbase/src/corelib/tools/qarraydata.cpp:244 (libQt6Core.so.6+0x309913)
[...]
(gcc 13.3.0)
Pick-to: 6.7
Change-Id: Id0127d5fb498dcf78bb977e6ff1b6b380ae423c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 600368279dafa60e788d8e3cd3af5c1915990fbb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In non-MSVC configurations this feature is meaningless.
Restrict it to MSVC.
Change-Id: Ib5111e8adf49a862d8ca0f191837d8c28aab6890
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 433411934c7ebb2a29e950c14871199166e5534a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Prevents weak (= duplicated) vtables and the associated problems.
Amends the start of the public history.
Pick-to: 6.7 6.5
Task-number: QTBUG-45582
Change-Id: I26618483900437aca05c753a5d53a359e43bd702
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 645509935ad5a2e8a3fcc858c41d08919a2596bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIODevice is a base class of one of the classes defined in this
header. QtCreator's clangd goes on a rampage in this header as a
consequence.
Amends the start of the public history.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I06c6a26dde7e7ae72b722136fcd666684733d40f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 09fce4a587047ff03c7ca37dbb2bb8f71a18a75e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When building for 32bit Android:
qcolorclut_p.h:45:31: error: comparison of integers of different signs:
'qsizetype' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
Q_ASSERT(table.size() == gridPointsX * gridPointsY * gridPointsZ * gridPointsW);
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix by casting the result of the multiplication explicitly to qsizetype.
Change-Id: Ica9a2f9738959adfa841270ffdd4893bd7d1d4e8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 37ba5e94d681c8d65b0e44a14b0e1595d072800e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found in API review.
Change-Id: I873c8c0b7e9521d07718b7fd38065d33b98e3ba9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f0a8fe6cdf3ec5e8c9030fa581df1aad3b78d210)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake somehow doesn't treat the access to the cache variable in
condition as the usage. Replace the check of the
CACHE{QT_USE_TARGET_ANDROID_BUILD_DIR} value with the check of the
CACHE variable definition and the check of the CACHE and non-CACHE
value equality.
Pick-to: 6.7
Change-Id: I07d940d457ebbc4ce3cefef2f73394009d52f367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 69a661e88e6a7799799033030497086a9194caab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The parameter buildPath comes from QDir:absolutePath(), which gives a
path that starts with '/' or a drive speficiation. When calling
getImportPaths on a Windows machine the path becomes something like
"/C://dev/qt5/...". As a result, androiddeployqt exists with a failure.
On Linux/macOS systems this was not a problem because // = /
Change-Id: I85376253055549344f06c9da9ebd67364e429112
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 776982a14e53e8661c3508c3d05e0efe538bc67e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The check was re-introduced in 7a9bc220c70745cd3689d51cd131efde86f078d7
and moved to QtRootLayout in 6ff88f97a6d24d1098583421161f8f903f9dafde.
It introduces an issue where the resizing of the application window does
not work if the its aspect ratio is different from the screen's aspect
ratio.
Fixes: QTBUG-126122
Pick-to: 6.7 6.7.2
Change-Id: Id6d26b247b9ca7a8d0e89e1fdea2d77db12a6cfe
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a6b78e6f4dbbf688fc0b1d1487b86890b149d323)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QChronoTimer is in Qt 6.8.
Found in API review.
Change-Id: I7f20958948cb635ccd1f4cef383aed810a188f12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 25f2b7c32226fdabcb22fbf928bb0c058cd53022)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So that it's not forgotten come Qt7.
Amends 19258608e9ea02043ce9b53d4a9c99700ce49c1b.
Change-Id: I323f2d2738a295faa1e118c3ea7c8a5b6c6d0ac7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ef8e1e5861292514a676c5fed4d670fb6ecb887d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a popup widget is shown, it's first raised(), and then made visible.
In this scenario, the logic in QIOSWindow::setVisible() to compute the
window level was too late, and we ended up showing the popup below other
popups.
Instead of moving the window level computation earlier, we remove the
member variable and just compute the level when needed, as we do in
the Cocoa platform plugin.
Fixes: QTBUG-126052
Fixes: QTBUG-126044
Pick-to: 6.7
Change-Id: If5dbcdcf0500aed57b725bb8eb636fe076459130
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 0e656164e640ff2aca00e82b51b0f1019fd7802f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clang's -Wimplicit-fallthrough is a little stricter than gcc's.
Change-Id: Idf933e19ab2d664885743e5db6c1fbb66c8b615e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 05a139d5fb5eb3d652f24ef5ebe28c232b69c6a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename the predictate for checking whether a container type has the
required member functions and types to IfContiguousContainer (we
need size(), data(), and value_type members).
And since std::initializer_list always meets that criteria, remove the
constraint from the respective constructor.
Add an IfConvertible predicate to test whether the element type of
an existing array can be converted to the element type of the new
array.
Change-Id: I7e5ba31de9664088b027c277c068c948f2189238
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 468126d34a8c3a2fdd486768f935d13ebe565dd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure that QByteArray does not detach when not needed and avoid some
copies by using QByteArray::fromRawData().
Change-Id: I4454a3113c6bd1fe30b404af091f5cc0f904f78a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 54853352bbeff7ad3ee3b3aa3a90e45de5082e17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The lower bit of the sqltype is used to express NULL values and needs
therefore masked out. Do this before the acutal operations for better
readability/debugability.
Change-Id: I71ee97f4c38241ccc9804562e2826ce9b53567ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fc4750bd753999e9a0787614ac8960e0506075dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cleanup the code by replacing repeated access to sqlda->sqlvar[] with a
temporary (const) ref to enhance readability and avoid repeated lookups.
Change-Id: I716812f4446bac7fb3e92bc6fbb099845836624f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
(cherry picked from commit 2a7e28923c5aae99690fc5a32460b3dbb376c4c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since the current minimum supported macOS version is macOS 11 (Big Sur),
we can remove redundant OS version checking and cleanup the code a bit.
Change-Id: If42251cc193e8daae81a73cb25582fa014f2b9a0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 23f6d954ec5a4d9437cad433e957a718aeb9ce49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A standalone comment added before a test case or keyword will
be confusing once more test cases and keywords are added, as
the comment likely doesn't apply to those added lines.
Change-Id: I4e36c1c2ae4547bcffa9df817cd53c64cf66defb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2f939540c7a7dac262dd61210351cbd24545ee83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Strictly speaking, we did want to compare pointers, but char* are
special with QCOMPARE in that the pointed-to strings are compared, not
the pointers. So this wasn't doing what we wanted it to do.
We could static_cast to void* to do it, but subtracting one from the
other also gets us what we want, with simpler code. The drawback is that
if appendToBuffer() ever returns nullptr, we'll print a huge number as
the offset.
Found by Valgrind:
==3769588== Conditional jump or move depends on uninitialised value(s)
==3769588== at 0x483FEDC: strcmp (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==3769588== by 0x4C41EB6: qstrcmp(char const*, char const*) (in lib/libQt6Core.so.6.9.0)
==3769588== by 0x48975D8: QTest::compare_string_helper(char const*, char const*, char const*, char const*, char const*, int) (in lib/libQt6Test.so.6.9.0)
==3769588== by 0x12B12A: QTest::qCompare(char*, char*, char const*, char const*, char const*, int) (in tests/auto/corelib/text/qstringconverter/tst_qstringconverter)
==3769588== by 0x10EE94: tst_QStringConverter::invalidConverter() (in tests/auto/corelib/text/qstringconverter/tst_qstringconverter)
Amends c46ee7df57c30c94107df8506d30d8872ffa3baa.
Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-126107
Change-Id: I44265a5eb67e47a59fc8fffd17d64051657af529
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9d5611dc97979dab1932b07f8cfab367c3872d24)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The findStringInsensitive() function was declared but never
implemented.
Amends b347d487048cf36d609dd31952dbef1813b5b0e5.
Found in API review.
Change-Id: I178c7529f21adecaa568ba8da9195c1d5057c88b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6c4f7dffec7683fd8b9299a6328921d1f1beb584)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The original patch didn't make it into 6.7, so the conditions should
be changed to 6.8
Found in API Review.
Amends dfe968e9702c740b3522715fa9f0e9a281c92885.
Change-Id: I8ba16370d3b04c6a921539a8f4c70a407c175bf9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2e7ac6ecf4eb39aa64b23e7113d78b56435b9150)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QSharedMemory* is not a faithful representation of a
QSharedMemoryLocker, so the resp. converting ctor should be explicit.
Found in API-review.
Pick-to: 6.7
Change-Id: I2267a193868c4d0979f59ed0847a0e4af64ffe76
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 54a57b1e6a011450bc4549abb98141e2440c3f6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Version 903a83ff7bfc3148e3692e09396f9f3bdc9462ef, fetched on
2024-06-05.
[ChangeLog][Third-Party Code] Updated the public suffix list to upstream
SHA 903a83ff7bfc3148e3692e09396f9f3bdc9462ef.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126060
Change-Id: I96320b5df1a3573ab9198ad412fc1eca55204c02
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c0d5c1b2fef140a44b6512ee79ba7fb67187a39c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The original patch didn't make it into 6.7, so the conditions should
be changed to 6.8
Amends 5ea4e27661e1805a6ed01c7a61643f9a50c15d62.
Found in API Review.
Change-Id: Ib8b77e3370685057b09b5eea2d982d3a6b77a1a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b3ebfc64d4c6fefde970c18c89e59cef9abc56c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fixes clazy-rule-of-three (and -Wpeppe). The actual operations
performed are copied from QMutexLocker.
This code predates the public history.
Pick-to: 6.7
Change-Id: Ieba73502187b32178ec2601e1902ac6b20a8e477
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit a6f1779207958f25abeaa39b03d6459586bc7575)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The ctor is explicit so there should not be an assignment operator op=.
Changing the assignment to = Qt::totally_ordered_wrapper(ptr) is also
possible but if ptr is nullptr, I have to forward declare a pointer as
follow "T *n = nullptr" and then call Qt::totally_ordered_wrapper(n).
So I think adding reset(P) function is better.
Found in API Review.
Change-Id: I0acfcacc97a43f3cf8bfa65b2b16a65cae95b727
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit dc49d84abc35dfbbc4028a5f86017786cff13ae7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike the old Qt::compareThreeWay() overload for raw pointers, the new
overloads for the Qt::totally_ordered_wrapper didn't allow to compare
wrappers of different (but compatible) pointer types (base vs derived).
This patch fixes it.
Ideally the constraints on operators in Qt::totally_ordered_wrapper
should use std::common_type_t, but we hit a bug in VxWorks that
prevents us from using it, so simply demand that the types are
convertible pointers. For now that should be enough, considering
that Qt::totally_ordered_wrapper only expects pointers as wrapped
types.
Found in API Review.
Change-Id: I9f7184468bea3e1f2944ca5347f0b79eded2f4d3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d73bdec05101b34745156c8cd4ea571f1223ad32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
compareThreeWay() was supposed to be an operator<=>(), but for C++17.
The idea was that at some point when we unconditionally demand C++20,
people could just replace all the usages of compareThreeWay() with
operator<=>().
However, the Qt::compareThreeWay() overload for pointers is different
from the operator<=>() for pointers, because it is actually using
std::less{} or std::compare_three_way{} to do the comparison, thus
avoiding an UB. This is not bad as such, but can potentially lead to
UB when mass-replacing all compareThreeWay() calls with operator<=>().
To avoid this problem, deprecate the overload, and suggest to use
the Qt::totally_ordered_wrapper together with the respective overload
instead.
Found in API Review.
[ChangeLog][QtCore][QtCompare] Deprecate Qt::compareThreeWay()
overload for pointers.
Change-Id: I9c57871145dc3cb9656d6006db88b48a1553bef4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b1ae4334ea11f6942c7ce37a80a3aa98a3447809)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Provide the overloads as free functions in Qt namespace instead of
making them hidden friends of the Qt::totally_ordered_wrapper class,
because they should replace the to-be-deprecated overloads of
Qt::compareThreeWay() for raw pointers, so they should be
easily discoverable.
Also, we treat Qt::compareThreeWay() as a C++17 equivalent of
operator<=>(), so we need to have an overload for pointers (even
if it takes only the wrapped pointers).
Found in API Review.
[ChangeLog][QtCore][QtCompare] Added Qt::compareThreeWay() overloads
for Qt::totally_ordered_wrapper. These overloads do the comparison
using strict total ordering.
Change-Id: I2b5bc542c546330ca78c6284188c8167136a849e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d6e1df3513c7d5b6e93d68583fc4c1febb7bcd85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
At QWindowPrivate::init time we initialize the cached device pixel ratio
from the target screen's device pixel ratio. Once the window is created
we then pick it up from the platform window, but at that point the
window may not yet be part of a UIWindow hierarchy with a UIScreen,
in which case the UIView reports a contentScale of 1. Once the window
is shown, the content scale starts reflecting the UISCreen.
To avoid the intermediate step of reflecting a DPR of 1, which also
triggers a warning from QGuiApplicationPrivate::processExposeEvent,
we reflect the window's QScreen DPR as long as it doesn't have an
associated UISCreen.
Fixes: QTBUG-125479
Pick-to: 6.7
Change-Id: I0e038e3c3f0bfff116e0910d24e85cc817c890d4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 31f9f80ad38177605a3011b6fde70e3a8d536d47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We already include the action's address by printing
static_cast<const void *>(action), so no need to include
the additional "0", as that just results in "QAction(0x00)".
Change-Id: I8ce1f5030db146a737fa73bd8f2b86e89401d345
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a85c336597a80ca96ea745830c0d9776b98c835c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The local RAII class was missing the Q_DISABLE_COPY(_MOVE). Add it.
Amends f9035587b98ac5dc9491e642b8ec84470ec03f0e.
Pick-to: 6.7
Change-Id: I19dfa18c301698e45353435b9b77e62332e54c31
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 199a4535e7e665c656c8e35e3e3fdc5da7e5bd51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Partially reverts ac7f22ed0a4bb25146b87c0f6be54323909ea401.
Bring back the following to qjnihelpers_p.h so they can be exported
as private APIs used to handle event listeners.
* GenericMotionEventListener and KeyEventListener
* register and unregister listener calls
Task-number: QTBUG-118077
Change-Id: I5b9c7073801f0b1305237184bb2ab91678e1b1b1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 6b105c54eee069f6ddeeac41d9f93ad533f24586)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A floating tab is a QDockWidgetGroupWindow, containing a
QMainWindowTabBar, with each tab representing a dock widget.
Users can unplug dock widgets from the floating tab, by dragging
the respective tab of the tab bar. Such a drag triggers an internal
move of the tab at first. When a tab is dragged outside the tab
bar, the dock widget is unplugged and becomes floating. It is
supposed to be placed with its title bar under the mouse cursor,
so the drag can seemlessly continue and move the newly unplugged
dock widget.
To position the dock widget's title bar under the mouse cursor,
QTabBarPrivate::dragStartPosition was deducted from the mouse move
event's global position.
QTabBarPrivate::dragStartPosition holds the the position of the tab
at the time when the drag had started. It is used, to restore its
position, when a move is aborted. Using this point to calculate an
unplug position is wrong. It results in random positions, away from the
mouse cursor, especially if the tab has been dragged over a longer
distance.
Implement a helper function, that positions the dockwidget with its
title bar under a given position.
Use QDockWdget::titleBarWidget()->rect.center(), if it has a title bar
widget.
Otherwise, use QApplication::startDragDistance() as an offset on the
short side and the middle of the long side as coordinates.
The behavior can't be autotested, because
- mouse move emulation doesn't follow a line.
- drag and drop can't be tested on Windows platforms
The dockwidgets manual test (former dockwidgets example) can be used
for verification.
Fixes: QTBUG-126084
Pick-to: 6.7 6.5 6.2
Change-Id: I276cb6ade3944921d747bf5e73b7b6fe402d10c5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 37861df8e5a41f0f654e15776c631da95ba26c03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because that's how we declare them these days.
Found in API-review.
Amends c89b1bbddc73b044762cabc67c1e5063a6ffee86.
Change-Id: I5163952e43abc1185b8f8f5c5fde2b4839e78e0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9387ea21cd4ab26dc6a5cdc5d6a732be1fe8e429)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found more issues:
- quint8 and qint8 (signed and unsigned char) actually match an
integral overload (probably int/uint), and _not_ (char),
- char8_t (only in C++20 builds) and (at least on non-Windows) wchar_t
are incorrectly treated as numeric types,
- qfloat16 breaks if QFLOAT16_IS_NATIVE.
Created a few tasks to track these.
Task-number: QTBUG-126053
Task-number: QTBUG-126054
Task-number: QTBUG-126055
Pick-to: 6.7 6.5 6.2
Change-Id: Iaf64929e3fae257d5dd283f555bb71ea2908cc94
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 967736b96ba06bfdfdf553b2c3720d7adc4a921c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 4d6721781806e4ce172f836d4b58df68acc4e4b0. qdoc using
LLVM 18.1.6 doesn't generate a warning for this, but the one
in CI does (but the warning limit is currently inactive).
Change-Id: I1e29e35c9c88d78133a3ed130a3111191b7ad7f9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3c81fc5d7337f18fdd6f9fedf7ba436152f3daf1)
The "__msvc_int128.hpp" file is not available in MSVC 17.1.5
Change-Id: Iebc611342ffe5baafb8469205e14afc41b55be5f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1b3ae003e657074a9b3cc5a8e5212a40cf02c0fd)
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
If a build dir is removed using rm -r *, this still leaves
dot files around, specifically the .ninja_log file.
Because of a possibly unspecified behavior of listing directories as
OUTPUTs in a add_custom_command call for the
${target}_copy_fw_sync_headers custom target, we end up with a
situation where the custom command is not rerun by ninja because the
directory OUTPUT was encountered in the .ninja_log file.
Make sure to specify an additional file as an OUTPUT, to ensure the
command does rerun, and thus copies all headers from the syncqt
staging directory.
Amends 103eca1070a75bfa97d0b72b94e0c759ef0bcd1c
Pick-to: 6.7 6.5
Fixes: QTBUG-126056
Change-Id: I5664cf074158199e0c7fd5e312ecf739133d7f2e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c561bcceed0300a14e2062958afce62776be4b6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The static QMessageBox APIs taking button texts instead of standard
buttons promises that the return value is 0, 1, or 2. After the change
in b30121041c07b1b8613eaf624c9aa55a51001aef the return value of exec
for custom buttons was changed (as the documentation says its an opaque
value), which unfortunately affected the deprecated functions.
To fix this, we use the index of the clicked button in the custom
button list, to restore the previous behavior of the deprecated
APIs.
Fixes: QTBUG-125858
Pick-to: 6.7
Change-Id: I96d39e42b64e2b55eab07e2f15df71b94cfe3e6d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit a428c6933565ee8368367534cf306ccc6957f5a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5b151ea2d23dc3834180d3ec6495ac5d99cae550)
Always pass the fixed strings on the LHS, and whatever the user
supplied on the RHS.
The old code is not wrong, and the new code is equivalent, for now,
but keeping the same order will simplify an eventual port of
nameMatch()/encodingForName() to QAnyStringView.
Pick-to: 6.7 6.5
Change-Id: I9aa338a9c497764d2ad5d97bbd8b36710186b3af
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c8feef0bb5825102a397787366df74990cfdbf6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Cache the return value of QIBaseResult::record() to avoid the recreation
(e.g. when using QSqlQuery::value(QString) instead index-based ones).
Change-Id: I88568d99ba96e19ae6b661d058e7709ebc5ef2a2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 71880c018fe98854948a6c7dd9049e4ba0ddb8e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... instead Q_CC_MSVC to be in sync with qlocale_tools_p.h and avoid
compiler erros when used with msvc versions not providing int128
support.
Change-Id: Ia2166a6260a9340a5e5bbca3f46c3b77a9f8d50d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 694ce1772db45d115ad02019a46ad2db4c3abeab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Back when 953f70179969b0beb797607c5454e36349319929 was first introduced,
we thought it would be a good idea to make popups in qtdeclarative use
popup windows by default, and then let users revert back to the old
behavior via setting an application attribute.
We eventually decided to go in a different direction, causing
AA_DontUsePopupWindows to no longer be needed.
More information can be found in here
823026646c62c7e3b42be1549fcb61debb468e60 in qtdeclarative.
Reverts 953f70179969b0beb797607c5454e36349319929
Change-Id: I3c5054d92c4d8c38193e7e0c193f425b7414f6dd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit a3df8dac90c6f78c6b8832e8413b8542818cea0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When invoking setWindowFlags with a QStyleSheet and QProxyStyle set, a
repolish is recursivly done creating a second QStyleSheetStyle in
QWidgetPrivate::inheritStyle due to not cleared WA_SetStyle window flag.
This leads to a use-after-free in the then following recursive call to
QStyle::polish. This patch uses the previously create QStyleSheetStyle
in the case that there is already a QStyleSheetStyle for the proxy.
Fixes: QTBUG-125513
Pick-to: 6.7
Change-Id: I841bf68143e893d74ab7373b7a3d3d4ee2bce514
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 26af5d1854336907d6d7fd6aa1ad060f6d38ce1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is not clear why an OpenGL implementation would reject
(with INVALID_ENUM) the setting of GL_TEXTURE_WRAP_R
(as making it an error makes no sense and not in the spec
either), but the most likely interpretation of the
associated report is that some Adreno-based Android devices
do that.
So instead of just testing if we are >= ES 3.0, also check
the texture target before setting WRAP_R.
Pick-to: 6.7 6.6 6.5 6.2
Fixes: QTBUG-126012
Change-Id: I0fe1cd71b9fd74748f7bae78030c41ca972932b5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit f50e946012553771190addbca7deeb498ac992b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Ideally that doesn't have to be used by clients, as declared types
have a registerNativeMethods static member function that can be
used directly:
QtJniTypes::MyType::registerNativeMethods({...});
But since we don't have documentation for declared types yet (we
could document the QtJniTypes::JObject class perhaps), let's
document this helper for now.
Change-Id: Ic1aca504cc08dfad83b6ba867db24037b1ed7d23
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4d6721781806e4ce172f836d4b58df68acc4e4b0)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
[ChangeLog][QtNetwork][QRestReply] This class is no longer
"under development and subject to change".
Change-Id: I8c7ae54b33fd9a6edb22a35ca58ef87da68a9b0b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f39ce44c733d8cbbb12de8b2413b5f72e5b94be6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtNetwork][QRestAccessManager] This class is no longer
"under development and subject to change".
Change-Id: If4d1a45c428d15ae7b4c8e83b6fe05327e6d62a7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 20b85ea8bfeab92e7a4a9c3e1ed2732ff5753635)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtNetwork][QNetworkRequestFactory] This class is no longer
"under development and subject to change".
Change-Id: Ib0b6fbc6226709a8bcdbb66488c7d3e7097acc8f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 23a83d6dcee23af02b775bc6af7766c03040ae3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Returning the wrong data type for Qt::SizeHintRole may lead to a size
of 0,0 and the item disappearing.
Task-number: PYSIDE-2772
Change-Id: I906445f2ed2141da2606774f2b8ad6282662eb17
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 84f2cd6523081ed8774b2a9fe9ee36d05172ff50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simple: just inherit the payload type's (QTypeInfoMerger isn't needed,
as the sizeof totally_ordered_wrapper<P> is the same as the sizeof P).
Yes, this means Qt::totally_ordered_wrapper<P> is marked as isPointer,
but that trait is already deprecated.
Found in API-Review.
Change-Id: I4b5df08cd4891bd463d1f127c17ed5c4cd812984
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5bfb6d513c0692ba1b6621b2ff0b3207088eb742)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Right now vxworks is not on the list of keywords used to blacklist
tests.
Because of that, it's not possible to blacklist a test specifically on
that platform.
Solve the problem by extending the list.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I04d55eabc27f7554ea9e3fa030ff118a22a624b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8f9b0891f59dbc59d1295bf8eff361070bd01a9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The previous patch missed the handling of SQL_INT128 in
qIBaseTypeName2().
This amends 373ae6cbd24cf0ddbed453e14b1f683e76c92bb5
Change-Id: I646bd5af23c14761195f9c1089dc4cbbe2e94790
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
(cherry picked from commit f6bb8f832442a2e70b3d4718fb06807cfe98511b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The type doesn't have hasNext/next member functions, and
the fileInfo/fileName/filePath functions are members of the
nested DirEntry type.
Since the DirEntry type is not documented, linking to it will
still fail. Adding documentation for that type is an exercise
for a future commit.
Amends c39a0d1e8956e042139ce3065681e4c5d07412f3.
Change-Id: Ib223905123264271ce090a991cd73936b49edaae
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 71053abba3b9a6aed51793e7259c34e431b714f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIconEngine::scaledPixmap() and isNull() are now virtual functions
which can be reimplemented by the icon engines so the comment was out
of date.
Change-Id: I308446dade1da9edeef5c554db146443660b4761
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3987e938b1004329c6614adcf3c3d2777b8b1cea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change all functions taking a QStringView to take a QAnyStringView and
remove all functions taking a const QStringRef since this can now be
fully handled by the QAnyStringView ones.
This amends f2dba1919427bcc0f510d7f60e3fafbd6f41430d and
993f31801446c1d851c7c8d54c9b55216acd0993
[ChangeLog][QtSql][QSqlRecord] All functions taking a QString were
changed to take a QAnyStringView.
Change-Id: Ia1c968c4e2a7a93aa26d090ef6605271305c14a6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6b096271cf0aac38d80f292f8b37edd671a8d17f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a small snippet that demonstrates how to create a multipart message
with qformdatabuilder
Task-number: QTBUG-114647
Change-Id: Ie85cdcf40bd4333d06ead3f5b8dfabd799d2a9ab
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8e4f1d9636bd9baf807b42e7c89453109e420b9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Demonstrate that QSystemTrayIcon can wait for a tray to become
available. For example QDBusTrayIcon::init() connects to
QDBusServiceWatcher::serviceRegistered to detect the StatusNotifier
service becoming available. So instead of unconditionally quitting
if there is no tray, allow the user to choose to "Ignore" its absence,
or "Close" the application. Realistically, applications in which a tray
icon is an optional feature should not quit just because there's no
tray.
Task-number: QTBUG-94871
Change-Id: Ia8efd95fcfb9ff7c915ee8e259e9a0903fa7bcb3
Pick-to: 6.7 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
(cherry picked from commit 82cba0ca5c575d86accc02defd9c449e272ec1d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were splitting the Unicode command-line using CommandLineToArgvW(),
then converting to 8-bit for argv. That was practically always the same
as what the runtime had already stored in __argv. But not always: it
looks like the runtime splits the 8-bit command-line (GetCommandLineA())
and there are certain Unicode characters that WideCharToMultiByte()
converts to a quote ("), which causes the command-line splitter to
differ from what Qt is doing.
__argv may not always be populated, if the user requested a wmain()
somehow, because that causes __wargv to be populated. Therefore, we need
to keep the old code.
[ChangeLog][QtGui] Fixed a bug that caused Qt applications to disregard
Unicode command-lines on Windows even when argc and argv were passed un-
modified to QGuiApplication or QApplication. This happened only for
builds with Visual Studio and in the "windows" subsystem (not
"console").
Pick-to: 6.7 6.5
Fixes: QTBUG-125380
Change-Id: If05cb740b64f42eba21efffd17d007799f99d8bf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 993b197d9c944060763fb46514c5c1d31abce205)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The targets are linked from qtnetworkauth documentation.
Task-number: QTBUG-125344
Change-Id: I95cc746a2dac4d8a99278c7d3ac5edf4b201a41b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 9b0f58809be68a956fe3cfabce36d8fbb90208af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These are used from the iOS platform plugin as well, so rename the hooks
to make it clear what's going on.
Change-Id: I701550a189b0047b8c604c9c27986f780aa157d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c3f1533fba88c2e9fc4ce238f68055e37675292c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Makes sense to collect the stuff in a similarly-named header, and it's
not like any of the QTypeTraits stuff was needed for QTypeInfo.
Makes #include <qtypeinfo.h> _much_ lighter again, at the expense of
qminmax.h now getting <variant>, <tuple> and <optional> instead, but
qminmax.h is much easier to avoid in Qt headers (just use the std
versions) than qtypeinfo.h.
[ChangeLog][QtCore][Potentially Source-Incompatible Changes] The
qtypeinfo.h header no longer transitively includes <optional>, <tuple>
and <variant>.
Task-number: QTBUG-97601
Change-Id: Ied96113f38c1232fef3ec79847ee62f06c68f268
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b2eb422699118f4ae8370519b4c7bb3fe121beb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Based on the documentation, the numeric keypad key 5 is commonly mapped
to Qt::Key_Clear, when Num Lock is off. Previously the number 5 was
returned also when the Num Lock is off which caused an ui application
being unable to disable the numpad key number 5 when numlock is off.
Fixes: QTBUG-125958
Pick-to: 6.7 6.5
Change-Id: I62f7521376890a201cd11abf78847bcb0eb1752a
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit cc89c4c76567184b2887952dfe44375ff3ebd28d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some compilers do not respect the
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
...
QT_WARNING_POP
incantation, so rewrite the test to use `template <typename X>` as
an Attribute parameter of the macros.
This allows to get rid of annoying warnings when compiling
tst_qcomparehelpers.
Amends de16185068a08e0cab8bf588c574899a19392410.
Change-Id: I0b3a0f4ad3189d39f5662ce128d5e5f427543393
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c6feed7e1d8b8ed991a81878c78bb361f038eaf6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The last 30 days shows that these configs are stable, so we can
make them significant:
http://testresults.qt.io/grafana/goto/jBYi1JsSR?orgId=1
The tst_qheif::writeImage test has been blacklisted separately.
Change-Id: Ibe7981bce2db1ec90781d3ea33fe7d4541990aea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 70ace7ae78d6637c21a646e726caffb36a1968a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) <year> <owner>. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgement:
This product includes software developed by the organization.
4. Neither the name of the copyright holder nor the names the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a. in the case of International Business Machines Corporation ("IBM"), the Original Program, and
b. in the case of each Contributor,
i. changes to the Program, and
ii. additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which:
(i) are separate modules of software distributed in conjunction with
the Program under their own license agreement, and (ii) are not
derivative works of the Program.
"Contributor" means IBM and any other entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Original Program" means the original version of the software accompanying this Agreement as released by IBM, including source code, object code and documentation, if any.
"Program" means the Original Program and Contributions.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c. Recipient understands that although each Contributor grants the
licenses to its Contributions set forth herein, no assurances are
provided by any Contributor that the Program does not infringe the
patent or other intellectual property rights of any other entity.
Each Contributor disclaims any liability to Recipient for claims
brought by any other entity based on infringement of intellectual
property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes
sole responsibility to secure any other intellectual property rights
needed, if any. For example, if a third party patent license is
required to allow Recipient to distribute the Program, it is
Recipient's responsibility to acquire that license before
distributing the Program.
d. Each Contributor represents that to its knowledge it has
sufficient copyright rights in its Contribution, if any, to grant the
copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a. it complies with the terms and conditions of this Agreement; and
b. its license agreement:
i. effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii. effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii. states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv. states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a. it must be made available under this Agreement; and
b. a copy of this Agreement must be included with each copy of the Program.
Each Contributor must include the following in a conspicuous location in the Program:
Copyright (C) 1996, 1999 International Business Machines Corporation and others. All Rights Reserved.
In addition, each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
IBM may publish new versions (including revisions) of this Agreement from time to time. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. No one other than IBM has the right to modify this Agreement. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors
Cosmin Truta
libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors
Simon-Pierre Cadieux
Eric S. Raymond
Gilles Vollant
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996, 1997 Andreas Digger
Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated.
A "png_get_copyright" function is available, for convenient use in "about" boxes and the like:
printf("%s",png_get_copyright(NULL));
Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative.
NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". Also note that the GPL below is copyrighted by the Free Software Foundation, but the instance of code that it refers to (the Linux kernel) is copyrighted by me and others who actually wrote it.
Also note that the only valid version of the GPL as far as the kernel is concerned is _this_ particular version of the license (ie v2, not v2.2 or v3.x or whatever), unless explicitly otherwise stated.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof and corresponding documentation released with the source code.
1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data.
1.5. "Executable" means Covered Code in any form other than Source Code.
1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or previous Modifications.
1.10. "Original Code"../ means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code"../ means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated documentation, interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control"../ means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1 The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by:
i) the modification of the Original Code or
ii) the combination of the Original Code with other software or devices.
2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and
b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.
(d) notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.
3. Distribution Obligations.
3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
3.4. Intellectual Property Matters.
(a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "../LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
(b) Contributor APIs. If Contributor's Modifications include an application programming interface ("API"../) and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
(c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions. Sun Microsystems, Inc. ("Sun") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Sun. No one other than Sun has the right to modify the terms applicable to Covered Code created under this License.
6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must: (a) rename Your license so that the phrases "Sun," "Sun Public License," or "SPL"../ or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Sun Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
8.2. If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.
8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation,"../ as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as ?Multiple-Licensed?. ?Multiple-Licensed? means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.
Exhibit A -Sun Public License Notice.
The contents of this file are subject to the Sun Public License Version 1.0 (the License); you may not use this file except in compliance with the License. A copy of the License is available at http://www.sun.com/
The Original Code is _________________. The Initial Developer of the Original Code is ___________. Portions created by ______ are Copyright (C)_________. All Rights Reserved.
Alternatively, the contents of this file may be used under the terms of the _____ license (the ?[___] License?), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the SPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the SPL or the [___] License.
[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.]
Copyright (c) 1995, 1996 Xerox Corporation. All Rights Reserved.
Use and copying of this software and preparation of derivative works based upon this software are permitted. Any copy of this software or of any derivative work must include the above copyright notice of Xerox Corporation, this paragraph and the one after it. Any distribution of this software or derivative works must comply with all applicable United States export control laws.
This software is made available AS IS, and XEROX CORPORATION DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND NOTWITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING FROM THE SOFTWARE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.