diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-10-03 08:07:30 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-10-05 11:56:23 +0000 |
commit | 76dd5b4749516882b7fb44c40864450cff91441a (patch) | |
tree | 1ce4478e96c96ccb624f342c5c990a897bccb70f /examples/quick/shared/LauncherList.qml | |
parent | 2dd530ca35032465d4e928aa7c8f29563eb0c5da (diff) |
pointerhandlers manual test: get command-line arg working again
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/quick/shared/LauncherList.qml')
-rw-r--r-- | examples/quick/shared/LauncherList.qml | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml index 2d1d29c585..40b7684712 100644 --- a/examples/quick/shared/LauncherList.qml +++ b/examples/quick/shared/LauncherList.qml @@ -47,18 +47,11 @@ Rectangle { //function used to add to model A) to enforce scheme B) to allow Qt.resolveUrl in url assignments color: "#eee" - function addExample(name, desc, url) - { + function addExample(name, desc, url) { myModel.append({"name":name, "description":desc, "url":url}) } - - function hideExample() - { - ei.visible = false; - } - function showExample(url) - { - ei.exampleUrl = url; + function showExample(url) { + pageComponent.createObject(pageContainer, { exampleUrl: url }).show() } // The container rectangle here is used to give a nice "feel" when @@ -71,10 +64,7 @@ Rectangle { id: launcherList clip: true delegate: SimpleLauncherDelegate{ - onClicked: { - var page = pageComponent.createObject(pageContainer, { exampleUrl: url }) - page.show() - } + onClicked: showExample(url) } model: ListModel {id:myModel} anchors.fill: parent |