diff options
author | Lucie Gérard <[email protected]> | 2023-11-20 14:21:57 +0100 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2023-11-28 17:57:05 -0700 |
commit | 8dc2e3daf08327c6f70ac7c1c5862f726cbf74e7 (patch) | |
tree | 510f75f3cb7b7ec021367c3f48bf9294fc204d65 /examples/quick/shared | |
parent | b77df9bbdd58c220ecb6ca66de67a52f6aa13539 (diff) |
Move undocumented quick examples to manual tests
- 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]>
Diffstat (limited to 'examples/quick/shared')
-rw-r--r-- | examples/quick/shared/CMakeLists.txt | 1 | ||||
-rw-r--r-- | examples/quick/shared/FlickrRssModel.qml | 45 | ||||
-rw-r--r-- | examples/quick/shared/qmldir | 1 | ||||
-rw-r--r-- | examples/quick/shared/shared.qrc | 1 |
4 files changed, 0 insertions, 48 deletions
diff --git a/examples/quick/shared/CMakeLists.txt b/examples/quick/shared/CMakeLists.txt index 704d148025..b98b0b1ccd 100644 --- a/examples/quick/shared/CMakeLists.txt +++ b/examples/quick/shared/CMakeLists.txt @@ -21,7 +21,6 @@ qt_add_qml_module(${PROJECT_NAME}_shared QML_FILES "Button.qml" "CheckBox.qml" - "FlickrRssModel.qml" "Label.qml" "LauncherList.qml" "SimpleLauncherDelegate.qml" diff --git a/examples/quick/shared/FlickrRssModel.qml b/examples/quick/shared/FlickrRssModel.qml deleted file mode 100644 index e78d1ffa21..0000000000 --- a/examples/quick/shared/FlickrRssModel.qml +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -ListModel { - id: flickrImages - property string tags : "" - readonly property string queryUrl : "http://api.flickr.com/services/feeds/photos_public.gne?" - - function encodeParams(x) { - return encodeURIComponent(x.replace(" ",",")); - } - function fetchImages(format) { - var requestURL = queryUrl + (tags ? "tags="+encodeParams(tags)+"&" : "") + "format=" + format + "&nojsoncallback=1"; - var xhr = new XMLHttpRequest; - xhr.onreadystatechange = function() { - if (xhr.readyState === XMLHttpRequest.DONE) { - - if (xhr.status !== 200) { - console.log("Failed to get images from flickr. status code: " + xhr.status); - return; - } - - var jsonText = xhr.responseText; - var objArray = JSON.parse(jsonText.replace(/\'/g,"'")) - if (objArray.errors !== undefined) - console.log("Error fetching tweets: " + objArray.errors[0].message) - else { - for (var key in objArray.items) { - var rssItem = objArray.items[key]; - var jsonObject = "{ \"title\": \"" + rssItem.title +"\",\"media\": \"" + rssItem.media.m + "\", \"thumbnail\": \"" + rssItem.media.m.replace(/\_m\.jpg/,"_s.jpg") +"\"}" - flickrImages.append(JSON.parse(jsonObject)); - } - } - } - } - xhr.open("GET", requestURL, true); - xhr.send(); - } - Component.onCompleted: { - fetchImages("json"); - } -} - diff --git a/examples/quick/shared/qmldir b/examples/quick/shared/qmldir index 5ccdf60219..8a3d856a08 100644 --- a/examples/quick/shared/qmldir +++ b/examples/quick/shared/qmldir @@ -1,7 +1,6 @@ module shared Button 2.0 Button.qml CheckBox 2.1 CheckBox.qml -FlickrRssModel 2.0 FlickrRssModel.qml Label 2.0 Label.qml LauncherList 2.0 LauncherList.qml SimpleLauncherDelegate 2.0 SimpleLauncherDelegate.qml diff --git a/examples/quick/shared/shared.qrc b/examples/quick/shared/shared.qrc index 67f69c9c8d..054db1f352 100644 --- a/examples/quick/shared/shared.qrc +++ b/examples/quick/shared/shared.qrc @@ -2,7 +2,6 @@ <qresource prefix="/qt/qml/shared"> <file>Button.qml</file> <file>CheckBox.qml</file> - <file>FlickrRssModel.qml</file> <file>Images.qml</file> <file>Label.qml</file> <file>LauncherList.qml</file> |