Commit Graph

64677 Commits (283cdcd3d5fad368c9df1bcae69cbfbf9ade623f)

Author SHA1 Message Date
Friedemann Kleint 283cdcd3d5 EditableTreeModel: Add a test
Add a test running QAbstractItemModelTester on the model.

Pick-to: 6.6
Change-Id: I40c141c7e754ca05234da611534bd65e456be2fb
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-06 18:22:41 +01:00
Friedemann Kleint d50b56b475 Polish the EditableTreeModel example
- Fix/silence most clang-tidy/compiler warnings
  * unsigned/int comparison
  * Avoid repeating return / default parameter types
  * Use auto * for pointers
  * Streamline code, use ternary operators
  * Move constructor parameters
  * Observe rule of 5 by using Q_DISABLE_COPY_MOVE
- Add some bells && whistles, resize properly, expand all

Change-Id: I1721458ff66dcba123ff3a2cf50e7d15387a4e8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-06 18:22:41 +01:00
Ahmad Samir 5038e1eb65 QFileInfoGatherer: port away from QPair
Task-number: QTBUG-115841
Change-Id: I06c39140fb9afbbe6352af1025387d1890ca2730
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-06 18:55:08 +03:00
Ahmad Samir 3cd69050ff QFileInfoGatherer: fix narrowing conversion warnings
Found by using -Wshorten-64-to-32 clang compiler flag, or adding that
flag to the flags clangd uses.

Drive-by changes:
- Refactor a small while loop
- Use reverse iterators
- Move instead of copy while constructing a QList
- Replace QPair by std::pair (see QTBUG-115841), and also for its CTAD,
  otherwise I'd have to spill the types out:
  updatedFiles.emplace_back(QPair<QString,QFileInfo>{translateDriveName(driveInfo),
                            std::move(driveInfo)});
  otherwise the clangd complains:
  Alias template 'QPair' requires template arguments; argument deduction
  only allowed for class templates

Task-number: QTBUG-115841
Pick-to: 6.6 6.5
Change-Id: I942459f039f6db23f7c1928fe758c6dbf339cd2b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-06 18:55:07 +03:00
Axel Spoerl 2f6fe3a268 QXcbWindow: protect access to m_mapped with a QMutex
QXcbWindow::requestActivateWindow() is called from the main thread,
while handleMapNotifyEvent() is called from the XCB event thread.
In a data race, handleMapNotifyEvent sets m_mapped to true, before
requestActivateWindow() checks if it is false and sets
m_deferredActivation to true.

If that happens, a window activation is skipped until the next window
systems event is processed.

This is harmless in a normal application environment, where each mouse
move causes window systems events to be processed. In an autotest
environment, it causes flakiness, because an expected window activation
may or may not happen.

As a workaround, QApplicationPrivate::setActiveWindow() is frequently
called after QWidget::activateWindow() or QWindow::requestActivate(),
to set the active window on application level. In essence, this is
setting expected outcome of a skipped deferred activation by force.

This patch protects access to m_mapped and m_deferredActivation with a
QMutex in both methods. That prevents the data race and ensures all
deferred activations processed.

Calling QApplicationPrivate::setActiveWindow() after activation on
window/widget level becomes redundant.

Task-number: QTBUG-119287
Pick-to: 6.6 6.5
Change-Id: I2eee69292afe0ef6381880a10d4e8483c2c7cbfa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-12-06 11:58:17 +01:00
Marc Mutz 3a57885c37 tst_tostring: support computed expected values
We need an owning container to keep the data alive when the _data
function computes the expected value instead of passing it as a
literal string, so replace the QByteArrayView we used so far with a
const QByteArray.

If a test failed, print the tail ends of the failing strings. This
is useful when toString() implementations printing the operands of
the failed toString()-under-test result comparison decide to
truncate the output. It works around the fact that we both test
toString() and use toString() to report any failure.

As a drive-by, add a missing blank line between function definitions.

Amends a2551c45d4.

Pick-to: 6.6
Change-Id: I0b217aeb1a6d475df8e8b9fb821046f1cceb1a3e
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-12-06 09:46:55 +00:00
Marc Mutz a14d3a49f0 QTest::toPrettyUnicode: remove magic numbers
Derive them from the chosen output buffer size instead, itself a
symbolic constant.

Pick-to: 6.6 6.5
Change-Id: I33aa351ba358b106b448f886b92e952e53bc75f9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-12-06 10:46:54 +01:00
Marc Mutz ba44a71406 QTest: simplify toString(tuple)
Use C++14's std::index_sequence instead of our home-brewed
QtPrivate::IndexList. I used make_index_sequence<sizeof...(Types)>
instead of index_sequence_for<Types...> to avoid having to resolve
another type-dependent template alias.

Remove the helper's vacuous \internal qdoc block.

As a drive-by, rename the helper function to prevent it from
participating in QTest::toString() overload resolution, and
fix spaces around &.

Pick-to: 6.6 6.5
Change-Id: I5981a9b1a99fbe741e75820a6954d066ced9573d
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-12-06 10:46:54 +01:00
Fabian Kosmale d42b901ae4 QSharedPointer: Remove support code for tracking weak-pointer
In Qt 6, it is no longer possible to create a weak pointer from a plain
QObject pointer.
Consequently, we don't need the work-aronuds introduced for QTBUG-22622.
Except that we still need to keep the functions as they are exported.
Mark them as QT6_ONLY, so that they'll be gone automatically come Qt 6.

Amends e40320c552.

Change-Id: I568da04008374c891a111eee49f6679dabdfdee4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-12-06 08:24:44 +02:00
Marc Mutz 25d1db424e QUtf8StringView: make data() constexpr
The cast that prevented it was a remnant of QStringView (which, like
QString itself, stores char16_t, but interfaces in QChar).

Remove the cast, add the constexpr.

[ChangeLog][QtCore][QUtf8StringView] data() is now constexpr, too.

Change-Id: I7891b89bf26176484411b4388ded04e56651b607
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-12-06 00:22:45 +01:00
Marc Mutz fe98cf4135 QLatin1StringView: add missing (const_)pointer nested typedef
It's required for C++ containers.

Change-Id: Id5b51e1af22ac6e452019e976f50c727bbba6948
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-12-06 00:22:45 +01:00
Marc Mutz 6e41101217 tst_QCompare: restore some test coverage to QPartialOrdering
When I split Qt::partial_ordering off of QPartialOrdering, O
duplicated the partialOrdering() test, but lost the conversion() part
of the tests.

This patch brings them back.

Because we maintained the test coverage for Qt::partial_ordering, it
suffices to check that QPartialOrdering::X correctly maps to
std::partial_ordering::x. The rest follows from transtivity of
equality.

We're still lacking conversions of QPartialOrdering to Qt::_ordering
types. That will be the subject of a follow-up patch.

Amends 4b6f757020.

Change-Id: I1938d09f696ed8d58143dbacccb72cfd54ca12dd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-12-05 23:04:30 +01:00
Marc Mutz ddb646d17b QPartialOrdering: add missing \since to is_eq etc
Change-Id: I8d04e75805ed503f432b5ea117bd2b885cb57e38
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-12-05 22:56:45 +01:00
Marc Mutz ee623402df tst_QCompareHelpers: extract Qt/std-mapping into public header
We'll need this elsehere, too.

Change-Id: I91a35a23dd201f7867898cee5b4d6743883f71fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-12-05 22:56:45 +01:00
Assam Boudjelthia 82a40f084b AndroidTestRunner: fix args with quotes and spaces
First, replace double quote characters with 3 escaped double quotes
to allow QProcess::splitCommand() to treat it as an actual quote
character that's part of the tag.

Then, escape single quote characters so they don't interfere with
the shell command and also to be treated as part of the argument.

Lastly, surround the args with escaped double quote so that args
with spaces are also treated as one.

Amends b044323c16.

Example of this:
 tst_qkeyevent::modifiers("M","e","t","a") for double quotes
 tst_qunicodetools::wordBreakClass(two words) for spaces
 tst_QSpinBox::stepSelectAll("don't select all") for single quotes

Task-number: QTQAINFRA-5703
Change-Id: Ie4317e4350bbac619bac41e41f42613f50cf1ad4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-05 22:03:55 +02:00
Timur Pocheptsov 66a5f9fdd4 QSslConfiguration: remove example
It uses the ciphersuite name which smart tools one day will mark as
weak (i.e. https://ciphersuite.info/cs/TLS_DHE_DSS_WITH_AES_256_CBC_SHA/
in our example), names in the example are not in the standard notation,
+ it is and always was OpenSSL-specific example.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-119464
Change-Id: Ic6f095ff2c861582de756bf220e2e74106b88e83
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-05 18:43:58 +01:00
Marcin Zdunek f6831d08c4 Skip test cases that resizes window on eglfs_viv on VxWorks
This change is required when running in real hw with eglfs backend. It passed on CI because CI used "offscreen" backend and eglfs is not tested on CI at the moment.

Task-number: QTBUG-115777
Change-Id: I4bbfbedcbe21c5c2041be9bdb8ae370156bb6200
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-12-05 16:46:45 +00:00
Kai Köhne 16546515f3 headersclean: Remove unneeded exceptions
Change-Id: I431d530aa4d588aad841b80b13d5e0caa4c8b445
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-12-05 17:28:12 +01:00
Kai Köhne b831693365 Doc: Settle on 'function' instead of 'method' in QMAC documentation
Function is the more popular term in the documentation. Method is
also a tad confusing, because QCryptographicHash calls the algorithm
'method'.

Pick-to: 6.6
Change-Id: I9922f837b04311a4ef45e1c6de6b8e12a32e4f1e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-12-05 17:28:12 +01:00
Assam Boudjelthia 7a9bc220c7 Android: fix and simplify the orientation change logic
Move the orientation change handling to the display manager
and call it from the relevant places to repeated and scattered
code for the same functionality.

Bring back part of 072387edec
which checks discard a resize event that's not valid that
reports not up to date layout size.

If DisplayManager.DisplayListener.onDisplay() initiates the
orientation change, handle it immediately if we don't expect
the size to change, i.e. if the orientation is changing from
portrait to inverted portrait and vise versa for landscape.
Otherwise, expect the change to be initiated again shortly
after from QtLayout.onSizeChanged().

Also, add improve the unit test of the orientation change,
and test for the widget size after such changes to make
sure QTBUG-94459 is not reached again.

Fixes: QTBUG-119430
Task-number: QTBUG-115019
Task-number: QTBUG-94459
Change-Id: I5f060d91531af677ddf891f2af360d5f399e26e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-12-05 16:28:12 +00:00
Alexandru Croitor a0bdd2195f CMake: Fix Apple max sdk version check
We need to warn only when using a major version that is the next one
after the 'max supported version'.

Add an assertion that the max sdk version specified in .cmake.conf
needs to be just the major sdk version, without a minor or patch
version component, otherwise the '+1' math expression will fail.

Pick-to: 6.6
Task-number: QTBUG-119490
Change-Id: Ib30abe7157c2ccbe0ad7a98e81fc241685a141a8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-12-05 17:28:12 +01:00
Alexandru Croitor 248f8bff16 CMake: Refactor sdk / xcode check to support both warnings and errors
The minimum sdk / xcode version is a requirement, so if the minimum is
not met, we should generally error out.
Changing the behavior in the already released 6.6.x series is not nice
though.

Refactor the code to support both a warning-first and error-first
approach. Keep the warning-first behavior as-is in this change and pick
it to all relevant branches.
A follow up change will switch the default to the error-first approach
for as-of-yet unreleased Qt branches.

To support both approaches, there are now two variables to flip the
warnings into errors and vice-versa depending on which is the default
for a particular branch:
- QT_FORCE_FATAL_APPLE_SDK_AND_XCODE_CHECK
- QT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK

The maximum SDK version check remains a warning, because building
against the newer SDK might still work, even if it isn't yet marked as
supported.

Amends a29bff3d80

Pick-to: 6.6
Task-number: QTBUG-119490
Change-Id: I92dedd69efc266dfc1c8cf15c93887be74fc99d8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-12-05 17:28:12 +01:00
Safiyyah Moosa 11c522495d Docs: Add stereoscopic example to OpenGL examples
This fix uses the \ingroup command to add the stereoscopic example to the
examples-widgets-opengl group.

I also elaborated on the hardware requirements.

Fixes: QTBUG-119280
Pick-to: 6.5 6.6
Change-Id: I6d5b992e533b897d84100f0f897aae97ef89290f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-12-05 12:37:30 +01:00
Axel Spoerl 1914f62c31 QMainWindowPrivate::layout - use QPointer instead of bare pointer
qt_mainwindow_layout(mainWindow) returns the pointer to a stale object,
if the layout has already been deleted.

Most users of qt_mainwindow_layout() assert the returned pointer, or
handle nullptr explicitly. If the mainwindow layout has already been
deleted, they will still access it. While this has not lead to (known)
issues yet, a UAF exception is thrown in an ASAN build.

=> Use a QPointer instead of a bare pointer.
=> Add missing nullptr check in QDockWidgetPrivate::endDrag()

Pick-to: 6.6 6.5
Change-Id: I3484b53e0e2213b82085ceed3ffa66913947189f
Reviewed-by: David Faure <david.faure@kdab.com>
2023-12-05 12:37:27 +01:00
Tor Arne Vestbø a42e907b69 macOS: Deliver touch events synchronously
As a step towards a more synchronous event delivery on macOS,
we enable synchronous delivery of touch events.

Change-Id: I2ceda2684a973ed2a83beec624b2bab8dd073dda
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-05 09:20:43 +01:00
Jacek Poplawski 220afb358f Always destroy OpenGL context when the window is destroyed
The OpenGL context was only destroyed when the HasNativeWindow flag was set,
as a consequence there was a context leak.
Remove this condition and always destroy the context.

Change-Id: I3e3424e9d6f179171872fdef5c929a5718af0ed5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-12-04 22:35:45 +01:00
Samuel Gaist fd1405e61b examples: update local fortune example to use transaction
The local version of the fortune server and clients were not using the
transaction paradigm yet. This patches fixes it and makes the example in
line with the network version.

Pick-to: 6.6 6.5
Change-Id: Ieb68f67e2921f46acd682f81dfa5dc5b040c88f5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2023-12-04 22:13:26 +01:00
Christian Ehrlicher 8220173b02 SQLite: Update SQLite to v3.44.2
[ChangeLog][Third-Party Code] Updated SQLite to v3.44.2

Pick-to: 5.15 6.2 6.5 6.6
Change-Id: I4da6370cf1e320813b9ba807101ce188d3a09fa0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-04 22:13:26 +01:00
Joerg Bornemann d08fa86e63 CMake: Generate deployment information for each deployable target
When using CMake 3.19 or newer, we generate a .qt/QtDeployTargets.cmake
file per project. This contains the following information for each
deployable target:

1. The full path to the produced artifact. This will allow us to avoid
the file name heuristics when deploying QML plugins.

2. The DLLs that are needed at runtime, when using CMake 3.21 or newer
on Windows. This will allow us to deploy QML module backing libraries
and runtime DLLs of to-be-deployed targets.

Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: I8a670e44f62a872f1a21174e947d87ccb8191073
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-12-04 21:18:25 +01:00
Ievgenii Meshcheriakov 2c3116b8d2 tst_qdbusabstractadapter: Don't skip tests
The tests were skipped since 2018 due to QTBUG-66223.
The tests were never re-enabled even though the issue log indicates
that failure were not reproducible anymore.

Task-number: QTBUG-66223
Task-number: QTBUG-59336
Change-Id: I96ddfb2cd4ddbcac82feddcd15279e218104a9b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-04 20:44:36 +01:00
David Faure ebed890b51 QCommonStyle: fix focus rect drawing, don't fill the background
Regression in the previous commit, 5ef5f2f1b9

Pick-to: 6.6
Change-Id: I03786264d064b7d0cf2b88a5d06aa63ffb19ae8b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2023-12-04 19:12:52 +01:00
Tor Arne Vestbø bc6c44d004 Unskip tst_QApplication::testDeleteLater() on macOS
It passes locally, let's give it a shot in the CI.

Fixes: QTBUG-24318
Change-Id: I7df735bdc7963c9c1a8ad8befdc0642f796c32a1
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-12-04 19:12:52 +01:00
Volker Hilsheimer 3156d7b778 Blacklist tst_Http2::duplicateRequestsWithAborts on QNX
It fails frequently. Might have to blacklist the entire test case, or
even skip when running on qemu, if this doesn't help.

Task-number: QTBUG-119616
Pick-to: 6.6
Change-Id: I446612c0fb5b2afc021aeb2fab9be010ac071acd
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2023-12-04 16:04:18 +01:00
Axel Spoerl 3591ea900b Harden internal documentation of QDockWidgetGroupWindow
QDockWidgetGroupWindow was documented by a few lines of code comments,
omitting the most critical part of its design: It must not become able
to acquire focus (i.e. be dragged or dropped) while having only one
QDockWidget child.

=> replace legacy code comments by structured internal documentation.

Pick-to: 6.6 6.5
Change-Id: I410ebf2e4c20c7479038417a4d8448dce8ab995f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-04 16:04:18 +01:00
Alexey Edelev 81b15adba2 Add the 'IWYU pragma: export' record to all CaMeL-case header aliases
Task-number: QTBUG-119505
Change-Id: I3831990636d2ababdbbc9ed51c3331f0e57679f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-12-04 16:04:18 +01:00
Laszlo Agocs 149f178d3f QVulkanWindow: sync surface size logic with QRhi
The legacy QWindow convenience subclass does not have the
robust logic that was later implemented for the Vulkan backend of
QRhi. (i.e., never trust the QWindow; problem with QVulkanWindow
is that it half-trusts those values still, which leads to the
classic pixel-size-differs-by-one problem)

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-118568
Change-Id: I5f83999e86a9907efe08b38ca069bae20152a4e0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-12-04 16:04:18 +01:00
Kai Köhne 21eeef83f6 Doc: Improve documentation for QMessageAuthenticationCode
* Mention 'HMAC' as something people will search for
* Change description to actually reflect code snippet
  (where the key is passed to the constructor)
* At least mention that the security of the HMAC depends
  also on the length of the key, as the code snippet
  uses an artificial/short key. Not sure whether we
  should further expand on this, or link to some other source?

Pick-to: 6.5 6.6
Fixes: QTBUG-119499
Change-Id: I2768d9a9d553957e1a778c798d82a73468bee16f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-04 15:19:38 +01:00
Kai Köhne 0f985e16ba headersclean: Simplify logic for gcc only options
Oldest GCC version we nowadays support is GCC 9.

Change-Id: If35ef1aa7bf63da55404832107226e1fa139723e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-04 14:44:02 +01:00
Kai Köhne 19b69494f0 headersclean: Refactor order of compiler arguments
Merge different lists, and make order of compiler options more consistent.

Change-Id: I3a760d581cc2062f97d519c7316b77cbc9992203
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-12-04 14:44:02 +01:00
Kai Köhne e11cbf206f Doc: Change deprecation of QFuture::makeReadyFuture to 6.6
The compilers will only warn about using makeValueFuture from
Qt 6.10 onwards. Anyhow, for the documentation, it makes more
sense to deprecate it right now, as an alternative API is
available. So deprecate in documentation for Qt 6.6, but
mention that the compiler warning will only be shown in Qt
6.10.

While at it, also make sure the deprecation messages are
proper sentences (end with a dot).

Pick-to: 6.6
Fixes: QTBUG-116898
Change-Id: Iff90441372b788f9ea42634866d97068275bf0ca
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-04 15:04:04 +02:00
Alexandru Croitor ffa79f5e0c CMake: Don't run sdk / xcode version checks on non-Apple platforms
It was an oversight.

Amends a29bff3d80

Pick-to: 6.6
Change-Id: I696d7a2650c336dc93df01245065bcbb61ca1d6b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-12-04 13:11:49 +01:00
Eskil Abrahamsen Blomfeldt 7bc6f4ae8e Support arbitrary variable axis values
This adds API to set arbitrary values for axes in variable
fonts to QFont.

It also implements support for the API in CoreText, FreeType
(on all platforms) and DirectWrite.

Note that in order for the mechanism to work with
application fonts on DirectWrite, we need to keep the loader
for the fonts around for the life time of the font (otherwise
they cannot be reloaded with different parameters). The way
this was handled before (just re-creating and throwing away
the loader every time) was not ideal anyway, and this finally
gives us a good reason to fix it.

Fixes: QTBUG-119421
Fixes: QTBUG-117835
Fixes: QTBUG-117838
Fixes: QTBUG-117839
Change-Id: I3d1fe95fba1f9df52f34aa42e1ac5fa47dbe6d1a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-04 11:17:36 +01:00
Friedemann Kleint 5134b3ad54 EditableTreeModel: Polish TreeModel::setupModelData()
- Use QStringView.
- Use a list of a pair-like struct to represent the state instead of
  2 lists.
- Use qsizetype.
- Use constLast() to avoid detaching.

Pick-to: 6.6
Change-Id: I5ff8a17a4d583a7d2a0a11a52c29b9117280382c
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-04 10:55:01 +01:00
Friedemann Kleint d9c71b834c SimpleTreeModel: Add a test
Add a test running QAbstractItemModelTester on the model.

Pick-to: 6.6
Change-Id: I6ea5d34308357409b9a13eb0271392c8d171addd
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-04 07:38:56 +01:00
Tor Arne Vestbø 9590ed6ba6 macOS: Implement QPlatformServiceColorPicker via NSColorSampler
The default behavior for QColorDialog is to use the native dialog,
but for clients that implement their own color dialog we should
provide the plumbing to do the actual color picking. The fallback
path for this on macOS involves grabbing the screen, which brings
up the permission dialog. The NSColorSampler API does not have this
issue.

[ChangeLog][macOS] Non native color dialogs now use native color
picking when picking colors from the screen.

Pick-to: 6.6
Change-Id: Idd08a90a3747546fd9825431ab7a4f5b5fa40784
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-12-02 11:21:59 +01:00
Jaishree Vyas 1202594db6 Doc: PainterPaths-Graphic&Multimedia-Example typo in the documentation
Changed the brief and some grammatical errors.

Fixes: QTBUG-119602
Pick-to: 6.6
Change-Id: Ib64abeb735899b0ae1cee64709ad3d7f8f440d9e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-12-01 20:56:10 +01:00
Wladimir Leuschner 3e50387f82 Fix documentation for qDrawPlainRoundedRect
Change-Id: Ifc7b8fe1d7dda10d29b5c50ebd7bc5c352c9c0c2
Reviewed-by: David Faure <david.faure@kdab.com>
2023-12-01 16:02:53 +01:00
Thiago Macieira 7bf1989e62 Remove the DBusMessage* members from QDBusMessagePrivate
We don't need to keep the entire original message in QDBusMessagePrivate
after we've demarshalled it, nor do we need to keep a link to the
message we're replying to. In order to reply properly to a message, we
only need two pieces of information: the serial of the method call being
replied to and the service that originated the call.

Fixes: QTBUG-69919
Change-Id: Ic5d393bfd36e48a193fcffff13b7375db459e619
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-12-01 14:06:03 +01:00
Topi Reinio 24627d9bce Doc: Add convenience macros for specifying C++ type ordering information
QDoc in Qt 6.7 introduced new commands for C++ type ordering, \compares
and \compareswith .. \endcompareswith. The latter is a block command
that allows defining a comparison category, a list of types the
category applies to, and optional further information inside the
command block.

Introduce convenience macros that allow a single-word/single-line
command to provide the category/types in cases where further information
can be omitted.

Task-number: QTBUG-104110
Change-Id: I850498c79bd6885906fbc58d0517d33f5a13cf4b
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-12-01 11:58:36 +00:00
Joni Poikelin 402a17cfc8 Silence a warning in release build
Pick-to: 6.6 6.5
Change-Id: I6059b560872ebd97874c2dc80e3ad17cf887d8dc
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-12-01 13:22:00 +02:00