2166 Commits

Author SHA1 Message Date
Axel Spoerl
913bd8d19b Android notification example: Correct connect statements
The example breaks building 6.7 with examples on Android, due to
QObject::connect() to a lambda without context object.

Add context object.

Fixes: QTBUG-123989
Pick-to: 6.6 6.5 6.2
Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f54953a0abfe7db796a294c9239b943ebec91a2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-04 17:29:34 +00:00
Alexandru Croitor
d899a9abd5 CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

A couple of examples had to be adapted manually, due to them including
more than one app per example subdirectory.

The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed.

The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_app_script.

A qt_generate_deploy_app_script call was added for each executable
target.

Note that the deployment step will be skipped in the CI for now,
because we enable QT_DEPLOY_MINIMAL_EXAMPLES and thus
QT_INTERNAL_SKIP_DEPLOYMENT, and also because standalone examples
are not enabled yet, and deployment is disabled for in-tree (so
no-standalone-example) prefix builds.

The install(TARGETS) calls for each example will still run,
installing the examples into an installed_examples directory, that
will not be archived by the CI.

Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: Ida389bbad41710b2ae5da4d95e2d85be9e0cd9ce
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3b30b0fc2e1cda30b83bd2de1f70b3ee0c83ba46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-25 15:49:46 +00:00
Assam Boudjelthia
655600c35e Android: add core-private to use private permissions API
Amends 7fa6d09ca20b27b8350e6e26040372ba70e6244d.

Pick-to: 6.7.0 6.6 6.5
Fixes: QTBUG-123353
Change-Id: If79498d28b890772f23963621e6e7bd263a56aca
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 990746096e21955fbb2b06e2848b3795eab6b328)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-25 15:16:57 +00:00
Alexandru Croitor
4b63662c45 CMake: Allow building all examples as standalone just like tests
Introduce a new libexec/qt-internal-configure-examples script that
allows to configure and build "standalone examples" just like
"standalone tests".

This is a prerequisite for using deployment api in examples for prefix
builds, otherwise deployment api gets confused not finding various
information that it expects from an installed qt.

Because the various conditions in the build system for standalone
examples are similar to standalone tests, introduce a new
QT_BUILD_STANDALONE_PARTS variable and use that in the conditions.
The variable should not be set by the user, and is instead set by the
build system whenever QT_BUILD_STANDALONE_TESTS/EXAMPLES is set.

Unfortunately due to no common file being available before the first
project() call, in qtbase builds, per-repo builds and top-level builds,
we need to duplicate the code for setting QT_BUILD_STANDALONE_PARTS for
all three cases.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ia40d03a0e8f5142abe5c7cd4ff3000df4a5f7a8a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 62905163bf887c2c2c9ba7edcd64c96d237a6e95)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:11 +01:00
Chris Lerner
ed8b651143 Correct a typo in the reference documentation of D-Bus Chat example
In the sentence "Users connect and send message to each other",
change "message" to "messages".

Pick-to: 6.6 6.5 6.2
Change-Id: Ib4d0991d314cd300a56def8797cac604fa88ea35
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 379f23cfdc5f28557de516d837895b27364354df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 13:28:01 +00:00
Alexandru Croitor
651c0fd223 CMake: Use qt_internal_add_example for bindableproperties
bindableproperties is the actual project, not a subdirectory with
separate examples. It should use qt_internal_add_example.

Pick-to: 6.6
Task-number: QTBUG-90820
Task-number: QTBUG-123096
Change-Id: I409d20e035956e6c236f84721b3c6882893cd547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit a2e0f3dfbd9f54e20221dbc04360f838b5fa5343)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-13 09:42:40 +00:00
Lucie Gérard
ff18cb7481 Correct license for examples files
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: Id348a89884bb309b96abb31077f14a51086b5d0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit c2333f312ff05d592e44e8b10591e3568b8d9a26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-08 18:38:46 +00:00
Topi Reinio
d8e3105737 Doc: Move OpenGL examples to '3D' category
Task-number: QTBUG-122377
Change-Id: Id4c765c128ad2e90cacfffaa3f798bad349e71e8
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit e858e86c9fb5f74f0c47d93cf46b98ec0081db96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-21 17:09:37 +00:00
Kai Köhne
59ce981061 Assign a category to Contiguous Cache Example
Pick-to: 6.6
Change-Id: I98e62adce63df7e940d96cd50dcb243366dca216
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit f54d222d223262b07580a082f95a9f9935d5743f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-19 12:20:22 +00:00
Paul Wicking
ea0814fb7f Doc: Resolve qdoc link warnings
- Drop link to non-existing documentation.
- Reorder links such that the target becomes the text and vice versa.
- Use correct link target names.
- Add missing qttestlib doc project dependency to qtwidgets.

Change-Id: Iaa0ea7b22326c82271b14b17c4b78c3a25a834f1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit f157422c58475b3b818b0dddc31289e7105967c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-15 07:15:20 +00:00
Alexey Edelev
36086ba3ca Use the unique resource identifier in editabletreemodel example
Fixes: QTBUG-122210
Pick-to: 6.6
Change-Id: I86200961384de6fd57f5c140120461faada4fb4d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3f312908804ff8871d60b9227e057362d02b34ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-14 07:43:00 +00:00
Assam Boudjelthia
6ca01cd2d2 Android: request POST_NOTIFICATIONS permission for Android Notifier
Android 13 and above requires the notification permission
"android.permission.POST_NOTIFICATIONS" to be requested at runtime.

Pick-to: 6.6 6.5
Fixes: QTBUG-121668
Change-Id: I38512ffc07c1a3ffe7cddffa937b98332f172d15
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 7fa6d09ca20b27b8350e6e26040372ba70e6244d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-07 10:10:08 +00:00
Assam Boudjelthia
8c5ea5b368 Android: fix style extraction when set to none
If extract_android_style meta data is set to none currently the app
still tries to extract full stlye and crashes. If this option is set
no style data should be extracted after this patch.

Fixes: QTBUG-121667
Change-Id: I764e1eb6a582073196f991ca930d245d17a1f7e5
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit ff6a6d3285c48d5e54bf03361115116f58461e33)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-07 10:10:08 +00:00
Ed Cooke
277aa8e61b Update the icons in the system tray example
Update the icons for bad, heart and trash in the system tray example.

Fixes: QTBUG-119127
Change-Id: I0b6d4600397a0cb2a5474da04297ab92689358cd
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 1878556f25cb86ecefc986a92801c3cbe421ca8b)
2024-02-07 10:10:07 +00:00
Matthias Rauter
bf8edf8036 Update visuals of remote controlled car example
* Added icons to the controller.
* Keep the car within the scene.
* Removed the ui file because 4 buttons can be maintained in code easier.

Change-Id: I10af821beb442939e1e7fbdd3ffbde67a272bb2f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 29a4323974a1877faf389637be40688e3bc1790d)
2024-02-06 21:24:14 +00:00
Matthias Rauter
13c57d394b Update icons in the torrent example
Fixes: QTBUG-118876
Change-Id: I7b3c24db220a0501bc2b99341589211bdf217c05
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0da459ec5bc5c92aed5de0e819778b6dd891ceef)
2024-02-06 12:18:40 +00:00
Friedemann Kleint
8a762c8857 Menu example: Use theme icons
Change-Id: I7f77457b439919e7a7882f23e21e648d8965859a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4aa2e594ff055e46c56734a2c0838c214c6bce88)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-02 08:48:31 +00:00
Christian Ehrlicher
fb453fe28c Examples/sqlbrowser: improve coding style
Fix the coding style to match the current Qt style.

Fixes: QTBUG-68661
Fixes: QTBUG-120909
Change-Id: I314ca9da8a03727e3e0336a23fce1ce9d065d3a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2690822428deec4f0c08f4d118d69a7c6036369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-19 20:14:10 +00:00
Laszlo Agocs
273c96a941 Update QRhiWidget API based on review comments
Spell out some API names in enum.

Some functions are now protected.

Remove property for autoRenderTarget.

textureFormat -> colorBufferFormat.

Used "fixed" instead of "explicit" and follow
the above naming, so that explicitSize becomes
fixedColorBufferSize.

Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit acebb97b58807d1d5910c79209664b21e741a9c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:58 +00:00
Lorn Potter
c413bd9366 wasm: fix drag examples for webassembly
Change-Id: I47903743685fadfe33820e7785b72d62109e77d0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 39f81d14c1c0a09ff5165fa11b8369f8ae010ef4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 22:02:03 +00:00
Jaishree Vyas
e2ad97eef9 Doc: Create separate Graphics and Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6
Change-Id: I33c7b1cbfaeae866dffb0e89a5d09d775736d886
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 98ee4d9e37a1038d46f0c0494332c0ed46dbb323)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:59 +00:00
Kai Köhne
bfc841f149 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.6 6.5
Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:51 +00:00
Assam Boudjelthia
251267d439 Android: remove redundant comments from notifier example manifest
Task-number: QTBUG-115020
Change-Id: I29cd7a45f85bc85f6f12b135287b9eb868a7bc44
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 8cc84a1386b77701ebc9c9d4efbc1b033d0e326b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 22:06:20 +00:00
Volker Hilsheimer
eb9252526e Remove the style plugin example
The snippets in the QStylePlugin class documentation show the
relevant bits well enough.

Pick-to: 6.6
Fixes: QTBUG-119974
Change-Id: Iba4a37664d64d86a2946f41d131a201ccdcd723b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a0135fafb16203a812163f7ed55c1b981477cb5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:40 +00:00
Doris Verria
e4c533c336 Update ImageGestures example
- Update screenshot
- Provide some information text on the screen when no images are found
- Add all supported image formats to the file filters
- Minor fixes according to our coding conventions: eg. don't shadow
  variables

Fixes: QTBUG-119979
Change-Id: If41adf34f38bfa101f2c5433082828c1a10668b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 30e6d822327d8105d209af10d077512f21ecc12c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:58 +00:00
Axel Spoerl
83df3a8138 Remove echo plugin
Remove echo plugin code and documentation.

Fixes: QTBUG-119981
Change-Id: I4083ac6cdb768facaed041241af2c5ee6e28df50
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 01bf423d67d5e6f8de5ec51a6b85178492681ca9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 05:35:19 +00:00
Volker Hilsheimer
d8b113f46f Minor updates to the "Touch Knobs" example
Turn on anti-aliasing, and update screenshot.

The example is still not great and under-documented, but at least it
doesn't look horrible anymore.

Pick-to: 6.6
Task-number: QTBUG-120291
Change-Id: Ie709cb51d64c535d7cd0aa1451b3c5bb901324cb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2b9d021ba5487f7f5f67b958a17160c4cf468561)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 01:52:22 +00:00
Volker Hilsheimer
ba583b5e31 Turn SpinBox Delegate example into snippets
The essence of the example was already fully quoted in the
model/view documentation. Move the code into a snippet
source, and update the screenshot.

Fixes: QTBUG-119976
Pick-to: 6.6
Change-Id: Id2f10bb26a650419969bbfa9b76cb74babd3319e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 99eaae4323ff1fda2d8cc0184d824b6d9c3f23ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 01:52:11 +00:00
Assam Boudjelthia
c27163cd7d Examples: Add Qt6::Gui editabletreemodel and simpletreemodel tests
Android needs the Gui dependency.
Amends 283cdcd3d5fad368c9df1bcae69cbfbf9ade623f.

Pick-to: 6.6
Fixes: QTBUG-120257
Change-Id: Id02b03b9fa08546bc5a126b3e71e67bdd65f8b66
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 4d7ac732557f397cc24c47bc5469db60a0c2a2cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:09 +00:00
Topi Reinio
26c10a8863 Doc: Fix documentation issues for Qt Core
* Fix template arguments in \fn signatures for Qt::compareThreeWay()
  functions.

* Fix template arguments in \fn signatures for QDebug::operator<<()
  functions.

* Fix \sa links to specific overloads of QSpan functions.

* Fix \sa links to specific overloads of QFileInfo::fileTime().

* Remove references to 'Custom Type Example' (example has been removed).

* Fix linking to 'JSON Save Game' example.

* Fix references to 'Queued Custom Type' example.

* Fix linking to QCryptographicHash::Algorithm.

* Fix linking to Qt Qml module.

* Fix undocumented parameters in qHypot().

Change-Id: If9eb9978a14e147f003672a682972b319454c311
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 96740ea3fed8a7837dc282135661723858fff198)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 22:49:49 +00:00
Volker Hilsheimer
2d3ee8ac34 Update Sliders example
Simplify the "responsive layout" implementation. Just use a QBoxLayout
with changing direction instead of repopulating a QGridLayout, and
change the orientation of one set of sliders instead of creating two
sets in a stacked layout.

Simplify the resizeEvent() implementation accordingly.

Update the documentation snippet text to match the code, and document
the resizeEvent() override.

Pick-to: 6.6
Fixes: QTBUG-119977
Change-Id: I73a1bb215c956fa283291ebf0ea45ff9a975c727
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f3fb89ba298e1741320d8bfac9cbd0d503373bff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 08:02:47 +00:00
Volker Hilsheimer
1f0c629a48 Move the settingseditor example into tests/manual
The example uses QTreeWidget when it should use a QTreeView with a
dedicated item model, primarily shows how to use item views (and very
little about QSettings), and is generally not useful to show how an
application could or should use QSettings to store settings.

Turn it into a manual test instead; it's useful for that as it supports
ini and plist files, and settings in different scopes.

Fixes: QTBUG-119978
Change-Id: I7ce039f6391c41c679d126d90a251eee60327c39
Reviewed-by: Ed Cooke <ed.cooke@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bddf27cd5a5412c8282fab43111e7319874ca44e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-15 17:21:32 +00:00
Volker Hilsheimer
7378c709f5 Examples: fix touch handling in painting examples
On macOS, we don't deliver a press event for the first press on the
track pad (Qt::WA_TouchPadAcceptSingleTouchEvents is not set by default,
so Qt doesn't deliver a single-press on the track pad as a touch event -
that makes some sense or at least maintains compatibility). Because of
that, point 0 is never added to the finger-mapping hash.

When point 0 is then released, we didn't check if we found a valid
iterator for that point ID, and the example crashed.

Fix this by checking that we have a valid iterator before dereferencing,
and by handling Stationary events in the same way as pressed (add the
point to the mapping if it's not already there).

Pick-to: 6.6 6.5
Fixes: QTBUG-110266
Change-Id: I32337b801aaabf9b821a97ddc15ad78747b5e6a2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 9d8473cdf63537dee65e9c235249b4e4901baa1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-15 16:30:46 +00:00
Ed Cooke
a00c80e1ce Update the books example
Remove the .ui file and write the equivalent implementation.

Replace the outdated star icons with new star icons. 5 empty stars
are now provided and filled in depending on the rating. The new stars
are SVG, however, we do not use an SvgRenderer as we cannot use the
QtSvg API from QtBase directly. It is safe to assume the SVG image
loading plugin is present, the worst case scenario would be empty icons,
but it would still build. We instead use QIcon.

For the rating, draw the star icons in a combobox, replacing the old spinbox.

Update the layout by moving the table view to the bottom, and
arranging the input fields at the top.

The scrollbar policies have been set to Qt::ScrollBarAsNeeded for the table view.

Fixes: QTBUG-118476
Pick-to: 6.6 6.5
Change-Id: I27c13534ab06e17531d155469a1cc6e7e05197af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 76b2852b7cff183ba31d6b09b00cbabdffb9ba71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-14 19:53:02 +00:00
Volker Hilsheimer
6c726979f7 Turn the "concentriccircles" example into snippets, update screenshot
The example has a lot of code and documentation, but in essence shows
how to use float-based QPainter APIs and how to set a render hint. That
is two lines of code, which we can show as snippets.

Update the screenshot of the example with a higher-resolution version.

Pick-to: 6.6
Fixes: QTBUG-119983
Change-Id: Iafcb813dff6ab8c269176f7994c95947ebf5e559
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 33254fb41f29b510d3d74dbaab60f0a67ef56d46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-14 19:53:02 +00:00
Audun Sutterud
e978d4046a examples: Update content of "draggabletext"
Qt Quarterly was shut down long ago.

Fixes: QTBUG-119982
Pick-to: 6.6
Change-Id: I910b03ab11bf9aa728cc23d736a6f13902b6fcfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8d0d520cd313a653226f734ef819021f83e66721)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-14 03:01:28 +00:00
Friedemann Kleint
1c06f86d25 SimpleTreeModel: 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: Icc3586451f081f6166fece52675d5379160f51da
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-06 18:22:41 +01:00
Friedemann Kleint
a3e20df03d Polish the SimpleTreeModel example
- Fix/silence most clang-tidy/compiler warnings
  * unsigned/int comparison
  * Avoid repeating return / default parameter types
  * Make functions static/use static invocations
  * Use string literals everywhere
  * 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

Complements 25027444a9b53d61a6257dc5f5ce0ffdb3b06f98.

Pick-to: 6.6
Change-Id: I78f48d187981ecabf69a5d4d42715bad026fa9e6
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-06 18:22:41 +01:00
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
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
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
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
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
Andreas Eliasson
0201d5e232 Doc: Match descriptive text with code snippet
The code snippet reads QDataStream::Qt_6_5. Change the post-descriptive
text to match this.

Fixes: QTBUG-118907
Pick-to: 6.6 6.5
Change-Id: I3b3d03e9095a6ba6febfb652b3bc7173ed4ccfa4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-01 10:42:41 +01:00
Christian Ehrlicher
fa045a3ce7 SQL/drilldown example: add new icons and misc cleanup
Cleanup the drilldown example:
 - use icons with the current style
 - remove unneeded QOverload<>
 - remove some empty lines which don't look good in the documentation
 - use Q_SLOTS/Q_SIGNALS instead slots/signals

Fixes: QTBUG-113696
Change-Id: I62476a8989c0abd1f424d1425cb05489491e2153
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-23 11:33:28 +01:00
Matthias Rauter
f6e7fdd4ad Refurbish the shaped clock example
The shaped clock example has the appearance of the analog clock, which
was refurbished with 619ec1a6406a8be7bfa9d96b9e693e7a3323d8dc. This
change applies the refurbished design to the shaped clock.

Task: QTBUG-118871

Pick-to: 6.6
Change-Id: Ibcfc8e9fb239a1c6f7ea685f6cab1e50b2060a53
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-17 23:36:38 +01:00
Laszlo Agocs
9f3d6e325f Make contextinfo example a manual test
Change-Id: I9023016d50e82bba1fa73632cc1409b3d016f352
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-11-17 22:27:01 +01:00
Lucie Gérard
4c36bb854c Remove undocumented embedded examples
Task-number: QTBUG-119117
Change-Id: I7fd104742771e2ce6d4ad7afd66e2beca3b4f672
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-11-17 19:39:33 +01:00