aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shared
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Add deployment API to our examplesAlexandru Croitor2024-03-272-53/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects were modified using the tool at: https://git.qt.io/alcroito/cmake_refactor A few examples had to be adapted manually, mostly those that build additional qml modules / plugins. The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were removed, these are not needed anymore because example directory selection is handled by the qt_internal_add_example calls. The install(TARGETS) calls were modified according to our documentation snippets for qt_generate_deploy_qml_app_script. A qt_generate_deploy_qml_app_script call was added for each executable target. Note that the deployment step will be skipped in the CI for now, because: - we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus set QT_INTERNAL_SKIP_DEPLOYMENT to true - standalone examples feature is not yet enabled in the CI, which means we continue to build examples in-tree, and deployment is disabled for in-tree prefix builds. A small list of examples to deploy in the CI will be chosen in the future, to ensure deployment coverage, without slowing down overall CI times due to all the *deployqt invocations. Even if deployment is disabled in the CI, the install(TARGETS) calls for each example will still run, installing into an 'installed_examples' directory, which will not be archived by the CI. The QtBundleQmlModuleForMacOS and bundle_shared code was removed, because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the deployment api, to ensure macOS bundle examples run properly in the build dir. This works even in prefix in-tree builds, when installation deployment is disabled. Finally, for all examples that build additional qml module libraries or plugins, the libraries / plugins must be installed into the bin dir of each project, along with a qmldir file. This is to support running the installed project for platforms that don't have deployment api yet, like boot2qt / yocto. If we want to have super clean install / deployment rules in the future, we won't be able to avoid adding ugly per-platform conditions. The current status quo is deemed an improvement over what we had before. Pick-to: 6.7 Task-number: QTBUG-101340 Task-number: QTBUG-102056 Task-number: QTBUG-102057 Change-Id: I843d934668c25dbcd1abca52495b393579633fc5 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* Correct license for examples filesLucie Gérard2024-03-212-2/+2
| | | | | | | | | | | | | Example takes precedent over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 6.7.0 Task-number: QTBUG-121787 Change-Id: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7 Reviewed-by: Kai Köhne <[email protected]>
* Change the way tests and examples query the qmldir file from QML plugin targetsAlexey Edelev2024-01-152-8/+9
| | | | | | | | | | | Use qt6_query_qml_module to get path to qmldir, but not TARGET_FILE_DIR. This is more accurate way. Pick-to: 6.5 6.6 6.7 Fixes: QTBUG-120479 Change-Id: I4b7f7bf3b7f69c15871e400af3e7ae945a9bfdf0 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* examples: Increase hit area of LauncherList buttons; simplifyTor Arne Vestbø2023-12-122-51/+36
| | | | | | | Pick-to: 6.5 6.6 6.7 Change-Id: Ife040f9c7e01fd8b8ce80595c2179d6b78648c6e Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* Move undocumented quick examples to manual testsLucie Gérard2023-11-284-48/+0
| | | | | | | | | | | | | | | | | | - maskedmousearea ought to be redone with input handlers - delegatechooser needs a realistic use case, not so ugly - itemparticle hasn't been in working condition for some time, due to its use of flickr API - keep FlickrRssModel only in manual tests (broken for now) - remove bogus copies of flipable example files from the delegatemodel example which were added in 1fef24732bb5114392626a7fef956625a6cc66ac - copy shared components that examples tend to depend on into a shared directory for manual tests Task-number: QTBUG-88470 Task-number: QTBUG-119117 Change-Id: Ide1918f5e1b6fcc3efd939825892bfd270cef586 Reviewed-by: Shawn Rutledge <[email protected]>
* Disable TapHandler.longPressed signal if longPressThreshold == 0Shawn Rutledge2023-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There needs to be a way to disable the long-press feature, because it's exclusive: if we emit longPressed(), we do not emit tapped(). But we should also be able to accommodate slow users who pause for too long unintentionally, or while simply observing the behavior. Also clarify that resetting longPressThreshold reverts to the default. Add more exhaustive test coverage, verify that longPressed and tapped are mutually exclusive, and verify the effects of violating the gesturePolicy. Change longPressThreshold on LauncherList's back button so that it always triggers, regardless whether the user pauses on it for a while. [ChangeLog][QtQuick][Event Handlers] TapHandler.longPressThreshold can now be set to 0 to disable its press-and-hold feature, and can be reset to undefined to restore the platform default. Fixes: QTBUG-119132 Task-number: QTBUG-105810 Pick-to: 6.5 6.6 Change-Id: Id5fd7e51c70fdb0cb6c4beb5615717a222aec871 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Make TapHandler longPressed/tapped exclusive and reliable; fix exampleShawn Rutledge2023-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The back button in the examples' LauncherList.qml has been flaky. As described in the docs, a TapHandler used to implement a Button should have `gesturePolicy: TapHandler.ReleaseWithinBounds` to get the common behavior that you can drag out of the button to cancel the click, and you can also drag back into the button to change your mind and let it click after all. But when trying to test this behavior, another problem became evident: if you spend a longer time than longPressThreshold for the whole gesture, then at the time of release you could see the debug output "long press threshold exceeded" and the tapped signal was not emitted. Our intention was that if you are dragging around, the TapHandler is not eligible to emit the longPressed signal; it follows that it should not become ineligible to emit tapped, either (tapped can be emitted if other constraints are satisfied). The intention of the ReleaseWithinBounds policy is that it doesn't matter how much you drag, as long as the point is within the bounds of the parent at the time of release. So we begin keeping track of whether we have actually emitted the longPressed signal, rather than merely looking at the time difference. This changed behavior in tst_qquickdeliveryagent::passiveGrabberOrder: 1 second is more than enough time for long press with the default longPressThreshold, and now the tapped signals are no longer emitted after longPressed. So we just wait for pressed state rather than waiting so long. qWaits in tests are best avoided anyway (although I think the intention in 152e12dc22cc0fd07cf90bcd35ae0e05b8b46fa0 might have been to wait long enough to ensure that nothing undesired would occur, rather than waiting for something specific to occur). Task-number: QTBUG-65012 Task-number: QTBUG-105810 Pick-to: 6.5 6.6 Change-Id: If6a86d955e19810cb06de659f5e39b50a72fa762 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, testsAmir Masoud Abdol2023-02-211-1/+0
| | | | | | | | | | | | | | | | Every instance of AUTO_RESOURCE_PREFIX has been replaced by either qt_standard_project_setup(REQUIRES 6.5) or with qt_policy(SET QTP0001 NEW), mainly in tests. In addition, I added a warning message for the case where AUTO_RESOURCE_PREFIX is used. Pick-to: 6.5 Task-number: QTBUG-96233 Change-Id: I323a15e9d0bb5fe6ba649365314af9fc2ad67bda Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Oliver Eftevaag <[email protected]>
* Make quick examples that rely on the shared files build with qmake againOliver Eftevaag2023-01-111-1/+1
| | | | | | | | | | | | | | | In d270c51f812b5f0ffe6208b38c8ea0e898535e50 the DECLARATIVE_EXAMPLE_MAIN macro was modified to prepend the "qrc:/qt/qml" prefix to file paths that should be loaded by the engine. But the patch forgot to update the shared.qrc prefix, which means that the examples that relied on the shared module, would no longer build out-of-the-box with qmake. This patch solve the issue, so that the examples work with qmake once again. Pick-to: 6.5 Change-Id: I677c1e61423cf98c6a1030ce591707888456ef19 Reviewed-by: Ulf Hermann <[email protected]>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-072-2/+2
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* Examples: Do not use import version numbers anymoreKai Köhne2022-08-319-13/+13
| | | | | | | | Pick-to: 6.4 Change-Id: I1f4d4920bb9d132a846ac2dbcfdb8b660759d540 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Add license headers to cmake filesLucie Gérard2022-07-082-0/+6
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <[email protected]>
* Adapt examples to AUTO_RESOURCE_PREFIXUlf Hermann2022-06-242-2/+2
| | | | | | | | | | | Examples that don't explicitly set NO_RESOURCE_TARGET_PATH get the AUTO_RESOURCE_PREFIX now. Task-number: QTBUG-103452 Change-Id: I6b41e96ce5620079f60ca2f967b0a2e611c1f738 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-1111-540/+23
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Improve examples CMakeLists.txtKai Köhne2022-01-241-0/+1
| | | | | | | | | | | | | | | | | | - Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: I0d6bfb06c4b25e9921d3d2bf31d977150f12b31b Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* Flickable manual test: add sliders to adjust flick-speed metricsShawn Rutledge2021-10-041-6/+10
| | | | | | | | | | | | | | The sliders adjust maximumFlickVelocity and flickDeceleration. Also in the shared Slider: try harder to end up with value being the same as init, after initialization, by making the range of movement divisible by more numbers, by default. 180 is highly divisible, and keeps the default Slider size reasonable. You can still override the size of the Slider arbitrarily, though. Task-number: QTBUG-97055 Change-Id: I6fb41ccb87e401a747d5a8add3100053a06d9d88 Reviewed-by: Shawn Rutledge <[email protected]>
* CMake: Refactor bundle_shared into a more reusable functionAlexandru Croitor2021-09-292-25/+37
| | | | | | | | | | | | | | | | | | | | Refactor the logic of bundle_shared into a more reusable add_qml_module_to_macos_app_bundle function that can be used in QtQuick examples that need to bundle the qml plugin on macOS, but don't use the 'shared' qml module plugin. The new function is placed in a QtBundleQmlModuleForMacOS.cmake file which can be included separately from the shared/CMakeLists.txt project. Amends 633a85cd39cdd294283439972cffebcff32ac0cb Pick-to: 6.2 Task-number: QTBUG-96805 Change-Id: Iebb3f4734b9a6bd8a8316bf5ae01d9740c442645 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* CMake: Fix examples that use 'shared' project when using a static QtAlexandru Croitor2021-09-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a static Qt, linking of examples that use the 'shared' Qml module would fail with the following error Undefined symbols for architecture x86_64: "qt_static_plugin_sharedPlugin()", referenced from: StaticsharedPluginPluginInstance::StaticsharedPluginPluginInstance() in window_shared_init.cpp.o This happened because the 'shared' project pre-created its plugin target with qt_add_library instead of qt_add_plugin. qt_add_plugin passes an additional QT_STATICPLUGIN compile definition when compiling the moc'ed file to ensure that the QT_MOC_EXPORT_PLUGIN macro creates a qt_plugin_instance_PLUGIN_NAME symbol. Unfortunately we can't use qt_add_plugin for shared Qt builds, because some of the projects link directly against the plugin target and it's not possible to link against a MODULE_LIBRARY target which qt_add_plugin creates in shared Qt build. We could try to conditionally switch between using qt_add_library for a shared Qt build and qt_add_plugin for a static Qt build, but that further complicates the build system code because it requires specifying a class name and plugin type explicitly. Remove the direct linkage against the libraries in the examples and instead rely on plugin loading. This simplifies the logic of not having to pre-create a target. Amends 7b6eea37aeea55cdf1bcb1fd9c3091d6753f95e8 Pick-to: 6.2 Fixes: QTBUG-96805 Change-Id: I5b2f3992ccda29b59f1e99748005381c73daca69 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* CMake: Ensure proper dependencies in bundle_sharedAlexandru Croitor2021-09-291-0/+4
| | | | | | | | | | | Ensure the shared qml module is built before it is bundled into the app's bundle dir on macOS. Pick-to: 6.2 Change-Id: I0b93fc54d1caa86070335347f5d2735eafe6819a Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* Install the "shared" example module into macOS bundlesUlf Hermann2021-09-032-0/+32
| | | | | | | | | | | | | | | If we build an application bundle we cannot rely on the relative path between the application's and the shared module's output directories. This is somewhat ugly, but as we don't have a comprehensive solution for building application bundles, yet, it's the best we can do right now. In order for the shared bundle to be loaded from the PlugIns directory, we need to add the PlugIns directory to the import path on macOS. Pick-to: 6.2 Change-Id: I5b952420b4bb60af74886a140fa2c6a263d2f730 Reviewed-by: Shawn Rutledge <[email protected]>
* Update views example to use modulesUlf Hermann2021-08-301-0/+1
| | | | | | | | | | The qmake and qmlproject files are adapted to use the "shared" module, too. Pick-to: 6.2 Change-Id: I5fc4895416357ba202528b155581b1b5a880a68d Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Fix the qtquick/window example to use QML modulesUlf Hermann2021-08-304-5/+119
| | | | | | | | | | | | The shared code becomes its own module. Due to the ${PROJECT_NAME} trick it should be possible to include it multiple times, in different examples. Pick-to: 6.2 Change-Id: I78cc3211f67fae9a713320fae4041898e6a397ed Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Oliver Eftevaag <[email protected]>
* Use qEnvironmentVariableIntValue() instead of qgetenv().toInt()Shawn Rutledge2021-08-171-2/+2
| | | | | | | | The docs tell us that it's faster. Pick-to: 6.2 Change-Id: Ib828ed9a10bbb617670a61e7525cbbe25704815d Reviewed-by: Mitch Curtis <[email protected]>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-161-1/+0
| | | | | | | | Replace QLibaryInfo::location with QLibraryInfo::path, and remove usage of Qt::AA_EnableHighDpiScaling, which doesn't have any effect anymore. Change-Id: I347e8a83e0f4c2b4405f2512e569ad3234f05a98 Reviewed-by: Tor Arne Vestbø <[email protected]>
* fix duplicated properties resulting from bad mergeFabian Kosmale2020-03-091-3/+0
| | | | | Change-Id: I26fa7d603d8097aab45a26e0c57a10d86491a840 Reviewed-by: Alexandru Croitor <[email protected]>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-174-5/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * Avoid discouraged patterns in examplesUlf Hermann2020-02-114-7/+15
| | | | | | | | | | | | | | | | | | | | | | In particular, use required properties where applicable, explicitly import QtQml where we use it, avoid unqualified access into the root scope of a component, use JavaScript functions with explicit parameters as signal handlers. Change-Id: I3eaaba47cc3c7a2a12d488e36f9eec145cedbb0e Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* | Use required properties to fix some more qmllint warningsUlf Hermann2020-01-232-2/+6
|/ | | | | Change-Id: I4489bd55e8777b7bf591c41a21e2b6dfdf9ea996 Reviewed-by: Simon Hausmann <[email protected]>
* examples/quick/shared/FlickrRssModel.qml: Do proper error handlingMaximilian Goldstein2019-11-291-0/+6
| | | | | Change-Id: Ieaed0706965bbb259934fb83151856f3d5805331 Reviewed-by: Ulf Hermann <[email protected]>
* examples: Fix SimpleLauncherDelegate.qmlUlf Hermann2019-11-151-2/+2
| | | | | | | | | Since the button is a simple Item, and the MouseArea is gone, the "pressed" property we're interested in is actually the TapHandler's "pressed". Change-Id: Idc7262325c9e2db761041b1ae1151e62702e3eb8 Reviewed-by: Shawn Rutledge <[email protected]>
* examples: Fix a few linter warningsUlf Hermann2019-08-203-7/+8
| | | | | | | | Unqualified lookup in the root object of a component is bad. Change-Id: I7772216fb81e68824519408998c73dbb1ca60c4d Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* Examples: Use XmlHttpRequest to fetch flickr public photosVenugopal Shivashankar2018-10-112-0/+87
| | | | | | | | | | | | | | | | | | This change is to facilite moving the XmlListModel code to the qtxmlpatterns repo, but still keep all the Particles examples together. Also fixed: - the old TODO about darkening images according to depth, and make it generally look a bit better. - move the visualdatamodel examples to a directory called delegatemodel, since that's how they work now. And add them to the main "views" example launcher so that they become more visible to users. Change-Id: I78f9f19e1e110608580adedcf4cd3be554222515 Reviewed-by: Shawn Rutledge <[email protected]>
* Example: Update the shared UI controls to use input handlersVenugopal Shivashankar2018-10-036-62/+58
| | | | | | Change-Id: I077754d9d9d713d01c7711175eb1b5da5e1f6869 Reviewed-by: Liang Qi <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* examples: Fix LauncherList page components being hidden on window resizeTor Arne Vestbø2018-09-071-2/+0
| | | | | | | | | | | | | | | | | | The binding for x to -width will take effect after the enter-transition finishes animating x from -page.width to 0, but will not update the x value for some reason, so the item stays at the correct position at the end of the transition, even if the binding is still active. Once the window is resized though, and the new window width gets propagated to the page component, the x-value will be re-evaluated and the page component ends up on -width again, hiding it. It doesn't look like the explicit property binding adds anything to the example, as the transition takes care of starting at -width, so by removing it we fix the issue. Change-Id: If0e693ae85fe3e0aa49f59832cbb1ba2804b7b6b Reviewed-by: Simon Hausmann <[email protected]>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-6/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| * Let platform decide what the default show action isTor Arne Vestbø2017-12-191-6/+1
| | | | | | | | | | | | | | | | | | | | | | The platform handles this through the ShowIsMaximized and ShowIsFullScreen platform integration style-hints, as well as QPlatformIntegration::defaultWindowState(), which was added specifically so that we wouldn't have to hard-code the behavior in user code. Change-Id: Ic019ccc2edd871a78bf94fd5fe572b9659416582 Reviewed-by: Laszlo Agocs <[email protected]>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-248-24/+104
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<[email protected]> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix outdated BSD license headerKai Koehne2017-10-178-24/+104
| | | | | | | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <[email protected]>
* | pointerhandlers manual test: get command-line arg working againShawn Rutledge2017-10-051-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 4e7041c65216ada4f5fb604a9df840152ba60317 added a convenient feature to launch a specific test rather than needing to use the menu; e8f36458276cc989dc5f0c33ec27c90fad15137b broke it; and at some point the functions removed there were added back in a way that couldn't work (during a merge?) addExample is in use everywhere; showExample is in use only for the pointer handlers manual test; and hideExample isn't in use, so we can remove it again. Change-Id: I19cacbd3324889da9768b73ec2640aa0c1de96ef Reviewed-by: Shawn Rutledge <[email protected]>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerJan Arve Saether2017-07-113-32/+134
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/shared/LauncherList.qml src/quick/items/qquickevents.cpp src/quick/items/qquickevents_p_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/tst_touchmouse.cpp Change-Id: Id692d291455093fc72db61f1b854f3fc9190267b
| * | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-06-082-36/+128
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenode.cpp Change-Id: Id8107cb0de0fbfe7120a90a137b49c2b915ff2d3
| | * LauncherList: Add some simple animations to help it look prettierRobin Burchell2017-05-202-36/+128
| | | | | | | | | | | | | | | | | | | | | | | | Nothing over the top, just some page animations on enter/exit. Change-Id: I822efe3e25928ff7797dd2911b9d2ce8dce00936 Reviewed-by: Gunnar Sletta <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
| * | Add QQuickPathItem and its backend infraLaszlo Agocs2016-12-191-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic backend uses the triangulator from QtGui, but is in fact OpenGL-only for now due to materials. The NVPR backend uses GL_NV_path_rendering on NVIDIA hardware with OpenGL 4.3+ or OpenGL ES 3.1+. The software backend simply uses QPainter. With the generic backend each PathItem is backed by a non-visual root node and 0, 1 or 2 child geometry nodes, depending on the presence of visible stroking and filling. The potentially expensive triangulation happens on updatePolish(), on the gui thread. This is proven to provide much smoother results when compared to doing the geometry generation on the render thread in updatePaintNode(), in particular on power-limited embedded devices. The NVPR backend uses a QSGRenderNode in DepthAware mode so that the batch renderer can continue to rely on the depth buffer and use opaque batches. Due to not relying on slow CPU-side triangulation, this backend uses 5-10 times less CPU, even when properties of the path or its elements are animated. The path itself is specified with the PathView's Path, PathLine, PathArc, PathQuad, etc. types. This allows for consistency with PathView and the 2D Canvas and avoids a naming mess in the API. However, there won't be a 100% symmetry: backends like NVPR will not rely on QPainterPath but process the path elements on their own (as QPainterPath is essentially useless with these APIs), which can lead to differences in the supported path elements. The supported common set is currently Move, Line, Quad, Cubic, Arc. The patch introduces PathMove, which is essentially PathLine but maps to moveTo instead of lineTo. More types may get added later (e.g. NVPR can do a wide variety of optimized rounded rects, but this requires directly specifying a GL_ROUNDED_RECTx_NV command, thus neededing a dedicated Path type on our side too) For filling with gradients only linear gradients are supported at the moment. In addition to the declarative API, a more lightweight, QObject-less JS-callable API should be considered as well for the future. Change-Id: I335ad64b425ee279505d60e3e57ac6841e1cbd24 Reviewed-by: Andy Nichols <[email protected]>
* / pointer handlers manual test: can give arg with qml to launchShawn Rutledge2017-02-141-0/+4
|/ | | | | | | | | This makes it easier to repeatedly launch the same test: specify the qml file on the command line instead of having to click the list item each time. e.g. ./pointer tapHandler.qml Change-Id: I30b449b161107b1746418fc45518d202ba7d8381 Reviewed-by: Jan Arve Sæther <[email protected]>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-231-0/+1
|\ | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
| | * Example: Enable auto scaling on HighDPI screensVenugopal Shivashankar2016-10-281-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56425 Change-Id: I2246245216fb8cd0d4dc4b15a0687edfc64ccad1 Reviewed-by: J-P Nurmi <[email protected]>
* | | add shared Label for examples, and use in the Window exampleShawn Rutledge2016-10-103-0/+48
|/ / | | | | | | | | | | | | | | | | It just saves the trouble of setting the Text color to the correct palette text color repeatedly, and avoids having black text on a dark background in case a dark theme is in use. Change-Id: If5c38fabe7f047fa5f6956a9d8b235886ab7ab5c Reviewed-by: Laszlo Agocs <[email protected]>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-082-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| * Purge sRGB chunks from PNGs in examples.Edward Welbourne2016-03-242-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: If3baf60fb7c0045446ddfddecef96374845e739e Reviewed-by: Topi Reiniö <[email protected]>