Commit Graph

567 Commits

Author SHA1 Message Date
Kai Köhne d7a629e95f Fix compilation of car-configurator with older CMake versions
Car-configurator actually only needs CMake 3.20 - older versions
will fail with

  CMake Error at C:/Qt/6.8.0/msvc2022_64/lib/cmake/Qt6Qml/
  Qt6QmlMacros.cmake:4141 (message):
  QML app deployment requires CMake version 3.19, or later, or manual
  executable finalization.  For manual finalization, pass the
  MANUAL_FINALIZATION option to qt_add_executable() and then call
  qt_finalize_target(CarRenderingApp) just before

But CMake 3.20 should be enough. As Qt still allows to be configured
with CMake 3.16, don't build the example for older CMake versions.

Pick-to: 6.8 6.8.0
Fixes: QTBUG-127851
Change-Id: I157a625294de0896a39f3ab8f057a95d627d3c7c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-11 09:41:08 +00:00
Ali Kianian 7247d3ea82 CarRendering: Resolve fog ambiguity for desert in ScreenPrimary
Fixes: QTBUG-128351
Pick-to: 6.8
Change-Id: Icea5c290febdd3b6491f0de203b4ff7022b9589a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-09-10 18:16:51 +03:00
Sami Shalayel a841c45fee samegame demo: fix qmllint warnings
Fix the qmllint unqualified warnings and custom parsed
property changes.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I3a8e310738d1521bae4e233c5610af833fcb697f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:46 +02:00
Sami Shalayel 0c02d0545a samegame demo: port to qt_add_qml_module
Make the samegame demo use qt_add_qml_module instead of qt_add_resources.
This populates build/qtdoc/examples/demos/samegame/SameGameModule
instead of build/qtdoc/examples/demos/samegame/content because content
is a bad QML module name ™️.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I23e197c99ff284f62fa9deae12afe9ddbd510861
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:41 +02:00
Ali Kianian ae345d2bd9 Port the latest updates from design studio demo project <CarRendering>
The update contains the following changes:
    Unused modules removed:
      * Hood
      * Uk5ofde_LOD0
      * Uk5pebv_LOD0
      * Ulbrbdt_LOD
    MirrorMaterial Removed
    Assets are up-to-date
    New menu style is available
    Blended shadow plane
    New default camera position
    Hood shadow animation fixed
    Working car shadows
    Demo mode camera fixed
    DirectoryFontLoader is used

Task-number: ARTDES-774
Pick-to: 6.8
Change-Id: I35ad6545c3e0dc21b58f6de1a8b09a740c54fffa
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-09-09 15:04:54 +03:00
Olivier De Cannière 52d19782d1 Examples: Fix win logic for multiplayer games of samegame
In case player 2 had a higher score at the end of the game, the removed
line would set score to max(score, score2). This would then lead to the
image proclaiming player1 as the winner to be loaded in onModeChanged
by the game canvas in GameArea.qml.

Change-Id: I642d7dc757c4411ccbb836768ca192457057214e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-05 10:08:01 +02:00
Kai Köhne 8a98d398d0 car-configurator: Explicitly require 6.8
This silences warnings about QTP0004 . And the example requires the
ExamplesAssetDownloaderPrivate module, which is only available in 6.8,
anyhow.

Pick-to: 6.8
Change-Id: I9ba768abde984dca7c129d97c99ed6d99421aac6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-09-04 09:08:53 +00:00
Axel Spoerl 7f9ff2d5cf Documentviewer demo: Exit application when no plugins were found
When building viewer plugins failed, the application could still be
launched and documents opened. This would crash the application with
a nullptr dereference.

Print a qWarning and exit application in MainWindow c'tor, when no
plugins were found.

Fixes: QTBUG-122041
Pick-to: 6.7 6.8
Change-Id: I92cd1678fdc3f88edc0f35347bd15c3e7c43f122
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-08-30 10:02:58 +00:00
Konsta Alajärvi c2586fe191 Examples: Remove unused imports in coffee example
Remove unused imports in coffee example.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: Ia79a86e35ccb86e1c70fad3f0e5c6e0d1fb88519
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-08-23 09:10:55 +03:00
Konsta Alajärvi 2821519ef2 Examples: Fix coffee example imports
Coffee example gives run time issues on Windows and macOS due to
QtQuick.Controls import that imports styles not customizable on
windows and macOS.

Change imports to QtQuick.Controls.Basic so the same style is imported
on every environment.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: I8f67b87a1fa16d0c8156a05ab065de95aaf363de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-08-23 08:18:17 +03:00
Jonas Karlsson 8b4248d687 Dice example: adapt to Qt 6.8 shadow mapping
The dice shadows are now only enabled when they are close enough to the
table. This will keep shadow map bounds smaller and reduce graphical
artifacts.

Pick-to: 6.8
Change-Id: I4664e4d6d825f0dd01ebb65e1180cb28155cb890
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-08-22 09:11:29 +02:00
Alexandru Croitor 4fc0afc2b4 CMake: Alternative fix of deployment for lightningviewer example
qmlimportscanner is used to scan the qml files, to decide which
plugins and libraries to deploy. Because none of the qml files
explicitly reference the LightningViewer or LightningViewerStyle
imports, it never deploys the qml modules, nor their dependencies.

This change adds a Deployment.qml file to the sources, which is not
actually used at runtime, but because qmlimportscanner sees it, due to
scanning the whole project directory, it will deploy the necessary
files.

Pick-to: 6.7 6.8
Fixes: QTBUG-127835
Task-number: QTBUG-128225
Change-Id: Ic5185d723d3a1f65427af1ee7799fa49ea414cfd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
2024-08-20 13:28:51 +00:00
Ed Cooke 37b941f544 Fix for backspace not considering unary minus in calqlatr demo
In the calqlatr demo, you are able to use backspace to remove the last
digit. This does not consider the last minus sign left when using
backspace on a single digit negative number. In this case, set the
displayed digits to an empty string.

Fixes: QTBUG-127814
Pick-to: 6.7 6.8
Change-Id: Iec82e0650b3b50022be0b5a716976aefa78118a3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-08-19 13:52:51 +02:00
Sadegh Taghavi 9240bdd2f1 Fix the OSMBuilding compiling on the android
Fixed a copy and paste leftover that caused a compiling issue on the android

Fixes: QTBUG-123164
Pick-to: 6.7 6.8
Change-Id: I9d5e7538693c65923cc65bdc792db842c161225a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-08-19 11:50:17 +03:00
Lucie Gérard 7f1fb59710 Change license for examples files
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

Pick-to: 6.8
Task-number: QTBUG-121787
Change-Id: Ie964d4c605a9f7c30be3b601d5de40034c7371f4
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-13 16:13:06 +02:00
Leena Miettinen e3239a8f18 Doc: Fix links to Qt Creator documentation
- Link to topics in Qt Creator 14.0
- Use the macro \QC
- Remove obsolete links
- Remove \externalpage commands to use links from qtbase

Change-Id: I41f6300a5464c8a46ba6c5d0e15a7fbb2164392c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-08-09 13:41:54 +00:00
Sami Shalayel efc394f00c clock demo: use qt_add_qml_module
Make the clocks demo use qt_add_qml_module instead of qt_add_resources.
Also put the qml files in the same folder where the qt_add_qml_module
happens to avoid having two qml modules (one with clocks.qml and another
with Clock.qml), and move the images to an images folder.
Rename the executable to clocksexample to avoid clashes with the newly
added QML module clocks.

Fix the uris to the images to reflect the new path in the qrc.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Also update the documentation.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I16274f041f6d16acc5910d9eaef645234dc6f34f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2024-07-30 06:52:13 +00:00
Sami Shalayel 73f1137648 maroon in trouble: use qt_add_qml_module + fix bugs
Use qt_standard_project_setup and qt_add_qml_module in the
CMakeLists.txt file.

Fix qmllint warnings:
* unqualifed access by adding the required id
  (note that setting the ids fixed some bugs in the game where the towers
  were placed on the wrong place on the grid, because the root's x and y
  coordinate were used instead of the sprite's  x and y coordinates)
* unqualified access by adding required properties where missing
* reformulated custom parsed PropertyChanges to not be custom parsed
  anymore
* fix the runtime warning when using injected parameters by explicitly
  declaring it via "function (mouse)"
* setting ComponentBehavior Bound wherever needed

Ignore qmllint warnings:
* about unresolved method name 'destroy' that seems to be a bug in
  qmllint
* about unknown properties inside of the logic.js: this is a bug in
  qmllint and can't be fixed in user projects.

In addition: fix the paths be relative to SoundEffect instead of
being relative to where the SoundEffect was instantiated and remove the
SoundEffect proxy to make the sounds work. This has the side-effect that
the games lags because of the poor sound implementation it seems: the
output prints `Failed wait for getting sink drained; was draining: true`
over and over again when a lots of sounds are happening, like lots of
fighting for example. Tracking this via QTBUG-127560.

Add extra self-imports "import Maroon" where needed to get the qmake
version working, as it does not have the fancy nested qml module that
was introduced in 6.8 that fixed this in CMake builds.

Adapt the documentation to the new Main.qml file name, the code snippets
that references the custom parsed PropertyChanges, and removed the
explanation about self-importing the module in Main.qml as that is not
needed anymore. Also remove the part about implementing a SoundEffect
proxy as that is removed and not needed.

Remove the .qmlproject file as it does not know about modules and
therefore can't load the demo's Maroon QML Module.

Move the Main.qml file into a Window to use QQmlApplicationEngine in the
main.cpp file.

Pick-to: 6.8
Task-number: QTBUG-100100
Task-number: QTBUG-127560
Change-Id: I79c7b18a6159208608ef97b271fc24fc9fc06230
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-29 08:56:58 +02:00
Fabian Kosmale 5b2e51a533 colorpaletteclient demo: Opt in to QTP0004
This avoids a warning about using the old policy bheaviour, and allows
us to remove redundand own-module imports.

The qmake project needs no further adjustment, as it already collapses
the folder structure in the qrc file system.

Pick-to: 6.8
Task-number: QTBUG-126201
Change-Id: I1804611c6158775346d2f652537ae48664e5a267
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-07-22 09:25:29 +02:00
Dilek Akcay 7d6639ff32 Update stocqt according to API changes
Pick-to: 6.8
Task-number: QTBUG-127048
Change-Id: I6bdeabd97f6509942eb50327d32bcbe3c6c1a5ee
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-16 10:05:08 +03:00
Sami Shalayel 7b528c1723 documentviewer 3d plugin: use qt_add_qml_module
Use qt_add_qml_module for the document viewer demo 3d plugin.

Make the plugin qmllint clean by removing unused imports, unqualified
accesses and setting the ComponentBound behavior.

Use loadFromModule instead of setSource, and rename q3dViewer.qml to
Viewer.qml to be loadable. Same for queryMimeTypes.qml that is now
QueryMimeTypes.qml.

No doc or .pro files needed to be changed as the quick3d viewer plugin
has neither documentation nor qmake file.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I723277d53ed4b7eb1353772928c6069919d0b4e9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-10 08:45:45 +02:00
Sami Shalayel c4d3c1690a dice demo: use qt_add_qml_module
Use qt_add_qml_module for the dice demo.

Make the demo qmllint clean by removing unused imports, unqualified
accesses and more.

Use loadFromModule instead of load, and rename main.qml to Main.qml to
be loadable. Also add a missing qmldir file for the qmake project to
work with loadFromModule, and fix the prefixes in the .pro file.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I786dcb971980f48e91b0aeaf9d65f285a78c260e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-09 08:57:19 +02:00
Ali Kianian 953873d996 Port the latest updates from design studio demo project <CarRendering>
The update contains the following changes:
* better glow for lights
* videoWall reflections fixed
* Updates to the UI, buttons and logo position
* Fixes on Glitches
* FaceLift
* New Wheels and BackLights
* VideoWall rePositioning
* New Car PaintWork + videoWall
* BackLight Reflection removal
* Desert polishes
* Studio Improvements
* Smooth Car paint change transitions
* ColorButton Start fix
* Door openings
* Added Trunk and Hood openers
* Visibilty of door openers based on camera Angle
* Door openers Smooth transitions
* Removed Lights from Studio
* Reflection Probe ReDone in VideoScene
* Door button is smaller and has background blur
* Interior colors and Lights
* Interior material tweaks
* More realistic headlights
* New Car paint material
* Tiny update to margins for UI
* Better carPaint and Window materials
* Headlight glass material
* New Wheel textures
* Front headlight geometry
* Added easing to door animations
* Door button fix
* New Demomode Blending
* Headlight decal and material update
* Desert Visual updates
* Desert scene Custom shadows
* Fix new shadows
* More Transparent fake shadows
* Added a new svg icon for the door and updated the button for it
* Tiny update to pebbles and enabled shadow plane inside car
* Blended Shadow plane
* Added Correct button font
* New Default Camera position
* Hood shadow animation fixed
* Working car shadows

Task-number: QTBUG-126959
Pick-to: 6.8
Change-Id: I596f6befeb881c73354306f51feca4faa7c88c6e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-07-08 14:03:00 +03:00
Jonas Karlsson 00c3e3d3d7 CarRendering: improve shadowmap bounds
Makes the objects far from the car not cast shadows which makes the
shadows look better

Pick-to: 6.8
Change-Id: I55cf6b8c886da6141b1872881e02d8f5164a31eb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-07-03 23:05:28 +02:00
Ali Kianian 2daf92a628 CarRendering: Use Qml Asset Downloader library
Task-number: QTBUG-126535
Pick-to: 6.8
Change-Id: Ia0c077507df2048e292953040fe6752a7bc4481a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-07-02 12:30:29 +03:00
Dilek Akcay 95a83c116c Fix stocqt warnings
Fixes: QTBUG-126517
Fixes: QTBUG-126578
Pick-to: 6.8
Change-Id: Ibd497e9c9c0d82864f2388d6e8e6844ffb2bacbb
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-06-28 10:58:17 +03:00
Sadegh Taghavi 3b602e8a35 Add Qt exclusive demo token
Add Qt exclusive demo token provided by OSM using an AWS API endpoint as a proxy.
Add the ability to change the example token by the user in runtime.

Fixes: QTBUG-124144
Pick-to: 6.7 6.8
Change-Id: I590f0c31b795edede7ba6b23c6bbc3ef0a5bb468
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-06-24 08:04:22 +00:00
Mikko Gronoff 1e1f20747d thermostat: update energy consumption unit
kWh instead of KM/H.

Pick-to: 6.7
Change-Id: I97d8f73af902b11315f58ee190144bedb002b913
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-28 09:13:26 +03:00
Friedemann Kleint dbd33f139b Fix mediaplayer to work with Python
Adapt the Python code to qtdoc/
96ee261e6b.

Task-number: QTBUG-122273
Pick-to: 6.7
Change-Id: Ibe92481ffff21ce1de0c6804548d76fcc8587688
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
2024-05-27 08:39:05 +02:00
Assam Boudjelthia 5192e12c42 Android: update build.gralde file
To close the gap between it and the default build.gradle template.

Change-Id: Ic118f73b3bf39824931d502bd97427b8addcfaea
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-24 13:15:23 +03:00
Assam Boudjelthia 45a82b2b73 Android: cleanup AndroidManifest.xml files in examples
Change-Id: If4712fb258052a1a74d56ecb8415503d4025b8b3
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-23 15:13:28 +03:00
MohammadHossein Qanbari 84e962eae5 LightningViewer Example: add 'import QtQuick.Control.impl'
There was a missing import. The 'QtQuick.Controls.impl' is required to
be imported when instantiating IconLabel.
Missing this import makes the example fail to run as the IconLabel type
is not known.

Change-Id: I1bc2baa150678d7398fdff5f9a5d867c73113277
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-05-14 08:57:46 +00:00
Alexandru Croitor cde9cfb96c CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

Some examples had to be adapted manually, mostly those that build
additional qml modules / plugins.

documentviewer did not get the deployment api, because it's trickier.

Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I76322185fc824c112d77e077ee39e7ccbc193a4c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-13 09:44:04 +02:00
Konsta Alajärvi b8232a7adb Remove not needed leftover file from Coffee Machine example
Removed Cup.qml from Coffee Machine example. The file was not supposed
to be there after the example re-design as it is supposed to be
replaced by the Cup.ui.qml but apparently it was not fully removed and
was left in the file listing of coffeemachine.qrc.

With Cmake the file has not been visible in Qt Creator or Squish
but with qmake its visible in Qt Creator
and exposed to Squish as well.

Affects testing the example because the same object has different
object names in Squish between Cmake and qmake.

Task-number: QTBUG-123440
Pick-to: 6.7 6.7.1
Change-Id: I82c2a315cd8af9459e5d5caecb3a3efe8a1e5eff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
2024-05-13 06:39:30 +00:00
Konsta Alajärvi 20e9c489b8 Fix coffee machine example recursive rearranges
Coffee Machine example gives warnings about UI component recursive
rearrengements on Settings, Insert and Ready pages when orientation
changes.

Tracked issue to originate from the coffee cup image Rectangle
container trying to resize its width based on its height.

Removed the width to height bindings.

Task-number: QTBUG-123445
Pick-to: 6.7 6.7.1
Change-Id: Idd4ee13bc2446608a2f8d5d472370c120b4d05b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-13 09:39:22 +03:00
Axel Spoerl 59c784dff2 Documentviewer demo: Reset AbstractView::m_printingEnabled in cleanup
m_printingEnabled wasn't reset in AbstractViewer::cleanup().
That prevented the printingEnabledChanged() signal from being fired,
when a viewer displayed a printable document from the 2nd time onward.

Always disable printing in the cleanup() method.

Fixes: QTBUG-125057
Pick-to: 6.7
Change-Id: I7d237a27a3547103ef0ce099a0735b2444bc0248
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-08 09:45:55 +02:00
Konsta Alajärvi 36e2025667 Fix Coffee Machine example coffee cup image
Coffee Machine coffee cup image is broken with Qt 6.7.0 for unknown
reasons, more descriptive explanation in the linked bug ticket.

Modified the broken dark_cup.svgz image to expose the hidden
parts of the image.

Before Qt 6.7, Qt only supported SVG Tiny 1.2 standard. From Qt 6.7, we added some of the most used features in SVG 1.1. The file in this example uses <filter> element which was not support before, and since it was not supported it was never parsed. In Qt 6.7, this <filter> element is parsed. However, we only support a subset of the filter primitives that can be used inside the <filter> element, and since this file uses an unsupported filter primitive <feBlend>, it causes an issue.

Simply removing the reference to the <filter> element from the Svg file, fixes the issue.

Fixes: QTBUG-124707
Pick-to: 6.7 6.7.1
Change-Id: I62391fa4fc320f440045958e0ef0dc2eef69d21c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-29 11:52:59 +00:00
Fabian Kosmale 2a5bd980ce calqlatr: Use qt_standard_project_setup
Pick-to: 6.7
Change-Id: I673572b691554c90057296871f87c9cab2c1237c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-04-19 11:51:04 +00:00
Even Oscar Andersen cb69d167bb Add missing sound files to dice qmake build
Pick-to: 6.7 6.6
Change-Id: I56de4c78fdf979cd43be067e402a8ff90df2ba8b
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-04-17 08:18:55 +00:00
Bartlomiej Moskal 252e19f0c7 MediaPlayer demo: Add FileNameProvider for PlayList
There is an issue on Android where QFileDialog does not return real
filenames. Instead, it returns content URIs that do not seem appropriete
for displaying in playlist.

To ensure that filenames are displayed correctly, we need to use
QFileInfo. Since there is no QML type for QFileInfo, additional
FileNameProvider singleton type has been registered for QML use.

Fixes: QTBUG-122273
Pick-to: 6.7 6.5
Change-Id: Ib6bd152856a6979788bcbb203d58a38810ea0682
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-16 18:19:34 +00:00
Ed Cooke 6c73363cd3 Add qmldir file to calqlatr example
In order for the calqlatr example to successfully load Main.qml when
building with qmake, a qmldir file needs to be added.

In addition, the files listed in OTHER_FILES, were redundant, since
those files were already listed as qrc resources.

Fixes: QTBUG-123714
Pick-to: 6.6 6.7
Change-Id: Id773ecf93c9b113385121da62de99ced3f8debdf
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2024-04-15 20:17:11 +02:00
Samuli Piippo f89dfde4ed calqlatr: remove special characters
The demo's buttons were using Mathematical Alphanumeric Symbols, which
are not available in all fonts. Replace them with regular characters.

Fixes: QTBUG-122605
Pick-to: 6.7
Change-Id: I24e61eb11f8df34149d0d0fd962054ea759729c1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-04-13 11:12:39 +02:00
Konsta Alajärvi 1ed82c8dc9 Fix Coffee Machine example initial size on big displays
Fix the issue with the Coffee Machine example application window
filling the whole  virtual desktop screen space, which is wrong.

Set initial application window size to some hardcoded values which
will be used on desktop. On mobile platforms the window size will
be maximized.

Update docs to reflect this change.

Fixes: QTBUG-123414
Pick-to: 6.7
Change-Id: If8323c0c1ada4aa5230aa94cf624b2a0ff859b5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-11 08:40:35 +00:00
Chris Lerner 09eeab6ef4 Set up InAppPurchaseBackend for platforms other than Android and IOS
The hangman example relies on a backend for in-app purchases.
This backend was not properly set up for platforms other than IOS and
Android. This lead to an invalid memory access when utilizing the
backend which resulted in a crash.

Inside the function that does the backend setup, instead of immediately
returning on other platforms, assign an InAppPurchaseBackend object to
the backend variable. This will allow the application to keep running,
and warn the user that InAppPurchaseBackend is not implemented on
the platform.

Fixes: QTBUG-124146
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I77f64849bf16132f8380fd5b25db89098f86e2e5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-05 14:55:21 +00:00
Chris Lerner 44c9b5162f Correct a typo in Thermostat example
Pick-to: 6.7 6.6 6.5
Change-Id: Ifcfb7005fb95ad7851e701fd7cbb287f4341f086
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 10:06:30 +00:00
Lucie Gérard 6dee263d19 Change license for examples files
According to QUIP-18 [1], all example files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

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

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I527c8178b83116fde9b83242bc2977acf0f2a8fc
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-04 09:00:53 +00:00
Even Oscar Andersen 5c04abcb6e Dice demo: Add missing menu icon to qmake project
Pick-to: 6.7 6.6
Change-Id: I6e463cf04d0e4ca6d7015e17241d657940a01613
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-04-03 05:17:17 +00:00
Sakaria Pouke 9e9fcf7477 StocQt clarify user api usage
Clarify the needed api and where to put it

Pick-to: 6.7 6.6
Change-Id: I7678abd02be2f9154ecfc5d3c2a003c35de2013b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-25 06:13:00 +00:00
Mikko Hallamaa c5e047f5c7 MediaPlayer: Remove restrictions of protocols in URL
The URL input field had a validation that limited the possible protocols
to only http, https, rtp, rtsp and udp.

This patch modifies the validation regular expression to allow for more
protocols supported by FFmpeg.

Pick-to: 6.7
Change-Id: I84861673a78d4317592f96b4a92d8e676b05660f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-03-21 10:05:56 +01:00
Kai Köhne 07dfdfac03 Examples: Remove shared resources from examples
Fixes: QTBUG-123472
Change-Id: Id45b966cfc3405718a99441e3e0c4f0d17e601c9
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-03-20 13:29:48 +01:00
Lucie Gérard 0b0ba1bc42 Correct license for documentation files
According to QUIP-18 [1], all documentation files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

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

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Idbbd9c9bc1780cf97c71398a3b118d5b371b0ca3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 09:56:22 +01:00
Lucie Gérard 8b36425fab Correct build system file license under example
According to QUIP-18 [1] all files under examples
should be licensed
LicenseRef-Qt-Commercial OR BSD-3-Clause

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

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ia2e8f62af64a384196a9b0c02ac5b2fbf5404a8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 08:20:16 +01:00
Lars Sutterud 4c3ea1b6eb Lightning Viewer: Update docs to clearly state use of simulated data
Due to the lack of an agreement with the lightning strike data provider,
we will only provide simulated lightning strike data for this demo. This
change removes info in the documentation about the option to forward
real world lightning data, and makes it more clear that the data is
simulated.

Fixes: QTBUG-122907
Pick-to: 6.7
Change-Id: Ibae18922e79393564b3947d813b1285f0358aaf9
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-18 08:14:57 +01:00
Mikko Hallamaa 8e97daa0ca MediaPlayer: Add return type annotation to validateUrl
Add return type annotation to validateUrl() function to get rid of a
warning when running the MediaPlayer demo.

Pick-to: 6.7
Change-Id: I2e0ac48f111e90d37d46dc8cd39adb3bcd228ca5
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-03-14 10:23:46 +01:00
Jonas Karlsson 691a8b9bc3 Dice example: center text
Fixes: QTBUG-121144
Change-Id: Ifa4735307bda97dd9e830af8acac6239358fb1e1
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-03-12 20:11:07 +00:00
Mikko Hallamaa 5eb9a602dc MediaPlayer: Use theme colors in menu
MediaPlayer demo was using themed text colors but native base colors in
the File menu. This caused issues with visibility if the contrast
between the colors was too low, at least on Gnome.

This patch updates the demo to use themed colors in the File menu, as
well as using the highlight color more appropriately for better
visibility in both dark and light themes.

Additionally, the highlight color is added to the theming singleton.

Pick-to: 6.7
Change-Id: I7baf0ce217e24112c8daabfdeec76e069c867062
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-03-12 12:50:20 +01:00
Volker Hilsheimer e02f78b397 OSM buildings: correctly download and add OpenSSL libraries
Pick-to: 6.7 6.7.0 6.6 6.6.3
Fixes: QTBUG-123164
Change-Id: I5d2bb2838ee40feea6d9a911072275f4bd6cbdfb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-12 12:37:58 +02:00
Nicholas Bennett 5a62cbe268 Docs: Update Qt Dice example documentation
Added the required modules to the note, updated the brief.

Pick-to: 6.7 6.7.0
Change-Id: I2515aaeec95dd7825794b784d7799920a2624b43
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-03-12 08:43:50 +00:00
Juha Vuolle 1be090be7d Remove obsoleted QIcon code from colorpaletteclient
The recently refactored UI doesn't rely on icon theming anymore.

Amends: 7a62659880

Pick-to: 6.7
Change-Id: I59bc7df167cf6cbd6b26cbd494674927f81f319e
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2024-03-07 13:45:35 +02:00
Nicholas Bennett 32fcefb291 Dice app example: fix menu in landscape mode
Put the column of controls in a flickable and set the scroll-bar
to always on if the UI's height is greater than the screen height.
This way the the user knows they can scroll if they start
the application in a landscape orientation. Should see no change in
on desktops, unless you resize the application window smaller than
the menu height.

Fixes: QTBUG-122444
Pick-to: 6.7 6.7.0
Change-Id: Ic49c7b0acdb8f71723925441af5dfbaa8793b67e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-07 08:09:17 +00:00
Nicholas Bennett 15e216c402 Update package and app name for dice example
This is to meet the requirement that the app have a different name on
the app store.

Task-number: QTBUG-115724
Pick-to: 6.7
Change-Id: Ia5b657b7a9f363a5c4ca1e7c27f75daa07d5c689
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-06 09:45:21 +00:00
Rami Potinkara 5afde84fd3 Android: update Calqlatr package name
Pick-to: 6.7
Fixes: QTBUG-122569
Change-Id: I28d76fe56e3c13e1d170e307f095668b380df75c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
2024-03-06 06:57:15 +00:00
Kai Köhne d3d420a7c0 Fix QTP0001 warning for Showroom example
Pick-to: 6.6 6.7
Fixes: QTBUG-122767
Change-Id: I65be5eb533364708284e368bef33b7066ecd30d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-04 14:37:38 +01:00
Kai Köhne 69352e0b68 Lightning viewer: Fix typos
Pick-to: 6.7
Change-Id: I4d59da719d300b94571debe246e4969d6ea51c17
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-04 08:59:47 +01:00
Timur Pocheptsov ee7725862f MediaPlayerApp example - avoid infinite looping
If we have only 1 file and trying to shuffle, we enter an infinite
loop, while trying to find an index not equal to the current one.
We need an additional check to avoid this.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-122178
Change-Id: I299ef0f66adc271be5921a6f16eabde9b2021499
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-03-01 11:28:39 +01:00
Sakaria Pouke 19ad9d875b Update graphs qml import for stocQt
Fixes: QTBUG-122657
Pick-to: 6.7
Change-Id: Ib7bf1b15ae7e1bf4f65c83aef3399afd141c8a03
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-23 08:40:27 +02:00
Sakaria Pouke 79e91c7e49 stockqt find packages before standard project setup
Fixes: QTBUG-122258
Pick-to: 6.7 6.6
Change-Id: I976cdc3623f975d3d3dc15ffdf3526791ecc34d7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-22 14:27:01 +02:00
Friedemann Kleint 70af90d85b color palette example: Fix errors in Python port
The Python port uses different models, which causes QML errors like

ColorPalette/ColorView.qml:296:17: TypeError: Cannot read property 'width' of null

when refreshing the model. Specify ids instead of "parent" in the
delegates since their parent can arbitrarily change.

Amends 7a62659880

Task-number: QTBUG-115085
Pick-to: 6.7
Change-Id: Ic7097496ad2d8b902225ea0e5c3a661f797aed16
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2024-02-22 12:05:13 +01:00
Topi Reinio 640254afe9 Doc: Split up 'Data Visualization & 3D' category
There's a lot of examples in the category; split it to separate
'Data Visualization' and '3D' categories.

Pick-to: 6.7
Task-number: QTBUG-122377
Change-Id: I9026ada9d8eda72cae0cbfa8e5066438bb12661a
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-21 09:33:09 +00:00
Assam Boudjelthia 0462cfa1ee Hangman: remove line using undeclared variable
failedProducts variable is never declared but used in the
code, this seems to be a typo and the line should not exist
anymore in dev (5.15.0 used to have that for example).

Amends 81d6ddf857.

Fixes: QTBUG-121578
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I2d7f6cebb729a095c657831151ac3049a8786564
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-20 10:55:46 +02:00
Matthias Rauter c75b665d8a Indicate SSL support in the colorpalette UI
Ammends 7a62659880

Pick-to: 6.7
Change-Id: I9b51af41f752ae5da826ae1c98ae7cb2bf20b3aa
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-02-19 10:10:37 +01:00
Mats Honkamaa 55f6970464 Doc: Update OSM example docs
Minor updates to the OSM example documentation

Pick-to: 6.7
Change-Id: I3a903246e9660abde552ac51628372265a4cc10e
Reviewed-by: Sadegh Taghavi <sadegh.taghavi@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Esa Törmänen <esa.tormanen@qt.io>
2024-02-16 12:14:20 +02:00
Axel Spoerl 54d105b901 Don't build documentviewer demo on Android
The demo crashes on Android with a nullptr dereference, because it fails
to locate any plugins. The reason is currently under investigation, and
probably related to an issue in the Android content file.

Prevent documentviewer from being built on Android.

Task-number: QTBUG-122041
Pick-to: 6.7
Change-Id: I810bf9787df4d4105c5d11e36f27d0bbe61b8d3d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-16 06:34:14 +01:00
Axel Spoerl 1857297f60 Documentviewer demo: Disconnect print related connections
The documentviewer demo re-uses its viewer plugins. It connects its
print button to the viewers' print functionalities, without keeping
track of the connections. That leads to double connects and crashes.

Store relevant connections in an array and disconnect them.

Fixes: QTBUG-121940
Pick-to: 6.7
Change-Id: Ifcef2097d874d6d37c7891bafc1805264282e984
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-15 09:39:58 +01:00
Nicholas Bennett 68049fd0db Demos: Add iOS app icon to coffee application example
Added the required folder structure, and files. Adjusted the project
CMake file.

Fixes: QTBUG-118700
Pick-to: 6.7
Change-Id: I09d6f45cbb10928d3e2bcf1b6828c1cdc5fe379a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2024-02-14 19:49:43 +00:00
Juha Vuolle 02885ea89d Fix type related space character usage in colorpaletteclient example
Change '* ' into ' *', and '& ' into ' &'

Pick-to: 6.7
Change-Id: I29223b069d92f67195405fa88795469a6cc767a0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-14 14:05:52 +02:00
Juha Vuolle 6a6212a652 Change colorpaletteclient demo to use REST helpers
Pick-to: 6.7
Fixes: QTBUG-114649
Change-Id: I26723e51951bf8285c0bcc30ff3bc6f4970c1e8b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-14 14:05:42 +02:00
Konsta Alajärvi 0cac392e36 Separate UI from business logic on re-designed Coffee Machine example
Added .ui.qml counterpart files for components that needed separation
between the UI and business logic.

Rebased to dev to get the newest changes

Added Cup snippet tags to ProgressForm.ui.qml

Added AbstractButton snippet tags to CoffeeCardForm.ui.qml

Fix ambiguous id's and corresponding property aliases in CoffeeCardForm.ui.qml

Added qdoc snippet tags to ChoosingCoffeeForm.ui.qml

Fixed incorrect file paths in snippet tags in coffee.qdoc

Moved transitions from ProgressForm.ui.qml to Progress.qml
as they did not work properly from there to make the coffee cup
animation work properly.

Added property alias "contentItem" to ProgressForm.ui.qml
to access it's properties from Progress.qml to make the progress bar
animation work properly.

Fixed x coordinates in custom sliders so that the slider handle
will not go over the slider bar and become unresponsive.

Removed "brewTime" property int from ProgressForm.ui.qml as it was
not needed there.

* Fixed x coordinate in Sliders to work like they are described
in official documentation.

* Created property int in Progress.qml to better describe cup animation
velocity factor.

Fixes: QTBUG-120280
Pick-to: 6.6 6.7
Change-Id: I3ed0e1c6777674e2d9502aab1e5c670b6099f60a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-02-08 10:18:18 +02:00
Nicholas Bennett 5fcd391653 Add app icons for Android to Coffee Machine
Added adaptable icon and monochrome icon.

Task-number: QTBUG-118700
Pick-to: 6.7
Change-Id: Id498546fcbd81202d3d5d53ec3768cf73f41581e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-07 13:07:28 +00:00
MohammadHossein Qanbari c5fe729e0c Lightning Viewer Example: Remove Qt5Compat Dependency
The ColorOverlay is replaced with IconLabel to remove the dependency on
Qt5Compat.GraphicalEffects.

Fixes: QTBUG-121929
Pick-to: 6.7
Change-Id: I7dc6fd6538a2a1dd3c1e20a4dd401137a9e1030a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-02-07 11:15:31 +01:00
Juha Vuolle 5f69e07142 Address QTP0002 CMake policy warning in colorpaletteclient example
Happens on Android builds

Task-number: QTBUG-115085
Change-Id: Ib8abdf297d5bac5d8bc01b9480f328f569ecc36b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-07 11:10:48 +02:00
Juha Vuolle ad5c428718 Make colorpalette's qtexamplestyle qml module accessible on macOS
... by making sure it's properly part of the app bundle.

Task-number: QTBUG-115085
Change-Id: I196d309c9400acb897950dbfb5fe99d9d7f13756
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-02-07 11:10:43 +02:00
Matthias Rauter 7a62659880 Refactor GUI for color palette example
Task-number: QTBUG-115085
Change-Id: I35f9e7a26b929353a25bc2959350b161bed5e59b
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-02-07 08:12:43 +00:00
Sadegh Taghavi db0658e8ea Add OSM Buildings To the Doc highlights
Change-Id: I707ae2a2bf84604a403c1416d32229a811c94a3c
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2024-02-06 13:06:09 +02:00
Kai Köhne e6f034d212 Improve StocQt example metadata
Rename to just 'StocQt', as we don't talk about demos
anymore. Also mark example as to be highlighted.

Pick-to: 6.6 6.7
Change-Id: I2b88db8b505ea628702484eaf21e896c2097ed65
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-02 08:31:31 +01:00
MohammadHossein Qanbari 6cc0edc108 Lightning Viewer Example: Support LocationPermission
If the permission is granted, the user location will be visible and the
map view can be recentered.
Otherwise, if the user has already denied the permission and triggers
any action that needs the permission, a message dialog will notify the
user that the application needs the location permission, and the
permission is needed to be granted and the application needs to be
restarted.

Additionally, the PositionSource is not active when the permission is
not granted, and the distance and time layer is not able to show the
information until the user allows the application to use the location.

The user's location will be set from QML by PositionSource, then there
is no need to keep the QGeoPositionInfoSource object.

Task-number: QTBUG-121412
Task-number: QTBUG-121123
Pick-to: 6.7
Change-Id: I78856f8cc8d182aa7b02c1ffaba01a8871e0a0c6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-01 14:15:21 +01:00
Alexey Edelev 3a3cb92b9b Add the missing check for Qt6::Positioning presence
osmbuildings requires Qt6::Positioning which shouldn't trigger a configure
issue when building qtdoc repo without QtPositioning module. The example
should be skipped instead.

Amends 180704c87c

Change-Id: I74f8010db5b6a1591f04e725a2f0711e5990f066
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-01-31 14:37:50 +01:00
Mikko Hallamaa 2b714d357d MediaPlayer example: Fix scrolling of track options
The MediaPlayer demo had an issue in the track options list where nested
scrolling caused some options to be difficult to access.

This is fixed by positioning all track options in a Column instead of a
ListView.

Additionally modified the TracksOptions implicit height binding to size
the component based on the amount of options.

Fixes: QTBUG-119285
Pick-to: 6.7 6.6
Change-Id: Iaa1ed2c370118a5c0119b233a59c7f4d8c0c70eb
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Lars Sutterud <lars.sutterud@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-01-31 09:46:07 +01:00
Ed Cooke e847d6565b Correct the calqlatr package name for Android
The format for the package name for Android should follow the file
structure. Therefore, "org.qtproject.example" should be
"org.qtproject.example.calqlatr".

Fixes: QTBUG-121660
Pick-to: 6.6 6.7
Change-Id: Ic3281ec8ab695f5a10c368e736200aed9d9d8d0b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-30 15:58:51 +01:00
Sakaria Pouke 41a14b9679 Check for android_openssl in stocQt
Fixes: QTBUG-121524
Pick-to: 6.7 6.6 6.6.2
Change-Id: Ia48eedd665dd57d45b0e515ec18ecb2f95d951ef
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-29 08:01:34 +02:00
Jonas Karlsson 7b243c46f3 Dice example: fix deprecated warning
"Injection of parameters into signal handlers is deprecated"

Change-Id: I12f6257b4cf2f5b79d9ba7153ad256292eebc0fd
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-01-26 19:57:58 +01:00
MohammadHossein Qanbari c4f90b3df7 Lightning Viewer Example: Add OpenSSL for Android
The android_openssl libraries included.
reference: https://doc.qt.io/qt-6/android-openssl-support.html

Task-number: QTBUG-121123
Pick-to: 6.7
Change-Id: Icf21b4768d74cafe6b9a93e4e18fd4da780bdf14
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-26 15:45:05 +01:00
MohammadHossein Qanbari 0f8bf79538 Lightning Viewer Example: Use QML Module and Restructure Project Files
Restructure resource file management by relocating QML and asset files
from the resource files (qrc) to their respective modules within the
application. Moreover, the project has been divided into two distinct
submodules: LightningViewer and LightningViewerStyle.

The LightningViewer module includes the project's sources, QML files,
and assets, used for the model, view, and controller aspects.

On the other hand, the LightningViewerStyle module is dedicated to
defining a custom style generated by a tool. The purpose of separating
style-related files from LightningViewer is to simplify updates by
allowing the style generator tool to only modify contents within the
style subdirectory.

Task-number: QTBUG-121123
Pick-to: 6.7
Change-Id: Ib04fb156bd47b4033526c8eb9b33ccab76ab50e9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-26 14:21:19 +01:00
Samuli Piippo 22315147d0 CMake: fix installation of demos projects
Projects need install instructions to be usable on embedded platforms.
Fix existing instructions to put files into correct places.

Fixes: QTBUG-112024
Pick-to: 6.7
Change-Id: I6a3d84edc1c67281d5497e99144c159faf0f783c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
2024-01-25 15:13:29 +02:00
Samuli Piippo 6f0c2b21ca CMake: Add components needed by demos
Demos want to use more Qt modules, try to find all of them.

Pick-to: 6.7
Change-Id: I478a8dc7accdadd1c521f50491326e978f644f18
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
2024-01-25 15:13:25 +02:00
Axel Spoerl 85ff73b5ff Documentviewer/Q3DViewer: pass correct bounds argument
displayModel.handleBoundsChanged() didn't take an argument and always
handled the bounds of the display model. If a RuntimeLoader was used,
the object was out of bounds.

Make the function take a bounds argument and pass the right bounds to
be handled.

Task-number: QTBUG-119176
Pick-to: 6.7
Change-Id: I8a9986d9ebea14dea2246f02937fe47bbcf95191
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2024-01-25 11:00:25 +01:00
Sadegh Taghavi 7675c93ee3 Android OpenSSL support
Add android OpenSSL Libs to cmake

Change-Id: Ie1aa076e35df8380719f878646e489b13bb8d2f8
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2024-01-25 10:02:53 +02:00
MohammadHossein Qanbari 103e54fe5e Lightning Viewer Example: Improve Updating Distance/Time
There was no need to waste time for calculating the distance and time
of the last strike. The calculation should be considered when there's a
need for it, e.g. when the distance/time layer is visible.

Task-number: QTBUG-121123
Pick-to: 6.7
Change-Id: Ib841502baa5138c91730a308194c6485a28fca1a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-19 11:09:25 +01:00
Kai Köhne 9a61a3a987 Demos: Add dependency info to example metadata
Add metadata about build time / runtime dependencies in the form
of Qt documentation modules. This should allow Qt Creator to hide
examples where needed Qt modules are not installed (because they
are optional in the Qt Online Installer).

Pick-to: 6.7
Task-number: QTBUG-120759
Change-Id: I03d8d75b273fe497803b9af9783b90e397b0638d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-19 10:26:22 +01:00
Sadegh Taghavi 180704c87c OSM Buildings Demo
It's a demonstration of using qtQuick3d to load and render big scene

Change-Id: Ie9065bd71f69f622f07c3bf78520cfbea0b2ce8b
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2024-01-18 15:39:32 +02:00
MohammadHossein Qanbari 3a8e89543c Lightning Viewer Example: Wrong Last Strike Info on User Location Change
Fix a bug in the information of the last strike on the change of the
user's location.

Fixes: QTBUG-121043
Pick-to: 6.7
Change-Id: I2b9af6ad3246e58075ac60ce486299e4b7a62b4e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-17 18:56:11 +01:00
MohammadHossein Qanbari e7aa32c8fb Lightning Viewer Example: Avoid Using Heap Memory When Is Not Necessary
Remove the implementation of copy/move constructors/assignments to
follow the rule of zero/five (LastStrikeInfo).

Use std::unique_ptr instead of QScopedPointer.

Remove the copy/move constructors and assignments of some classes
because they are not copyable/movable.

Prefer stack memory over heap memory whenever possible.

Fixes: QTBUG-121018
Pick-to: 6.7
Change-Id: Ie8784a49beeb23d4ccbf4c18a3158ab7b25b5c5b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-17 14:26:40 +01:00
Axel Spoerl a86081100d Revert "Port samegame to qt_add_qml_module"
This reverts commit 8fc3cd6675.

Reason for revert: As opposed to the commit message, this is not a minimal port. It changes the directory structure of the example, by starting to popuplate the previously empty samegame/samgame directory inconsistently. It breaks qtdoc build with examples.

Change-Id: I0749043047b21a34b613f73e36f2ade629e41f8d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-01-17 07:16:10 +00:00
Jaishree Vyas d741f3d9cb Doc: Create separate Graphics Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6 6.7
Change-Id: I52b36360e4967efc6da74972218b7496c7830291
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-01-16 14:40:08 +01:00
Sakaria Pouke 75ed068b04 StocQt minor fixes
Fixes are based on comments in "Overhaul StocQt example" patch

Fixes: QTBUG-120471
Pick-to: 6.7 6.6
Change-Id: I5eae5aa4825f02066fae6430795c87f5ac633d42
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-01-16 11:31:54 +02:00
MohammadHossein Qanbari c1962e9196 Lightning Viewer Example: Use chrono for Time Duration + Fix Bug
chrono::duration is used for time duration from the last strike.
Also there was a bug in calculation of the display text of time duration
in DistanceTimeLayer.qml that is fixed in this commit.

Fixes: QTBUG-121011
Fixes: QTBUG-121012
Pick-to: 6.7
Change-Id: I55f253bc7821328762cbff957eb9125c441bca2b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-16 09:36:06 +01:00
Bartlomiej Moskal ffc1984fd3 QDice Example: Add a timer-guard for rolling dices
There is a problem in QQ3DPhysics. onBodyContact may still refer to
already deleted object - which causes the application to crash.
It happens when Accelerometer spam a lot with scene.spawnDice(...)
calls.

To avoid this crash, the timer-guard for rolling dices was added.

Pick-to: 6.7 6.6
Fixes: QTBUG-120364
Change-Id: I3ca3811662fb2400d61cb256c8b34885a6fe028a
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-01-16 09:06:00 +01:00
Tuukka Turunen 84a7477e2a Add possibility to adjust dice size with a slider
New slider UI controls added to adjust dice size.

Pick-to: 6.7 6.6
Change-Id: Ie01efacff8eae0a33644f943bfd50d2cd258a7b1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-12 11:04:10 +01:00
Shawn Rutledge 7690e3909b photosurface example: use correct types for required properties
Pick-to: 6.5 6.6 6.7
Change-Id: Ia1763bbefa6ebc9a4e173859ef279f937ad640c2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-10 10:08:11 -07:00
MohammadHossein Qanbari 3f9efa6140 Lightning Viewer Example: Replace QSharedPointer with LightningItemData
The usage of QSharedPointer is replaced with the LightningItemData as
a value type to avoid heap memory allocation. Using stack-memory is
more efficient than heap-memory allocation for the high-speed arrival
of new lightning data.

Task-number: QTBUG-116750
Pick-to: 6.7
Change-Id: Ica837f5f3c5f24980bb597307c408aaffe3fbd02
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-01-10 16:02:48 +01:00
Kai Köhne 625b277c58 Doc: drop 'example' from title of application examples
There is no need to keep the example in the title, see also
https://wiki.qt.io/Qt6/Example-Guideline .

Pick-to: 6.7
Change-Id: If173285c2e0f0ef7d21a113e4e0713aef84511dc
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-01-10 16:02:48 +01:00
Konsta Alajärvi 37ceea97b4 Rename Coffee Machine example QML module and .qrc file
Renamed QML module and .qrc file in Coffee Machine example, because
using same name for application and QML module causes errors.

Fixes: QTBUG-120230
Change-Id: Iacb73681df83236cf01e3bae75da748de4cf4875
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-10 17:02:48 +02:00
Konsta Alajärvi 4c3e6e6152 Fix Coffee Machine clipping UI elements on lower resolution displays
Reason for these changes is that it was discovered that some of the
UI elements of the re-designed Coffee Machine example did overflow the
target device display with lower than ~1080x1920 display resolution.

Added states to coffee cards that will scale the cards and their content
down if target device screen resolution is lower than set limit.

Added state to home component where text components will be scaled
down in target device screen resolution is lower than set limit.

Added some colors to Colors.qml to remove hardcoded color values.

Added states to sliders in Settings.qml and in CustomSlider.qml
that will scale them down if target device screen resolution is
lower than set limit.

Scaled the custom buttons heights down a bit throughout the
app to make them fit on screen.

Added state to progress page that will scale the caption text
down if target device screen resotion is lower than set limit
and set minimum width and height to dialog component so that
the text will not overflow its container.

Added states to ready page that will reduce the row spacing of the
grid component and scale the caption font size down if target device
screen resolution is lower than the set limit.

Tested successfully  with Android emulators with screen resolution
ranging from 320x480 to 1440x3120.

Removed multiple property changes regarding text sizes in
Settings.qml and replaced them by binding the text objects
font size to a new property int that will be modified through state.

Added the missing when condition in state change to change
the font size in Setting.qml.

Renamed ambiguous id's

* Removed unused property aliases

* Re-applied missing qdoc snippet tags to Settings.qml which were removed
by mistake. This should fix one of the qdoc warnings in CI.

Fixes: QTBUG-116402
Pick-to: 6.7 6.6
Change-Id: I2524be43f943494f5ab7b2689b222a977996dac6
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-01-10 07:19:54 +00:00
Axel Spoerl 57b2d37b47 Documentviewer: Add q3dviewer as a conditional plugin target
q3dviewer was missing as a plugin target in the example's
CMakeLists.txt.

Pick-to: 6.7 6.6
Change-Id: I1ec6791198551c45cbc1e2efaf4c7d2fd8792bcd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-09 22:56:02 +00:00
Samuli Piippo f80bee1a42 documentviewer: fix deployment of abstractviewer library
Amend ba61af0bf3 and install the
abstractviewer library so that demo works after being deployed.

Pick-to: 6.7 6.6
Change-Id: I481b1d655d5666e11eef4d4aee99359750913750
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-01-08 17:14:44 +02:00
MohammadHossein Qanbari 7570109747 Lightning Viewer Example: Improve Warning Message
The warning message is updated to cover the whole conditions.

Fixes: QTBUG-120482
Pick-to: 6.7
Change-Id: Ia11baf481510520dd250412d382616b9b25a8ac0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-01-08 16:14:44 +01:00
Kai Köhne fc73718913 Fix license of car-configurator example in the sources
Examples should be made available under the Commercial/BSD 3 clause license -- see e.g. QUIP-13 for this.

Pick-to: 6.7
Change-Id: Id12f62dc1f63363b8d4ab79ce3ac16d055e44c52
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-12-25 11:13:28 +00:00
MohammadHossein Qanbari 60cf689c6a Examples: Add LightningViewer (V1)
Implemented lightning viewer example using a web socket connection to
an AWS gateway for real-time lightning data visualization worldwide.
Supports both landscape and portrait modes for optimal screen
presentation. Added diverse map layers, including live data and
distance-time layers. Added functionality to toggle between different
map types. The lv_style is auto-generated using figma-style-generator
tool based on specified design requirements (see the task description
and comments for more details).

Fixes: QTBUG-116750
Pick-to: 6.7
Change-Id: I2507c9b030cb0c91d1a7cf51267770735a35419b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-23 00:07:03 +01:00
Sakaria Pouke 08d2700a81 Overhaul StocQt example
Implementing a new design and implementation for the StocQt example.
The new example uses Qt's REST API and json parser to read live stock
data.

Fixes: QTBUG-116593
Fixes: QTBUG-116594
Pick-to: 6.7
Change-Id: I2b491673bd7c9acb7812f88c508f42ad9cc9f869
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-22 20:40:50 +01:00
Nicholas Bennett 39074ca944 Fix menu icon on Android, fix initial msg not wrapping on small screens
The menu button icon did not appear on Android with the text method, so
added an icon svg to use on all platforms.

The initial label pop up was not wrapping on small screens so added a
height, modified properties to keep the original text size but wrap the
text.

Fixes: QAA-2183
Pick-to: 6.6 6.7
Change-Id: I2265e7558dfec839530b5f9b6a7a4129d7b081b2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-22 12:22:52 +02:00
Ulf Hermann 8fc3cd6675 Port samegame to qt_add_qml_module
This is a minimal port that only establishes the module structure
without touching any of the actual QML code.

Change-Id: I122156d15c0ee391f519b0894a51acad99551c5c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-12-21 17:32:56 +01:00
Mahmoud Badri f468fa1c27 Replace the Car-configurator example's car model
Also, other visual improvements are copied from the original QDS
 example.
* SceneEnvironment is replaced by ExtendedSceneEnvironment to enable
 some special effects that are used on scenes like glow effects and
 lens flare effects.
* The opacity of the headlights is changed for the desert scene.
* Light property changes are removed for the studio scene.
* Some unsupported behaviors on eulerRotations are removed.

Also, a bug is fixed for downloading assets
Previously if the unzip command was defined, and the zip file didn't
exist, the process used to give up with downloading assets from the
extracted files. But now, it will try to download the zip file, and
if there is a problem in the process, the rest of the files will be
downloaded from the extracted files.

A simple documentation file is added to the example to enable it in
example list.

Pick-to: 6.7
Change-Id: I4af85d9ea609a5ff20af0c381a096a7c2bbb6c31
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-21 15:16:42 +00:00
Axel Spoerl 0e35a8eaf1 Plugin documentation: Refer to Document Viewer Demo
Update code snippets to use JsonViewer as an example.
Add a section about loading plugins.

Task-number: QTBUG-119981
Pick-to: 6.7
Change-Id: Ied3dcba02ad275d16535ab015c49ce03ec0a0e30
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-12-20 11:28:58 +01:00
Rami Potinkara 33d02572d8 Docs: add QML Media Player and Dice to Mobile category
Task-number: QTBUG-117458
Pick-to: 6.7
Change-Id: Iccc2c7bc47118c21fce72f23ef489bb4476a8644
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-12-19 20:03:00 +02:00
Nicholas Bennett f167a114ea Docs: Coffee Machine application example app documentation update
Added material under Adapting to different screens.

Added section Navigating through the app pages.

Added material to Implementing start page and
Implementing Coffee selection sections.

Added code snippets that will replace the precviously used
\quotefromfile.

Added material to cover the rest of the code.

Added snippet identifiers to source code.

Removed trailing whitespaces.

* Fixed grammatical issues.

Fixes: QTBUG-116406
Pick-to: 6.6 6.7
Change-Id: I30c4d8a3f7a159d03df70b960059c11472f942bb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-18 06:26:05 +00:00
Fabian Kosmale fdd013a4c4 Fix type annotation in TodoList example
The type is ListModel, with a capital L

Pick-to: 6.6 6.7
Task-number: QTCREATORBUG-30077
Change-Id: I3a0ef104a3da696d54b7f9d38d6bffbd4f3d7d80
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-12-15 12:13:18 +01:00
Jani Korteniemi 81d6ddf857 Update Hangman demo to use Google Play Billing Library 6
Add version 6 implementation to build.gradle
Replace deprecated API references

Task-number: QTBUG-115373
Pick-to: 6.2 6.5 6.6 6.7
Change-Id: Ib5b452861dbd0d07c4828b2e33060d66e5448774
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-15 06:55:07 +00:00
Axel Spoerl 7a14d2ab93 Documentviewer demo / Quick3dViewer: Don't re-use quick view
The quick view used to display 3d files in a widgets application was
being re-used. If another viewer is launched and its contents become
visible in the main window scroll area, the quick view's window
container gets deleted, which causes deletion of the quick view as
well.

That makes the application crash, if an .obj file is viewed, followed
by another file type and then .obj again. The latter will crash.

=> Don't re-use the quick view any more.

Fixes: QTBUG-119175
Pick-to: 6.7 6.6
Change-Id: Ieea54f0a3377dfbc9ff3a07e5b99c80b472e5658
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-12-13 17:17:22 +01:00
Ed Cooke 697eaa086a Rewrite the calqlatr example to use responsive layouts
Implement the new design for the calqlatr example, including a
scientific/landscape mode. The animation controller has been removed for
practicality. Responsive layouts now handle changing between a portrait
and a landscape layout.

Fixes: QTBUG-118519
Change-Id: I1a33b1825a877b2b45afedc3a019a906c3f45d29
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-12-13 17:17:22 +01:00
Kai Köhne 75f8439515 Examples: Build tutorials/alarms in CI
The alarms example was not tested in the CI so far.

Pick-to: 6.7
Task-number: QTBUG-116489
Change-Id: I4ac00456b393a35dcf0e63651972bac45560fdaa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-12-12 09:02:51 +00:00
Kai Köhne 52b97cd6d0 Remove .qmlproject files from FX_Material_showroom example
The example uses cpp code to download assets. It therefore can't
be edited in Qt Design Studio, or run without main.cpp.

Pick-to: 6.6 6.7
Change-Id: I2d39bf3d91248ccec5a7892e108bb093e69de1e4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-12 09:01:58 +00:00
Volker Hilsheimer 53f3fc10de Hangman: fix build on Android
The Context object is no longer a POD-type. But we can rely on signature
deduction here anyway, so remove the explicit signature so that the
respective template overload is used.

Pick-to: 6.7
Fixes: QTBUG-119996
Change-Id: I6b15324b13f5d3e9d52b1ac9a29dc7a25965daab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-11 17:04:16 +01:00
Nicholas Bennett 4d21bd9e57 Add app icon for ios target to Dice example application
Updated the CMakeLists file, added the icon and json file.

Task-number: QTBUG-117125
Pick-to: 6.6
Change-Id: I2691c2e84e7ebc0b25bb34eece9a08f5e922eb58
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-08 09:55:43 +02:00
Nicholas Bennett 81d73cdbb5 Add Android icon and target SDK for dice example app
Added target SDK 33 with CMake and added icon for Android target,
using Qt creator to generate icons and the AndroidManifest xml
file. Gradle files were excluded.

Task-number: QTBUG-118513
Pick-to: 6.6
Change-Id: I57953099350017975702309496e4e4f1a87e9d1f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-12-04 09:02:05 +00:00
Nicholas Bennett 232d968fd2 Doc: Remove unused groups
Remove qtpurchasing-examples, android-examples io-examples ingroup
commands. There is no matching \group page defining these.

Pick-to: 6.5 6.6
Change-Id: Iba5e6bfa533f929ad15b476329aa58915d3f550d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-03 16:23:45 +01:00
Kai Köhne 7a832db7e1 Remove unneeded license file from coffee example
The font file was removed already in commit b40aaf48ca, along
with the qt_attribution.json file, so we should also remove
the font license file.

Note that the font is still referenced in some .qml files,
but we don't ship it anymore.

Change-Id: If67f0f9ecd5ef3b3a86ab610d2e36b0ce307d8f6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-03 11:00:30 +01:00
Kai Köhne c31ad31f02 Doc: Remove tweetsearch example
The documentation for the example was disabled since commit
012384be6a (6.0), so the example was little used. It also
requires a Twitter developer account, which costs at least
100$ / month (https://developer.twitter.com/en/docs/twitter-api).
So probably not worth to keep the example.

Change-Id: I75e4a67a5525d49e9857703d5932081d697a68a6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-12-03 10:38:23 +01:00
Kai Köhne bc427f00da samegame: Fix warning about undeclared function parameter
Task-number: QTBUG-119203
Pick-to: 6.5 6.6
Change-Id: I92497a7c907d0382d037690bf7803650c665b77e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-12-03 10:38:16 +01:00
Mikko Hallamaa d48dab50b5 Media player demo: Fix audio track reverting to "No track"
In the Media player demo, when an audio file was played, the audio track
reverted to "No track". This was because the audio track index was set
to follow the selected video track index. This is now fixed.

Additionally fixed some warning spam caused by a missing function return
type.

Fixes: QTBUG-117647
Pick-to: 6.6 6.5
Change-Id: I3b8f331f23ff6a677785bc7456ee1cbc64f27842
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2023-11-27 13:30:42 +01:00
Mahmoud Badri fc8b38547b Add car-configurator demo
Fixes: QDS-10742
Change-Id: I3d9caf71039a9830595c97e7d944739beb81ab23
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-24 16:14:56 +02:00
Nicholas Bennett e206f909dd Add app icon for ios target for calqlatr demo app
I Followed instructions at https://doc.qt.io/qt-6/ios-platform-notes.html
about app icons.

Fixes: QTBUG-118576
Pick-to: 6.6
Change-Id: I471065f98a59611522dfc037713e9fc59ed90f60
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-24 13:27:30 +02:00
Konsta Alajärvi b40aaf48ca Re-design for Coffee Machine example
Implementing new design for Coffee Machine example, more information
on how the new design is going to look like in QTBUG-116402 and in
its subtasks.

Removed unused imports folder.

Changed the names of Home.ui.qml to Home.qml and FilledCup.qml to
Cup.qml in Coffee.qrc file.

Changed the names of the files stated above also in qmldir.

Fixes: QTBUG-116403
Fixes: QTBUG-116402
Task-number: QTBUG-116404
Change-Id: Ib4d33e28ce1e3f268172007e85f36eb1280d11a4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-24 11:42:21 +02:00
Wladimir Leuschner 0bb20e154c Decrease rounding radius/transparency in Thermostat Example SmallLayout
Fixes: QTBUG-119290
Pick-to: 6.6 6.5
Change-Id: I9fcad3e6c234e82993e68688828383ba4a1a9ed6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 20:18:41 +00:00
Wladimir Leuschner acf8f0a418 Hide Settings Tab for SmallLayout/Portrait in Thermostat Example
Settings Tab and Theme Change Icon have the same functionality.
This patch removes the Settings Tab, when the Theme Change
Button is visible on the top right.

Fixes: QTBUG-119294
Pick-to: 6.6 6.5
Change-Id: I079d2c7a597111716391e21ebb46dbd1d908abc3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner 26742b74aa Fix Thermostat Swipe Rooms View in Thermostat example
Thermostat room view is going to the first item, when end of rooms list
is reached and the user wants to go to the next room. Analogous, the
user is sent to the last room when selecting the previous room while
being in the first room.

Fixes: QTBUG-119320
Pick-to: 6.6 6.5
Change-Id: If8c18c40ba903ba1b670f122676da6e0eff6c08e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner 88a884904c Fix room icon binding in Thermostat Control page in Thermostat example
Fixes: QTBUG-119297
Pick-to: 6.6 6.5
Change-Id: Ibdc9edfa237decc2754379d4f4b7d6acc34941af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner abc8baa05f Fix typos in Thermostat example
Fixes: QTBUG-119286
Pick-to: 6.6 6.5
Change-Id: I6af6fc849aa40e025b059f601cc833625bca4212
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Axel Spoerl eea2929d84 Documentviewer: Make AbstractViewer shared/static, depending on build
Make the abstract viewer class static if the build is static, shared
otherwise.

Fixes: QTBUG-118754
Fixes: QTBUG-118672
Pick-to: 6.6
Change-Id: Ic98c932b6c91242e79b022a38653f434b108330d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-11-23 14:29:03 +01:00
Nicholas Bennett fbf7ed4a15 Examples: Fix the calqlatr icon to include the background
Updated the icon files to the correct icon file.

Pick-to: 6.6 6.6.1
Change-Id: Idb1dea732469b9fe6264c4262dbdb60a70da4a80
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-22 08:18:48 +02:00
Nicholas Bennett 44ae46c700 Set calqlatar app target SDK level to 33
I added the target sdk property to the app target,
refactored to use set_target_properties.

Pick-to: 6.6 6.6.1
Change-Id: Ie3796ac23a77916ee65420d9923386a0252b1c04
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-16 12:41:48 +02:00
Bartlomiej Moskal d0ab362010 Fit Mediaplayer example to smaller screens
Playback control panel of Mediaplayer example did not fit to smaller
screen. It happened that playlist button goes outside of screen on
Android devices.

To make it fit, two icons (Rate_Icon and Mute_Icon) will be hidden on
smaller screens. Also some spacing will be smaller for portrait mode.

Pick-to: 6.6 6.5
Fixes: QTBUG-118043
Change-Id: Ic562ae7349f0b5d6b39b031dad9c4a4108027f7e
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-10 08:59:33 +01:00
Axel Spoerl 504e818821 Documentviewer demo: Add quick3d plugin
Add a plugin to show 3d files in QtQuick3D.

Change-Id: I0dcb51f0508a8f677a39f31cdb50f13890a635e5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-11-02 14:10:25 +00:00
Nicholas Bennett 17cba7876e Add icon to calqlatr demo application for Android targets
Used Qt Creator to add the icons and updated the CMake file to use
the custom manifest.

Task-number: QTBUG-118513
Pick-to: 6.6
Change-Id: Icdf0b877d9860f911e615ae8a12d820f5b701e71
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-30 08:29:00 +00:00
Kai Köhne a361773e65 Show FX & Material Showroom example also in DataVis&3D category
Pick-to: 6.5 6.6
Task-number: QTBUG-117219
Change-Id: Ifbba1fd666fd9c239ff46ea241923e6974e13ae9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-10-26 11:12:27 +00:00
Kai Köhne 7132a75c18 Add 'Coffee Machine', 'Thermostat' example to Embedded category
They are good application examples, but also work well for showing
how to use Qt for embedded use cases. So let's have it in both.

Pick-to: 6.5 6.6
Task-number: QTBUG-117210
Change-Id: I8edbd82c5c8f8f7b804a0fec4743ec3b3c05cf07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-10-26 09:13:46 +00:00
Mate Barany 555425d71b Rename Qt Quick Demo - RESTful Color API client example
...to improve visibility for search engines.

Pick-to: 6.6 6.5
Task-number: QTBUG-114713
Change-Id: Ie9d3dbbdd802c8dbfcd28fe25d794b53ee32533f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-10-25 14:25:25 +02:00
Nicholas Bennett 045ad9a5f0 Docs: Update MediaPlayer Application Example documentation
Added images, snippets and overviews.

Fixes: QTBUG-116259
Change-Id: Ib3caf3a7c0e5d2d9d2145690f0fe2456b0e2d344
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-10-20 12:10:36 +00:00
Axel Spoerl 459e09b485 Documentviewer demo: Centralize disconnect
Viewer plugins may connect to the central back/forward buttons.
If they disconnect those explicitly in their cleanup methods, the
buttons are nullptr when the application is closed. This lead to a
warning.

Save the QMetaObject::Connection object in a list in Abstractviewer
and directly disconnect it from AbstractViewer::cleanup. That way,
QObject::disconnect is never called with a nullptr argument.

Amends 1f6505a0cf.

Pick-to: 6.6
Change-Id: I4fee76d507f3329fef31e6c9171694ea82914239
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-10-20 10:39:09 +02:00
Kai Köhne 662d283ba3 Categorize Same Game as Application Example
Also simplify name to 'Same Game'.

Pick-to: 6.5 6.6
Task-number: QTBUG-117207
Change-Id: I6c16698bea3bc853ac7632d058e5f6c65a55a1d8
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-10-17 06:56:02 +00:00
Jakub Wincenciak 182521e226 Fix bug in Coffe example causing app stuck when user made a second coffe
The bug was due to the fact that when the coffee was finished brewing,
the state was being set to "initial" which was unnecessary.
So I decided to remove this part of code, which solved the bug.

Task-number: QTBUG-114375
Pick-to: 6.5 6.6
Change-Id: I7c8cbc96330574f0378ea8d1ee3ac2a4732f70e3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-10 10:40:53 +02:00
Axel Spoerl 1f6505a0cf Documentviewer demo / PdfViewer: Disconnect forward/back buttons
Add missing disconnect statements in PdfViewer::cleanup().

Pick-to: 6.6
Change-Id: I48dbc14f7dc2105e6310f50e4d48afa66388aed4
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-10-09 17:30:16 +02:00
Mitch Curtis c6a2a9ed4a Improve calqlatr example
- Fixed code formatting.
- Clip the contents of the ListView containing the operation history to
  prevent it from spilling out into other UI elements.
- Update copyright year.
- Simplify some expressions.
- Replaced root scope lookups with direct access to JS functions.
- Make calculator.js a library so that it can be imported by
  other QML files without duplicating its state.
- Replace "var" with "let".
- Replace == and != with === and !==.
- Simplify key event handling.
- Removed unused ids.
- Fix unqualified accesses.

Fixes: QTBUG-54267
Pick-to: 6.2 6.5 6.6
Change-Id: I0d8e8f1d9b3cfe8123fd98b8c280dc3ff4bd86a0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-10-06 16:54:46 +08:00
Axel Spoerl 16d096709f Documentviewer demo: Darwin fixes
Remove definitions of onActionOpenTriggered() and
onActionQuitTriggered(), the implementation of which has been removed.

Change the required binary directory from "macOS" to "MacOS", to find
plugins correctly.

Fixes: QTBUG-117694
Pick-to: 6.6
Change-Id: Iba7d7c07e2881d2e8c4dce4b58f34a6441e8b467
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-10-04 15:26:39 +02:00
Axel Spoerl f906b6f0e6 Documentviewer Demo: fix plugin search on Windows
The plugin dlls are located in the "app" subdirectory of the
executable's path.

Search there.

Fixes: QTBUG-117691
Pick-to: 6.6 6.6.0
Change-Id: I467e90344e0a85384e8e06393fe41a98f1904bfc
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-10-02 07:01:58 +00:00
Marc Mutz 8ca6cd6c97 PdfViewer: port to new QPdfPageSelector API
QPdfPageSelector changed from being a QSpinBox to just a QWidget that
has-a QSpinBox. This code shows why that was a good idea: users are
supposed to call setDocument(), not manipulate QSpinBox::maxiumum()
manually.

Pick-to: 6.6 6.6.0
Fixes: QTBUG-116987
Change-Id: I35ed7786b7e257c8c9aba70671d739db02d7589d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-09-18 07:14:52 +00:00
Rami Potinkara 5471028e6b Update mobile example categories for Qt 6.6
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both Android and iOS.
Remove from the ones that do not work for both (at least yet).

Added, as verified on Android
-calqlatr
Removed (for now), as not verified yet on Android
-todolist
Removed (for now), as not valid anymore nor verified
-qtpurchasing-overview

Fixes: QTBUG-116780
Pick-to: 6.6
Change-Id: I937a90fe54ff87f29cf32627356aa5a65dd51d43
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-11 13:21:52 +00:00
Kai Köhne d4a134f2e5 Examples: Check for availability of Quick3D at configure time
The examples do not need to link against Quick3D, but they use Quick3D
QML import. Qt Quick3D is an optional component in the online installer
though, so its easy to miss. By adding Quick3D to find_package(),
we exchange a runtime error with a configure error in this case:

  error: Found package configuration file: C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND.
  Reason given by package: Failed to find required Qt component "Quick3D". Expected Config file at "C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6Quick3D/Qt6Quick3DConfig.cmake" does NOT exist

Pick-to: 6.5 6.6
Task-number: QTBUG-114998
Change-Id: I092068c5055d329769986da8d39605cb1bae3a4f
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-09-09 16:52:39 +02:00
Friedemann Kleint ac5e3ca3c2 MediaPlayer demo: Add a Python driver
Task-number: PYSIDE-2206
Change-Id: I75961a0b1fac74808627483a4274c5eb078a0de2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-07 12:42:49 +02:00
Nicholas Bennett bc2e698936 Docs: Update dice example app documentation
A had initially intended to expand this documentation more exhaustively,
however, I decided that example documentation that describes each discrete feature already exists.
Added sections, expanded a bit, referenced existing applicable example
documents, and the fact that this example will be available already
built for Android in the Google Play Store.

Fixes: QTBUG-114599
Pick-to: 6.6
Change-Id: Id989d82a40fb95808a42aa1b497b4d76161b5d74
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 04:11:45 +00:00
Nicholas Bennett 62b33327c0 Dice Demo: Add sound effects and shake to roll
Added the features in line with the spike outcome.
In addition, I modified the spawnDice function to
estimate if all dice are at rest before enabling spawning.
This prevents duplicate shake events and double tap
fumbles.

Task-number: QTBUG-116491
Pick-to: 6.6
Change-Id: Ia0dc59e469e008da5fc3afe2a7342381eadc1008
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 03:40:04 +00:00
Kai Köhne 5f6a5f87be Doc: Hide attributions for example icons from overview
The code is only used in an example.

Fixes: QTBUG-116580
Pick-to: 6.5 6.6
Change-Id: I9a045d128a8f36e442ab38dd2fee0d84b31511e2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-08-30 12:48:04 +02:00
Topi Reinio f39470f7cd Doc: Add missing \image command to Text Viewer Plugin Example
Fixes documentation warning:

(qdoc) warning: demos/documentviewer/plugins/txtviewer:
    Example documentation should have at least one '\image'

Pick-to: 6.6
Change-Id: I6ceee59e42358c7fb67c332529d184d99e103513
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-08-29 14:31:45 +00:00
Topi Reinio d9561a5e6e Doc: Fix documentation issues
Fix link targets for section titles that are incorrect or were changed
elsewhere in the documentation.

Also,

doc/src/howtos/installer-cli.qdoc:

* Style double-dash in the section title with \tt. Without \tt, QDoc
  interprets -- as 'en dash'; the output is incorrect and the special
  character also prevents linking to the section title.

examples/demos/documentviewer/doc/src/txtviewer.qdoc:

* Add missing end delimiter for the comment block, and fix linking to
  the parent example (Document Viewer).

Pick-to: 6.6
Change-Id: Ic660fa66e6ce87046664771349e3720f51c90352
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-08-29 12:38:38 +00:00
Assam Boudjelthia 4ebeb2ddcd Small fixes media player example on Android
* Explicitly link to MediaPlayer module so it gets packaged to the APK.
* Allow the example to user nameFilters after the fix
0f4181919663e85ddc142456b357dcde3d0a4a7f.

Pick-to: 6.6
Change-Id: I16c2feccb90ce7448ae24d03868fbedf3c449e66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-08-28 11:39:36 +03:00
Inkamari Harjula aa5a3ae5d6 Doc: Add example categories to qtdoc examples
Added categories to qtdoc examples.

Task-number: QTBUG-116430
Pick-to: 6.5 6.6
Change-Id: I91adf8b2d4af083181b2203da8dec44d6b17f606
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-28 10:47:07 +03:00
Kai Köhne 054c18b0d3 stocqt: Use named signal parameters
Fix QML runtime warnings:

qt.qml.context: qrc:/demos/stocqt/content/StockListDelegate.qml:99:13 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/demos/stocqt/content/StockListDelegate.qml:63:13 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.

Pick-to: 6.5 6.6
Change-Id: I2d3d5fe6db56456777d7df0c8fbfda970994a22e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-08-27 15:40:08 +02:00
Kai Köhne 0183fa1a97 Build FX_Material_Showroom example again
Revert removal of the example from the default built that was done in
3f9c25bdb7 8941da8b40. Use different names for the clashing CMake
targets.

Pick-to: 6.5 6.6
Change-Id: Ife9b796fa416091505acfd9b5f59cc4ea6ab93f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-22 12:27:35 +02:00
Friedemann Kleint b2b0d99dbe MediaPlayer demo: Move icons around
Move all icons in an "icon" folder of the respective module.
Rename Config.iconSource() to Config.iconName() and change it to just
return the icon name according to theme without any path.
Add 2 singletons to each module providing iconSource() functions
doing the lookup relative to their locations.

Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: I8e74ce633400ae170f0fdb467a2ae65f172319b8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-08-21 11:13:14 +02:00
Topi Reinio 17f35126dc Doc: Fix broken links
Remove links to examples that no longer exist, and fix linking to
page/section titles that have changed.

Fix other minor issues in passing.

Pick-to: 6.5 6.6
Change-Id: I6420fd7319e021f8a31f1776b31fabd05631c145
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-08-17 07:31:47 +00:00
Kai Köhne 0bc36e534e Dice: Extract calculation of 45degrees
Don't calculate this inside the for loop.

Pick-to: 6.5 6.6
Change-Id: I09d46e363325071086332d901235f0feeabbb474
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-08-14 18:25:28 +02:00
Kai Köhne 94d585bc44 Doc: Fix links to AnimationController in Calcqlatr example
Both QtQuick and Qt3D feature an AnimationController type. Make sure
the right one is linked to.

Pick-to: 6.5 6.6
Change-Id: I292765f5ccc7fcd8228e461fc375b0a9b71768d6
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-08-14 18:25:05 +02:00
Kai Köhne 0f05ed1e01 Examples: Explicitly mention Quick3D requirement in the documentation
Quick3D is an optional component in the online installer. As the examples are part of qtdoc,
they are however installed & available also if Quick3D is missing.

Let's at least mention the dependency in the respective examples' documentation.
Add a general 'Running the Example' section if missing, too.

Pick-to: 6.5 6.6
Fixes: QTBUG-114998
Change-Id: If4d3b48b3d0352a0359f6962d4eb1bc2e1e67c95
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-08-11 13:58:36 +02:00
Friedemann Kleint 5462256d17 MediaPlayer demo: Create a loadable module
Establish a common file layout allowing
Python and C++ to use loadFromModule().

Add a manually created qmldir file for usage by Python and the qml tool
(note CMake will still generate its own).

Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: Idf2564ed84bd6c95e76dacdfbc0a9691c64e5f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-07-28 10:49:16 +02:00
Jonas Karlsson 41625c4721 Dice example: remove workaround
The bug is fixed but the workaround was actually not needed to begin
with since the bug only affects nodes with a position and a parent with
scale which is not the case here.

Pick-to: 6.5 6.6
Change-Id: I99766586d2671b3286085d54c7cf8cca7e0f9b7b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-07-17 12:09:56 +00:00
Kai Köhne a57fb42070 Fix build of FX Material Showroom example on Windows
* Shorten the file names for *plugin.cpp by specifying
  a CLASS_NAME.
* Add sources from Qt Design Studio components instead
  of cloning from qtquickdesigner-components.git. This
  avoids issues with the very deep directory structure
  of above repository.

While at it, move also the MaterialBundle plugin from
asset_imports to just imports.

Task-number: QTBUG-115108
Pick-to: 6.5 6.6
Change-Id: I63d5fde474fbda93cfabec20e2349854755cc4cb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-07-17 13:23:02 +02:00
Friedemann Kleint de79604a91 DocumentViewer demo: Remove code making the JSON model editable
It is a viewer after all, with no save functionality.

Pick-to: 6.6
Change-Id: I9a6f2c2809719abe33238b23a30cc9a06dc43c19
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-05 11:57:26 +02:00
Friedemann Kleint 5e62422bcc DocumentViewer demo: Small polish of the PDF plugin
Apply a few fixes that were already done for the other plugins.

Pick-to: 6.6
Change-Id: I3b94547023f77952a670cb7c0385b15e7ddd03ce
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-05 09:06:18 +02:00
Friedemann Kleint 843367eac0 DocumentViewer demo: Fix warnings about closed QIODevice when paging PDF
Apparently, QPdfViewer needs an open file.

Pick-to: 6.6
Change-Id: I891f6eeb5a96344bdfce483e77c67b80b1666676
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-05 09:06:14 +02:00
Friedemann Kleint 09cb56314c DocumentViewer demo: Actually build the PDF plugin
Pick-to: 6.6
Change-Id: I29f7dacd1c57d87505894e54918c5d2f53626378
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-05 09:06:11 +02:00
Friedemann Kleint 17e7109f01 Examples: Use consistent organization names and settings paths
Set the organization name to "QtProject".
Set an application name to Hangman to be used by QSettings.
Remove unused QSettings instance from Thermostat.
Let QSettings in Document Viewer use defaults.

Pick-to: 6.6
Change-Id: I8ebaeb444cd18bab95424f0efea670b02d41e657
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-07-04 13:43:26 +00:00
Friedemann Kleint 9c7d96e376 DocumentViewer demo: Remove OpenMode from class RecentFiles
A document viewer typically uses read-only.

Pick-to: 6.6
Change-Id: Ic5a601c0b5af9d0e97a47368d71e8daa9e5e0244
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 07fbbb3bec DocumentViewer demo: Streamline enumerations of class RecentFiles
Remove unused values and introduce Other for a number of RemoveReasons.

Pick-to: 6.6
Change-Id: I6ea170cac0dc04d0b5d9326441be5519ad544ba0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 7f3ffeee2f DocumentViewer demo: Remove unused signals of class RecentFiles
Pick-to: 6.6
Change-Id: I28c634948b802454e523409d60eafce7e8b9ed20
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint d19a179e75 DocumentViewer demo: Remove unused variables
Pick-to: 6.6
Change-Id: I4d94bb8126749468fb28daa593390f1da0da6a7c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 2378671318 DocumentViewer demo: Do not derive class RecentFiles from QStringList
Inheriting containers is considered bad practice and also not
possible in Python.

As a drive-by, change the loop removing dangling files and duplicates
from range based for to index-based, as actually removing a file
would invalidate end().

Pick-to: 6.6
Change-Id: I826aebe1000d412d94e63a0564db7485b9550ca5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Kai Köhne 8c0e710650 MediaPlayer example: Use camel case for menu entries
Pick-to: 6.5 6.6
Change-Id: If56f3014d3550ef237cb7ed513234a7b5dfc23aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2023-06-30 15:37:11 +02:00
Friedemann Kleint e6459c530f MediaPlayer example: Add filters to the file dialog
Add filters and pre-select MP4.

Pick-to: 6.6
Change-Id: I36d47602607a0201631b0c948efbaa8f3b3cb3d2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-06-29 16:21:31 +02:00
Friedemann Kleint 01505ae868 DocumentViewer demo: Remove unused <concepts> include
MSVC is complaining about it.

Pick-to: 6.6
Change-Id: Ifd85c48971cef5b62fbac4d1d5901a066c8d511c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-29 14:01:59 +02:00
Friedemann Kleint 96fadad46a DocumentViewer demo: Introduce a .qrc file
Add a .qrc file, which can be browsed in Qt Creator.
Remove the hard-coded build paths from the .ui file, which prevents
it from being used for Qt for Python.

Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: I4ed7de87c79c964da1d0adaa9330fbab137de1e8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-27 15:17:22 +02:00
Friedemann Kleint 943ec55d78 MediaPlayer example: Handle the command line argument "source"
Make it a required property which is always set with a check.

Pick-to: 6.6
Change-Id: I7771bcbe7b3ccc798b885682135d501e2d4d60ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-27 14:15:40 +02:00
Kimmo Leppälä bdc0409d1f Add Todo List example to Mobile category
In addition to Application Example category, Todo List is added to
Mobile category

Pick-to: 6.5.2 6.5 6.6
Change-Id: Iabad05dfe24ecc9e9f188495b5aba65ec4132eda
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
2023-06-27 12:36:34 +03:00
Kimmo Leppälä 2576db7f0e Add Media Player example to Mobile category
In addition to Application Example Media, Player is added to Mobile
category

Pick-to: 6.5.2 6.5 6.6
Change-Id: If4ba1813006fae626c6ea4a16f19bee34fc08f43
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-27 09:36:26 +00:00
Axel Spoerl c56673c241 Replace Application example by documentviewer's TxtViewer plugin
This patch adds a snippet based documentation of TxtViewer's code with
the target to replace the Application example in widgets.

Pick-to: 6.6
Change-Id: I25045c8f710ae110398e71099c276571cb32ecf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-26 16:06:31 +02:00
Friedemann Kleint d5e81b7fa0 MediaPlayer example: Point the file dialog to the video directory
Pick-to: 6.6
Change-Id: I8c3cf40a36429b9480d27a5e483b3a90a89381dd
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-26 15:12:58 +02:00
Kai Köhne 68e3af8836 Dice example: Add tags
Pick-to: 6.5 6.6
Change-Id: If2dc727786ae7e4ca582fb7268a96c8e2657b875
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-26 13:40:11 +02:00
Kai Köhne 67d2885605 Reformat .qml files in dice example
Use qmlformat -i on all files.

Pick-to: 6.5 6.6
Change-Id: I163d1faf281fc085b824e092056cebe57fce5a6b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-22 17:27:34 +02:00
Axel Spoerl fcfcd657f5 thermostat demo: Fix icon path
When the path for CustomControls was changed into
ThermostatCustomControls, the icon paths in qt_attribution.json were
not adapted.

This patch updaes it.

Task-number: QTBUG-114759
Pick-to: 6.5.2 6.5 6.6
Change-Id: I8ec1ea85612f4a70d6baa99223e15a6c12ae4891
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2023-06-22 08:06:43 +02:00
Axel Spoerl 5682c13aa8 DocumentViewer demo: Replace connect-by-name with explicit connect
Replace autoconnections with old_style_slot_names by explicit connect
statements with camelStyle.

Pick-to: 6.6
Change-Id: I1e1ddee064ee183c4baba3253c69eae7931ad459
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-21 21:41:59 +02:00
Friedemann Kleint 6536439d44 DocumentViewer demo: Use modern string literals
This unearthes that JSON should convert from UTF-8.

Pick-to: 6.6
Change-Id: If155b745cac0579232b927a3988588204c31d207
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-21 15:04:51 +02:00
Kai Köhne 1740e27054 Fix license specification for example sources
Examples should be available under Commercial/BSD-3-Clause, not GPL.

Pick-to: 6.5.2 6.5 6.6
Change-Id: I0599bd69a7b850cdae04c26f8af0eb98a6583221
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-21 15:04:51 +02:00
Topi Reinio dc659775c4 Doc: Fix file quoting in Document Viewer demo
Adapt the file quoting command in the documentation to match changes
in the source code.

Pick-to: 6.6
Change-Id: I6f3a93b4efff8df8d7cd6f8244b610b1ad93e4ba
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-21 11:34:19 +00:00
Kamil Hajdukiewicz 8ce518b898 Rename CustomControls module in thermostat example
The name of the module is changed from CustomControls to
ThermostatCustomControls due build errors.

Fixes: QTBUG-114759
Pick-to: 6.5.2 6.5 6.6
Change-Id: I86cf9830700b867a4a690d0f41841417bfa1efc1
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-21 12:02:47 +02:00
Kai Köhne 1ac93ad9ca Thermostat, TODO List: Remove unused QDS components
The QDS components are built by default, which generates a lot of
warnings by qmlsc, and also creates issues on Windows due to
too long paths. But they are not used, so we might as well remove
them from the examples.

Pick-to: 6.5.2 6.5 6.6
Change-Id: Ie932b05c88f07793a95e4980cb4f63aa0a58229e
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-21 12:02:46 +02:00
Topi Reinio e4d17474a2 FX & Material showroom demo: Use correct \example path
The argument passed to \example must be a valid path to the example
project directory, relative to 'exampledirs' variable in .qdocconf

Pick-to: 6.5.2
Change-Id: I94cdb7ddbce899d45c59af278d71c49cb0580f0e
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-21 05:15:12 +00:00
Jonas Karlsson 34ecd60038 Add the 'dice' example
Fixes: QTBUG-113600
Pick-to: 6.5 6.5.2 6.6
Change-Id: I13b8327f2dcf3e7eaec80c7c10038b22a1656df3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-21 00:50:04 +02:00
Axel Spoerl 3c4337653b Fix string literals, tr() usage and includes in PdfViewer
Re-order includes and replace const char * usage by tr() or string
literals.

Pick-to: 6.6
Change-Id: If8b21647c09621e4240bac63aafcae301a741367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-21 00:50:04 +02:00
Friedemann Kleint 818c4b6468 DocumentViewer demo: Improve file dialog handling
Loop in the open dialog until opening the file
succeeds so that the directory is not reset.

Set a suffix for saving.

Pick-to: 6.6
Change-Id: Ic5a83d13148cfc16e5605abed7a2d965b6a6d149
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:05:10 +02:00
Friedemann Kleint a212b57f25 DocumentViewer demo: Fix tr() usage
Try to avoid concatenating translated texts and parameters; this may
not work in all languages. Use QDir::toNativeSeparators() for file
names.

Pick-to: 6.6
Change-Id: I00c058a91cab04c04580045229350ba3d9951d5e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:04:37 +02:00
Friedemann Kleint e00a8ad305 DocumentViewer demo: Reorder includes
Remove unused forward declarations and includes; reorder by module.

Pick-to: 6.6
Change-Id: Id9468d1fdb2685df44f2b4a9407c6b12ac2859f3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:04:26 +02:00
Friedemann Kleint c35c18ff2c DocumentViewer demo: Some modernization
Pick-to: 6.6
Change-Id: I2169e8a109f30b6e4f18a4e2bce9d529c0096a5a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 14:53:55 +02:00
Friedemann Kleint 6d1c824061 DocumentViewer demo: Fix print support
Pick-to: 6.6
Change-Id: I1b9a73ee39838bef7b1d535d2ff99dfd0f71dea8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 14:53:14 +02:00
Kamil Hajdukiewicz 3f9c25bdb7 Revamp Thermostat example 2
The new responsive design of Thermostat Example is implemented.
The application is prepared to look good on desktop, mobile and small displays.

In the current state only part of the application is prepared.
Schedule View is not ready.

What is done:
1. Rooms View
2. Thermostat Control View
3. Statistics View
4. Dark/Light mode

Pick-to: 6.5.2 6.5 6.6
Change-Id: I52d07b7001b1f78025d74ab827e58b5d23b2dedb
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-06-20 12:48:37 +02:00
Kimmo Leppälä 0fec2b85bc Fix FX Material Showroom documentation image suffix
Pick-to: 6.5 6.5.2 6.6
Change-Id: Ia4aa1ea7181dd803afc42bcaba61aaf7e58391f7
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-20 10:09:28 +00:00
Axel Spoerl d4c2b89094 FxMaterialShowroomApp: Fix broken qmlcomponents file
CMAKE_PROJECT_NAME is used in the qmplcomponents file, referenced by
CMakeLists.txt. This is bad practice for Qt examples, which works only
if the example is built standalone. If it is built as a part of a
submodule with examples, it expands into "Qt". This doesn't exist and
breaks the build.

This patch replaces the variable with FxMaterialShowroomApp.

Pick-to: 6.6 6.5.2
Change-Id: I1aad1218d44103ae6227f064121be1ea2a523ebe
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-06-20 09:34:56 +02:00
Axel Spoerl 01b7e2d091 DocumentViewer demo: Make plugins re-usable
The DocumentViewer demo was originally developed as a self-contained
application. Its dependency to PdfWidgets has lead to splitting it up
into plugins: ba61af0bf3

The new architecture re-uses the viewer objects, but it doesn't reset
them properly. This is why viewer-specific UI-assets (menus, toolbars
and buttons) get duplicated.

This patch adds cleanup functionality and removes duplications.

Fixes: QTBUG-114615
Fixes: QTBUG-114617
Pick-to: 6.6
Change-Id: I4f123f8a69be978f992531603b15de71069d5a66
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-20 09:18:32 +02:00
Axel Spoerl 6cefb818b3 DocumentViewer demo: Don't rely on Qt Designer standard icons
Not all standard icons provided Qt Designer are visible in macOS.
(e.g. docoment-open, document-open-recent)

This patch ships fallback icons with the example.

Fixes: QTBUG-114620
Pick-to: 6.6
Change-Id: Id133ce4ae1c77bff411cd07c2b2b2ef1f62d4336
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-20 04:37:17 +02:00
Axel Spoerl 394839e0d4 DocumentViewer demo: Warn about unsupported mime type before defaulting
When a file is opened and its mime type is not supported, the demo
falls back to TxtViewer.

This patch adds a warning popup to notify the user in that case.

Fixes: QTBUG-114614
Pick-to: 6.6
Change-Id: I5794d0013ecaac37934ac56c4a642998baa65e0a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-20 04:37:17 +02:00
Thomas Hartmann 910e28a7f1 Fix qmllint issues in coffee demo
* Removing usused imports
* Removing versions from imports
* The state property is a string

Change-Id: I2a7c8de17c414a20984830b964f9386f92a2cb00
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-19 17:47:33 +00:00
Axel Spoerl c8b3c09355 Documentviewer Demo: Turn AbstractViewer class into static library
abstractviewer.cpp is compiled 3 times, once for each plugin.
That leads to duplicate symbol compiler warnings on macOS and makes
the demo unusable on macOS.

This patch turns the class in to a static library and links it into
the plugins.

Fixes: QTBUG-114370
Fixes: QTBUG-114618
Pick-to: 6.6
Change-Id: I7c785e4d463bc908c8df707f1a45301731c4da35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-19 19:47:33 +02:00
Mahmoud Badri c77719ff5d Add FX & Material showroom demo
Fixes: QTBUG-113477
Pick-to: 6.5.2
Change-Id: I2cdd68027224516b6e6ddacad99d06b6a4dc1ba0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-06-19 15:15:11 +03:00
Kimmo Leppälä 91e3396421 Doc: Add ToDoList example to application category
Pick-to: 6.5 6.6
Change-Id: I0c6a1278bd93919e3aeb63f3c87f717d13dbb76b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-19 11:44:52 +03:00
Amir Masoud Abdol 6c889caceb Use the target name explicitly instead of ${CMAKE_PROJECT_NAME}
Otherwise, this can break the top-level build with:

  `install TARGETS given target "Qt" which does not exist.`

Pick-to: 6.5 6.6
Change-Id: I503319fed3c5d5b49fda38a5c6d55db270793b8f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-17 19:39:33 +02:00
Paul Wicking 1261ff785c Doc: Fix typo in demo
s/thow/the

Task-number: QTBUG-114618
Pick-to: 6.6 6.5
Change-Id: I39b770063e8ee33f84cf348ca7655a4ee6033b38
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-06-17 16:34:44 +02:00
Amir Masoud Abdol ee0cdb359c Rename mediaplayer demo/example to MediaPlayerApp
The same example exists in qtmultimedia, and it is using a similar
target name as well, which can breaks the top-level build, so we need a
new name for it. I thought since this is a demo project, and it's an
app, we can name it like the ToDoListApp.

Pick-to: 6.5 6.6
Change-Id: Ia91786f7a32e1263157091b10683cd5294c292a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-17 04:59:28 +02:00
Amir Masoud Abdol 6d8609cee2 Adjust the path for qtdoc/demos
Pick-to: 6.5 6.6
Change-Id: I25ee66a178db832554276ef66dcd1f94ab925240
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-17 04:59:16 +02:00
Axel Spoerl 5c2d5701b5 Fix cmake install TARGETS statement in todolist demo
The TARGETS statement was given ${CMAKE_PROJECT_NAME} as an argument.
That works in a stand alone build of the demo. If the demo is compiled
as part of a toplevel or qtdoc build, the project name will be "Qt".
That doesn't exist and breaks the build.

This patch changes the argument to "ToDoListApp".

Fixes: QTBUG-114592
Change-Id: Ic5311718cbb6250175355e60b0b6eebaf1165e8b
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-06-15 16:37:30 +02:00
Kai Köhne e1220042e6 Doc: Add more examples to Application Examples category
Add following examples to Application Examples category:

* Robot Arm Example
* Qt Quick Demo - RESTful Color Palette API client
* Media Player Example
* Document Viewer

Pick-to: 6.5 6.6
Change-Id: Ie36bb9a09d7fe868db07e02edcb1778f214494e9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-06-15 11:07:40 +02:00
Amir Masoud Abdol 8b6976b931 Resolve a duplicate target name issue
Both robotarm, and todolist examples were creating `content` target
which was breaking the build if both examples were activated.

Pick-to: 6.6
Change-Id: I0922765526f2fca861c16b1ced4f1c040c104adc
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-13 13:03:40 +02:00
Kimmo Leppälä 7c15387604 Fix Calqlatr example to follow Qt6 example guideline
Set basic style for the application to get rid of "The current style
does not support customization of this control" warning in
CalculatorButton.qml.

Task-number: QTBUG-108751
Pick-to: 6.5 6.6
Change-Id: Id9b8305238404088fd24d4e128a753728558f10a
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-13 10:22:15 +03:00
Topi Reinio a2211164aa To Do List example: Fix image file extensions
Fixes documentation warnings:

(qdoc) warning: Missing image: iOS_Light.png
(qdoc) warning: Missing image: iOS_Dark.png
(qdoc) warning: Missing image: Settings_iOS.png

Pick-to: 6.6 6.5
Change-Id: I0f2262a825457b2ec99e436060803f193722f31c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-11 17:51:33 +00:00
Qt Submodule Update Bot 3388603fb6 Refresh 'ToDoList' example
The whole design of the example was changed.
The app was created in Qt DesignStudio.
Some new functionalities were implemented eg. calendar, clock.
The application will use "https://www.boredapi.com" to get random tasks.
It will also use local storage for saving list.

Tested on Android, Windows, macOS, iOS.

Change-Id: Ieb688d4a4606b4617b63342b749099528021054c
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 17:58:43 +02:00
Topi Reinio 48cc7d605e Doc: Fix documentation issues
* Add missing */ in external-resources.qdoc
* Remove linking to 3rd party attribution pages that no longer exist
* Fix Media Player Example documentation
    * Remove duplicate \example command
    * Fix \image file name

Pick-to: 6.6 6.5
Change-Id: Ie26e4cc9105a5c728de2ec18b514b5d5ba3d61b9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 14:17:22 +00:00
Juha Vuolle 06bd16a47c Add REQUIRES parameter to qt_standard_project_setup
Pick-to: 6.6 6.5
Change-Id: I8c72fa5f2e113dc4fd8cc6d69495f7cec7c327f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-09 11:19:28 +03:00
Alexandru Croitor 0482f46a46 CMake: Clean up the CMakeLists.txt file a bit
Remove the commented out find_package.
Remove the redundant CMAKE_AUTOMOC assignment, because
qt_standard_project_setup was already called.

Pick-to: 6.5 6.6
Change-Id: I20f60541377153febd28413450b4af7b07d4e41c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-08 09:55:03 +02:00
Alexandru Croitor 54200de405 Fix build of documentviewer example
Due to a missing qt_standard_project_setup call, AUTOMOC was never
enabled which led to undefined symbol issues at link time.

Remove documentWasModified slot declaration because it didn't have a
definition, and it was not referenced by anything in the code.

Pick-to: 6.5 6.6
Fixes: QTBUG-114365
Change-Id: Ib6938163be1a1fdc0bb6f4a925878ec1b309d03e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-08 09:55:01 +02:00
Alexandru Croitor 6b722fd0a0 Fix documentviewer namespace build
Sprinkle some QT_BEGIN_NAMESPACE in the right places to avoid build
failures.

Pick-to: 6.5 6.6
Change-Id: I9cbfadb414881ef32405f0ad99c1009e89466490
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-08 09:54:59 +02:00
Kamil Hajdukiewicz d7554ab700 Refresh the 'Multimedia Player' example
Design of MultimediaPlayer example was refreshed.
New icons, colors, application structure were provided.
Some new functionalities were introduced to the sample:
playlist, shuffle, loop, dark mode.

Tested on Windows, Android Emulator, macOs, iOS emulator.

Change-Id: I38a8e203021edc97b70a4ab8f0d8d83c6d5ae45b
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 03:08:54 +02:00
Matthias Rauter 30e6c527e7 Add resource prefix to cmake files
Fixes: QTBUG-114210
Change-Id: I7a7ef5c4c6936eff7624e306a933e45c1e29e8d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-06 16:56:18 +02:00
Kimmo Leppälä 117382f261 Remove PhotoViewer example
Fixes: QTBUG-113593
Change-Id: Idafd79a140067fac9c9f27440f4f43453e2e2ddf
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-16 20:27:36 +03:00
Topi Reinio 8f66cabc1d Doc: Update documentation for Document Viewer demo
The source code has seen multiple revisions and the documentation
was referring to types and implementation details that no longer
exist or hold true.

Reorganize the content, simplify the language, and fix the source
file quoting.

Change-Id: If22c052460b4dc2f1e321eb423c6f2a415cd26f5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-05-10 07:44:05 +00:00