Commit Graph

65187 Commits (a05abede682db4ab20a7c1d9eb45a487e91d6a78)

Author SHA1 Message Date
Timothée Keller a05abede68 Windeployqt: remove unused library list
When windeployqt had hard coded module information, it had
result.directlyUsedQtLibraries, and result.usedQtLibraries. The latter
was meant to add in the modules that weren't defined. Since we now read
available modules directly, there is no need for result.usedQtLibraries
since it should always be identical to result.directlyUsedQtLibraries.

Pick-to: 6.7
Change-Id: I60e38c176b11626c1ef5a844e80bc701a9eed189
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-01-15 21:32:04 +00:00
Isak Fyksen 8a23e3aa32 Make adding new rows to QTestTable more efficient
Added QDuplicateTracker to keep track of used tags, rather than looping
through QTestTablePrivate::dataList for every added tag.

Removed method `hasRow`, instead calling `QDuplicateTracker::hasSeen`
directly in `newData`.

Pick-to: 6.7
Task-number: QTBUG-118619
Change-Id: Idaab70d8c94227f75620924e0f1ead477f93b27a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-15 20:52:54 +00:00
Ivan Solovev 5e49fa2739 QQuaterion: fix formatting
Fix indentation, split too long lines.

Amends f9f1272e7c

Found in 6.7 API Review

Pick-to: 6.7
Change-Id: I3e9e3647afbe1a49fe78258177aff5cb878ce030
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-15 19:07:08 +01:00
Laszlo Agocs cf6e018a17 rhi: Add an autotest for multiview
Fixes: QTBUG-119742
Change-Id: Id4dba72eadfac74e1dd9ef57d90774c6a8bf8bdd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-01-15 17:48:45 +01:00
Joerg Bornemann 75f5eec2c9 Remove temporary exclusion from unity build
Commit db9fa4a617 excluded
qelapsedtimer_mac.cpp from the unity build. The necessary patches have
been merged, and we can remove this exclusion from 6.6 on.

Pick-to: 6.6 6.7
Change-Id: I85b353b202af1fd8eeea43753e5dc5ce18357d19
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-15 17:10:22 +01:00
Joerg Bornemann 979bcb6d3f Un-blacklist tst_qudpsocket for MinGW+CMake
This test doesn't fail anymore on CI.

Task-number: QTBUG-90545
Change-Id: I3ccf5a4378ba48e0b1e3ce81b0fdd8ab010f75a6
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-15 17:10:22 +01:00
Aurélien Brooke 89d89f99a7 QShader: add move constructor, move-assignment operator and swap
[ChangeLog][QtGui][QShader] Added move constructor, move-assignment
operator and swap member function.

Pick-to: 6.7
Change-Id: I25dbaf4cdd1190204d23121e6ecd8e3947c4b612
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-15 16:10:22 +00:00
Morten Sørvig 3be2c90f4a Fix stub qt_jspi_resume_js() return value
Return bool for the dynamic linking stub, like the
actual function.

Change-Id: I0e0daeac3d647055fecb7930f9ed8e6f9f574bb5
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-01-15 16:19:32 +01:00
Andy Nichols 49bc01b2cb Android: Bail early in showInputPanel() when focusWindow is not native
QAndroidInputContext::showInputPanel() assumes that any window with
focus must be a native window, but sometimes the focus window will be
an offscreen window, like in the case of using OpenXR where there is no
native window to be focused.  In that case the 2D input method overlay
doesn't even make sense, since there is no window space to even map back
to. This patch prevents crashes when trying to focus on text in Android
VR/XR applications.

Change-Id: I16ac1a07f0a86ec9786f09a2f416387c1885bde0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-01-15 16:19:32 +01:00
Timothée Keller 40cff9e93c Windeployqt: add output for determining plugin/module relation
Windeployqt has a pull all in approach to plugins. This can require some
modules to be deployed despite being unrelated to the application's
dependencies. An output is added to provide information to better reflect
what windeployqt is doing in this regard.

Task-number: QTBUG-117910
Pick-to: 6.7 6.6 6.5
Change-Id: Iabf89e0faca862a90c0fcd46e5675dd43655be1d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-01-15 14:32:51 +00:00
Marc Mutz edff6a33a1 QObject: de-pessimize installEventFilter()
Don't loop over the list of event filters twice, do it once with a
combined predicate.

This code is still has a big impedance mismatch: the removeIf() will
always leave empty space at the back while prepend() needs it at the
front. We should fix this by reversing the meaning of the order of
event filters to mean back()-is-applied-first, so new filters can be
append()ed, but that is for another patch.

Done-with: Jarek Kobus <jaroslaw.kobus@qt.io>
Pick-to: 6.7
Change-Id: I08324697229a54c8f66c6c320cf7232d707a08f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 13:28:31 +00:00
Jarek Kobus b909b8dfe8 QObject: Optimize removeEventFilter
We can't have duplicated filters installed,
so break the loop when removing event filter after we
have found the matching one.

Pick-to: 6.7
Change-Id: Idda87f3090954e020b27bf3fab62677128607f03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-15 14:28:31 +01:00
Marc Mutz 620eb390c0 QDebug: add missing #include <optional>
Found in API review.

Amends b7657ddccb.

Pick-to: 6.7
Change-Id: Ibdab7f51be09036659475bd76af28e8692235b9c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-01-15 13:28:31 +00:00
Tor Arne Vestbø 5f15a93f16 macOS: Add helper function for getting AppKit localized strings
If we for some reason can't look up AppKit, or if the table or
string within that table is not found we will end up using the
key as is.

Pick-to: 6.7
Change-Id: I5d574288e421e586458266899ffdff90eeadec8f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-15 13:10:01 +01:00
Alexey Edelev 9ba5c25f12 Add BuildInternals lookup to the settingseditor manual test
Pick-to: 6.7
Change-Id: Iae39efccaac26bcd12b416c05af36a545dca59b6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-01-15 10:56:04 +01:00
Juha Vuolle 89dab8578c Remove HTTP headers equals() / comparison
There's several ways to compare HTTP headers, and arguably
the need for it is not very high. For the time being users can use
different accessors and compare in ways that make sense for
their use cases.

Consequently since HTTP headers are no longer trivially comparable,
it makes also comparing the request factories more 'moot' because
headers are a central piece of request information. So removed
comparison from request factory as well.

These comparisons can be restored later if a clear understanding
on it's need, and on how it should be best done, emerges.

Resulted from API-review

Pick-to: 6.7
Change-Id: Idb5ab3710268b52a8e59656db8cc7de82f0ae511
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-15 10:29:07 +02:00
Juha Vuolle 2d9afc8501 Add autotest support for QRestReply json parsing errors
Pick-to: 6.7
Change-Id: Iffabdcafa49f16e24f182991c527b3d3217ca955
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-15 10:29:07 +02:00
Juha Vuolle 819a8f30f4 Rename QNetworkRequestFactory header functions to commonHeaders
Resulted from API-review

Pick-to: 6.7
Change-Id: Iae712e67839d27064a0155830fd201ab15693091
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-15 09:43:38 +02:00
Thiago Macieira 80df23bc7b tst_QStringView: don't go through the QString constructor
Amends d351a97e85.

Pick-to: 6.2 6.5 6.6 6.7
Change-Id: I5201966b308e48989c06fffd17a9aa4d086e6039
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-01-14 17:49:12 -08:00
Ahmad Samir f44c47a301 QFileSystemEntry: store special index, -2, in a contexpr variable
It is used to indicate resolveFilePaht() should be called, making it a
named variable makes the intention clearer.

Change-Id: Ibf1c88b9dacc59775afdf76bab3a8c86a52d5c72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-14 23:10:27 +02:00
Thiago Macieira 7c4e271fe7 QProcess/Unix: detect ASan and TSan dynamically
Fixes: QTBUG-117533
Fixes: QTBUG-117954
Task-number: QTBUG-104493
Pick-to: 6.7 6.6
Change-Id: I09c3950e719e4b259bc7fffd1793ee472c5d5a9a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-01-14 12:45:15 -08:00
Ahmad Samir 3d3eb7e402 QDirIterator: manage fs/file iterators with unique_ptr
Use std::stack/std::vector, since QList doesn't work with move only
types.

Change-Id: If0009c8127d56f85bb6b4b7bd40251cdc6b7950d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-14 17:30:27 +02:00
Ahmad Samir 1a3753fc78 QDirIteratorPrivate: assign to members directly
Instead of passing default args to the constructor. The alternative is
adding as many constructors as the public class has.

The dirEntry member benefits from copy-elision in the 3 QDirIterator
overloads that construct a QFileSystemEntry.

Change-Id: I7b6bcc54a7e00255be9903d58cc09f4e202a25c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-14 17:30:13 +02:00
Ahmad Samir eb2db79064 QObject: clarify docs wrt. member access following Q_OBJECT and co
The macros expand to declarations that end in a private: section, which
means everything following them is private. As Fabian said in the bug
report, this is obvious when Q_OBJECT/GADGET ...etc are used in a class,
but might be a bit surprising when used in a `struct`.

Fixes: QTBUG-120297
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Iacdfc4eb3bab3554cc1142f682b11b32c3868b8f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-14 12:24:31 +00:00
Christian Ehrlicher 8bfebaa22f SQL examples: code cleanup
Misc code cleanup for the sql examples:
 - don't include global Qt headers but only needed ones
 - use proper tr() where possible
 - pass parameters by const ref
 - style fixes

Change-Id: I4fd4293948918b9d7b373b6d1e8eeecf6f25a622
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-01-14 09:32:04 +01:00
Ahmad Samir 27dd178900 QFileSystem{Model,Watcher}: port to PMF signal/slot syntax
Also remove the `_q_` prefix from private slot names, it was needed to
mark them as being used with Q_PRIVATE_SLOT, which is also gone in this
commit.

Drive-by change: de-duplicate some code.

Change-Id: Ib41d0ac24ae584746751c0c2b5c477f600627db1
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-01-13 17:01:24 +02:00
Giuseppe D'Angelo e366a47d65 QImageIOHandler: doc tidies
Remove a "." after the enumerator names that would end up in the docs.

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

Change-Id: I6db1e83331552a58f77479166a67b88bb25f2d6e
Pick-to: 6.7 6.6 6.5 6.2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-01-13 10:45:33 +01:00
Thiago Macieira 88e41fd034 QUrlQuery/Doc: fix resulting query with ( and ) delimiters
There's no final ) because there's nothing there to be delimited.

Pick-to: 6.5 6.6 6.7
Change-Id: I6e2677aad2ab45759db2fffd17a4ce4aa902e140
Reviewed-by: David Faure <david.faure@kdab.com>
2024-01-12 14:29:30 -08:00
Thiago Macieira 763ab0e623 QSemaphore::release: Revert "Optimize cond var notification"
This reverts commit 60113056bc. Calling
    d->cond.notify_all();
without the mutex means that another thread could acquire the semaphore
(acquire the mutex, subtract from d->avail, return to caller) and
destroy it. That would mean this thread is now effectively dereferencing
a dangling d pointer.

Fixes: QTBUG-120762
Pick-to: 6.5 6.6 6.7
Change-Id: I196523f9addf41c2bf1ffffd17a96317f88b43dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-01-12 20:01:22 +00:00
Kai Köhne 3552afe38a Fix warning on SQL Browser startup
Browser::addConnection is not a slot/invokable, and requires arguments.

What was probably meant to happen is that the connection dialog
opens.

Pick-to: 6.5 6.6 6.7
Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-01-12 19:35:04 +01:00
Christian Ehrlicher 8594fe1b8d Styles/fusion: Adjust QSlider painting with modified paint rect
When the painting rect is adjusted within an overloaded
QSlider::initStyleOption() there are some glitches when using the fusion
style:
 - the tickmarks are not painted inside the specified rect / it is
   ignored
 - the glue groove bar is clipped incorrectly

Pick-to: 6.7 6.6
Fixes: QTBUG-111314
Change-Id: If140c5348031d869b527c6c4850b4a8d34b395c1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-12 14:35:30 +01:00
Ivan Solovev a4518cc706 QCborStreamReader::lastError() - fix REMOVED_SINCE version
The definition in removed_api.cpp is added within the proper #ifdef
block, only the version in the header was wrong.

Amends 8e8815b688

Found in 6.7 API Review

Pick-to: 6.7
Change-Id: I0a94bfaae8b3db700c794aa83d9637ec85edffb1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-12 14:35:27 +01:00
Volker Hilsheimer ab6e3c59a3 QColorDialog: Add trailing comma to new enum value
As commented in header review, this will make future header reviews
less noisy.

Pick-to: 6.7
Change-Id: Ia75e51facec100172de7dbb0854830d9981f0552
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-12 12:59:27 +01:00
Christian Ehrlicher 574692e5ac QFusionStyle: fix painting handle with tickmarks enabled
The handle was drawn outside of the widget's rect when tickmarks were
enabled (TicksAbove/TicksLeft).

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-83604
Change-Id: Iff3a1a330317576a759e3fd6795d0b4849e2044b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-12 11:59:27 +00:00
Christian Ehrlicher 505559c4a8 QPA/Windows: Cleanup QShGetFileInfoThread on shutdown
Properly clean up the QShGetFileInfoThread on shutdown. Also rework the
whole class to make it thread-safe.

Fixes: QTBUG-90876
Change-Id: Iecd501ab95a6464c5f1e61f831b7288eb9578b16
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-01-12 12:59:26 +01:00
Christian Ehrlicher c53b91cc12 QIcon::availableSizes(): don't return duplicates
QIcon::availableSizes() returned duplicate sizes when there are pixmaps
with a different dpi but same size. This is not useful and therefore
filter them out. Also rearrange the conditions a little bit to bail out
on wrong mode/state early.

Pick-to: 6.7
Task-number: QTBUG-119915
Change-Id: I9d18c78fc2a149a3a9eaaed67c6110979029705b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-12 12:59:26 +01:00
Christian Ehrlicher 742be5254c QComboBox: ignore hidden items when calculating popup size
The popup size depends on the max visible items property. But the loop
did not ignore the hidden items which results in fewer items in the
popup than allowed.

Fixes: QTBUG-120574
Pick-to: 6.7 6.6 6.5
Change-Id: Ic3c503a5272d6839aee158740e096405ca8887d6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-12 12:59:26 +01:00
Florian de Gaulejac b4246a5c28 syncqt: always use absolute path in the generated headers
The relative path + source path can be tool long for windows

Fixes: QTBUG-120758
Pick-to: 6.5 6.6 6.7
Change-Id: I42ed4f3bbf39d31bf37a5bc76eb18f473661346b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-12 11:20:04 +00:00
Marc Mutz 6d005b7c57 tst_QCompareHelpers: fix narrowing warning
Warns MingW (or, in general, any GCC 13):

   warning: converting to 'QtPrivate::NativeFloat16Type' {aka '_Float16'} from 'double' with greater conversion rank

See also a61d752951.

Fix by using ints instead.

As a drive-by, make the variable constexpr.

Amends 4b755bc11a.

Pick-to: 6.7
Change-Id: Ie3f3c51aa7e9323c7ba96c810d2e95247d222fd2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-12 09:38:18 +00:00
Juha Vuolle 723ab99b1a Rename the replace() function's value to newValue to reflect its role
Found in API-review

Pick-to: 6.7
Change-Id: Ib047c79d977ad6870c1e426cd1add994a3634df4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-12 10:28:06 +02:00
Juha Vuolle f0db080880 Rename qnetworkrequestfactory's request() to createRequest()
Resulted from API-review

Pick-to: 6.7
Change-Id: I09349dbddbfc191d871563b834396b387c6153c9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-01-12 10:28:06 +02:00
Marc Mutz 3a61de282c QRestReply: optionally return the QJsonParseError from json()
... and remove the debug output of the internal QJsonParseError.

This allows users of the function to get the details in
machine-readable form, and to distinguish between !finished and an
actual Json parsing error.

Found in API-review.

Pick-to: 6.7
Change-Id: Ia237b192a894d692b965f6bedb4c94d3b6537535
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-01-12 06:37:19 +02:00
Marc Mutz fbe29fb368 QRestReply: include / fwd-declare what you need
Don't depend on transitive includes and forward declarations.

Found in API-review.

Pick-to: 6.7
Change-Id: I61b9517453f164391abb9254d92e7ea38051e730
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-01-12 06:37:16 +02:00
Juha Vuolle 1702a37a39 Change QRestReply json return type to QJsonDocument
The json return type and function naming has gone back
and forth. Let's go with QJsonDocument after all, and add new
overloads in future if necessary.

Pick-to: 6.7
Task-number: QTBUG-119002
Change-Id: I3f9de0e6cba7d5c52d016d252d65b81f345af050
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-12 06:37:11 +02:00
Assam Boudjelthia bba26d7220 Android: skip vulkan tests for tst_qrhiwidget
Task-number: QTQAINFRA-5971
Pick-to: 6.7
Change-Id: I61b7e3ef491e4e12c5ee5d95d89a7a510ba328c4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-12 01:18:15 +00:00
Volker Hilsheimer 51a1dfe72d Doc: complete the snippet for a dialog with extension
Add the setting of the layout's size constraint to 'fixed' back to the
snippet, so that the dialog automatically resizes when the extension
gets hidden. The user won't be able to resize the dialog, but allowing
the user to resize the dialog and to show and hide the extension anyway
leads to unpredictable results for the user.

Amends 11da92ba94.

Pick-to: 6.7 6.6
Change-Id: Ie74ca36eaa1a8e9567e0d5826f91f8633e5cbc05
Reviewed-by: David Faure <david.faure@kdab.com>
2024-01-11 23:40:27 +01:00
Alexey Edelev 5f0575256a Use target-specific android-build directory
This fix allows using multiple executable targets in a single
CMakeLists.txt when building for android. Previously artifacts for both
targes were collected in a common android-build directory, that led to
artifacts overlaping and broke the deployment process.

Users need to set the QT_USE_TARGET_ANDROID_BUILD_DIR to TRUE to enable
the new android-build directories naming.

This change need QtC adjustments that will take a new directory naming
into account.

Task-number: QTBUG-117443
Pick-to: 6.5 6.6 6.7
Change-Id: I47568798e2a2e8550ddab1990a33611967183761
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-01-11 22:56:51 +01:00
Alexey Edelev e549fe7516 Add the documentation for QT_USE_TARGET_ANDROID_BUILD_DIR variable
Task-number: QTBUG-117443
Change-Id: I2c7844dec825566899da16298a938728346eadae
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-01-11 22:56:51 +01:00
Jarek Kobus 43de846442 QObject: Make it clear we don't install duplicated event filters
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I3048b50700880dd2445a5a65823fef02b196ce7d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-11 20:39:30 +01:00
Joerg Bornemann f83ec0c76b CMake: Don't claim we have printed the summary on log level < STATUS
If the log level is below status we don't print the configuration
summary, and configure should not claim that.

Check whether the log level is sufficient for printing the summary and
only then state that the summary will be printed.

Change-Id: I0118941dfbc29c8a9909421cec57660f6110df34
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-11 20:39:29 +01:00