on xenial help sign in
reverted file changes
19075ddNick Dedekind
po/unity8.pot+45−61
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2015-07-08 10:55+0100\n"
11+"POT-Creation-Date: 2015-06-22 12:00+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -223,22 +223,6 @@ msgstr ""
223msgid "OK"
223msgid "OK"
224msgstr ""
224msgstr ""
225
225
226−#. Translators: this refers to a duration/remaining time of the video in hours, minutes and seconds,
227−#. of which you can change the order.
228−#. %1 refers to hours, %2 refers to minutes and %3 refers to seconds.
229−#: qml/Components/MediaServices/VideoPlayerControls.qml:44
230−#, qt-format
231−msgid "%1:%2:%3"
232−msgstr ""
233−
234−#. Translators: this refers to a duration/remaining time of the video in minutes and seconds,
235−#. of which you can change the order.
236−#. %1 refers to minutes and %2 refers to seconds.
237−#: qml/Components/MediaServices/VideoPlayerControls.qml:49
238−#, qt-format
239−msgid "%1:%2"
240−msgstr ""
241−
242#: qml/Dash/GenericScopeView.qml:532 qml/Dash/GenericScopeView.qml:690
226#: qml/Dash/GenericScopeView.qml:532 qml/Dash/GenericScopeView.qml:690
243msgid "See less"
227msgid "See less"
244msgstr ""
228msgstr ""
@@ -331,57 +315,57 @@ msgstr ""
331msgid "Tap to unlock"
315msgid "Tap to unlock"
332msgstr ""
316msgstr ""
333
317
334−#: qml/Greeter/NarrowView.qml:54 qml/Wizard/Pages/passwd-confirm.qml:53
318+#: qml/Greeter/NarrowView.qml:53 qml/Wizard/Pages/passwd-confirm.qml:53
335msgid "Sorry, incorrect passphrase."
319msgid "Sorry, incorrect passphrase."
336msgstr ""
320msgstr ""
337
321
338−#: qml/Greeter/NarrowView.qml:55 qml/Wizard/Pages/passwd-confirm.qml:54
322+#: qml/Greeter/NarrowView.qml:54 qml/Wizard/Pages/passwd-confirm.qml:54
339msgid "Sorry, incorrect passcode."
323msgid "Sorry, incorrect passcode."
340msgstr ""
324msgstr ""
341
325
342−#: qml/Greeter/NarrowView.qml:56
326+#: qml/Greeter/NarrowView.qml:55
343msgid "This will be your last attempt."
327msgid "This will be your last attempt."
344msgstr ""
328msgstr ""
345
329
346−#: qml/Greeter/NarrowView.qml:58
330+#: qml/Greeter/NarrowView.qml:57
347msgid ""
331msgid ""
348"If passphrase is entered incorrectly, your phone will conduct a factory "
332"If passphrase is entered incorrectly, your phone will conduct a factory "
349"reset and all personal data will be deleted."
333"reset and all personal data will be deleted."
350msgstr ""
334msgstr ""
351
335
352−#: qml/Greeter/NarrowView.qml:59
336+#: qml/Greeter/NarrowView.qml:58
353msgid ""
337msgid ""
354"If passcode is entered incorrectly, your phone will conduct a factory reset "
338"If passcode is entered incorrectly, your phone will conduct a factory reset "
355"and all personal data will be deleted."
339"and all personal data will be deleted."
356msgstr ""
340msgstr ""
357
341
358−#: qml/Greeter/NarrowView.qml:116
342+#: qml/Greeter/NarrowView.qml:115
359#, qt-format
343#, qt-format
360msgid "Enter %1"
344msgid "Enter %1"
361msgstr ""
345msgstr ""
362
346
363−#: qml/Greeter/NarrowView.qml:117 qml/Wizard/Pages/passwd-set.qml:60
347+#: qml/Greeter/NarrowView.qml:116 qml/Wizard/Pages/passwd-set.qml:60
364msgid "Enter passphrase"
348msgid "Enter passphrase"
365msgstr ""
349msgstr ""
366
350
367−#: qml/Greeter/NarrowView.qml:118
351+#: qml/Greeter/NarrowView.qml:117
368msgid "Enter passcode"
352msgid "Enter passcode"
369msgstr ""
353msgstr ""
370
354
371−#: qml/Greeter/NarrowView.qml:119
355+#: qml/Greeter/NarrowView.qml:118
372#, qt-format
356#, qt-format
373msgid "Sorry, incorrect %1"
357msgid "Sorry, incorrect %1"
374msgstr ""
358msgstr ""
375
359
376−#: qml/Greeter/NarrowView.qml:120
360+#: qml/Greeter/NarrowView.qml:119
377msgid "Sorry, incorrect passphrase"
361msgid "Sorry, incorrect passphrase"
378msgstr ""
362msgstr ""
379
363
380−#: qml/Greeter/NarrowView.qml:121
364+#: qml/Greeter/NarrowView.qml:120
381msgid "Please re-enter"
365msgid "Please re-enter"
382msgstr ""
366msgstr ""
383
367
384−#: qml/Greeter/NarrowView.qml:122
368+#: qml/Greeter/NarrowView.qml:121
385msgid "Sorry, incorrect passcode"
369msgid "Sorry, incorrect passcode"
386msgstr ""
370msgstr ""
387
371
@@ -531,6 +515,38 @@ msgctxt "Button: Go back one page in the Wizard"
531msgid "Back"
515msgid "Back"
532msgstr ""
516msgstr ""
533
517
518+#: qml/Wizard/Pages/here-terms.qml:27
519+msgid "Terms & Conditions"
520+msgstr ""
521+
522+#: qml/Wizard/Pages/passwd-confirm.qml:49
523+msgid "Confirm passphrase"
524+msgstr ""
525+
526+#: qml/Wizard/Pages/passwd-confirm.qml:50
527+msgid "Confirm passcode"
528+msgstr ""
529+
530+#: qml/Wizard/Pages/passwd-confirm.qml:53
531+#: qml/Wizard/Pages/passwd-confirm.qml:54
532+msgid "Please try again."
533+msgstr ""
534+
535+#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
536+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
537+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
538+#: qml/Wizard/Pages/60-reporting.qml:50
539+msgid "Continue"
540+msgstr ""
541+
542+#: qml/Wizard/Pages/passwd-set.qml:61
543+msgid "Choose your passcode"
544+msgstr ""
545+
546+#: qml/Wizard/Pages/passwd-set.qml:68
547+msgid "Passphrase must be 4 characters long"
548+msgstr ""
549+
534#: qml/Wizard/Pages/10-welcome.qml:27
550#: qml/Wizard/Pages/10-welcome.qml:27
535msgid "Hi!"
551msgid "Hi!"
536msgstr ""
552msgstr ""
@@ -543,13 +559,6 @@ msgstr ""
543msgid "Let’s get started."
559msgid "Let’s get started."
544msgstr ""
560msgstr ""
545
561
546−#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
547−#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
548−#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
549−#: qml/Wizard/Pages/passwd-set.qml:90
550−msgid "Continue"
551−msgstr ""
552−
553#: qml/Wizard/Pages/20-sim.qml:25
562#: qml/Wizard/Pages/20-sim.qml:25
554msgid "Add a SIM card and restart your device"
563msgid "Add a SIM card and restart your device"
555msgstr ""
564msgstr ""
@@ -675,31 +684,6 @@ msgstr ""
675msgid "Finish"
684msgid "Finish"
676msgstr ""
685msgstr ""
677
686
678−#: qml/Wizard/Pages/here-terms.qml:27
679−msgid "Terms & Conditions"
680−msgstr ""
681−
682−#: qml/Wizard/Pages/passwd-confirm.qml:49
683−msgid "Confirm passphrase"
684−msgstr ""
685−
686−#: qml/Wizard/Pages/passwd-confirm.qml:50
687−msgid "Confirm passcode"
688−msgstr ""
689−
690−#: qml/Wizard/Pages/passwd-confirm.qml:53
691−#: qml/Wizard/Pages/passwd-confirm.qml:54
692−msgid "Please try again."
693−msgstr ""
694−
695−#: qml/Wizard/Pages/passwd-set.qml:61
696−msgid "Choose your passcode"
697−msgstr ""
698−
699−#: qml/Wizard/Pages/passwd-set.qml:68
700−msgid "Passphrase must be 4 characters long"
701−msgstr ""
702−
703#. Translators: This is the arrow for "Back" buttons
687#. Translators: This is the arrow for "Back" buttons
704#: qml/Wizard/StackButton.qml:39
688#: qml/Wizard/StackButton.qml:39
705#, qt-format
689#, qt-format
qml/Components/MediaServices/VideoPlayerControls.qml+2−2
@@ -38,12 +38,12 @@ MediaServicesControls {
38 if (secs < 10) secs = "0%1".arg(secs);
38 if (secs < 10) secs = "0%1".arg(secs);
39 if (min < 10) min = "0%1".arg(min);
39 if (min < 10) min = "0%1".arg(min);
40 if (hour > 0) {
40 if (hour > 0) {
41− // Translators: this refers to a duration/remaining time of the video in hours, minutes and seconds,
41+ // TRANSLATORS: this refers to a duration/remaining time of the video in hours, minutes and seconds,
42 // of which you can change the order.
42 // of which you can change the order.
43 // %1 refers to hours, %2 refers to minutes and %3 refers to seconds.
43 // %1 refers to hours, %2 refers to minutes and %3 refers to seconds.
44 return i18n.tr("%1:%2:%3").arg(hour).arg(min).arg(secs);
44 return i18n.tr("%1:%2:%3").arg(hour).arg(min).arg(secs);
45 } else {
45 } else {
46− // Translators: this refers to a duration/remaining time of the video in minutes and seconds,
46+ // TRANSLATORS: this refers to a duration/remaining time of the video in minutes and seconds,
47 // of which you can change the order.
47 // of which you can change the order.
48 // %1 refers to minutes and %2 refers to seconds.
48 // %1 refers to minutes and %2 refers to seconds.
49 return i18n.tr("%1:%2").arg(min).arg(secs);
49 return i18n.tr("%1:%2").arg(min).arg(secs);
qml/Dash/Previews/PreviewInlineVideo.qmlnew file+89
@@ -0,0 +1,89 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtMultimedia 5.0
19+import Ubuntu.Components 1.2
20+import Ubuntu.Thumbnailer 0.1
21+//import Ubuntu.Content 0.1
22+import "../../Components/MediaServices"
23+
24+/*! \brief Preview widget for video.
25+
26+ This widget shows video contained in widgetData["source"],
27+ with a placeholder screenshot specified by widgetData["screenshot"].
28+ */
29+
30+PreviewWidget {
31+ id: root
32+ implicitWidth: units.gu(35)
33+ implicitHeight: services.height
34+
35+ property alias rootItem: services.rootItem
36+
37+ MediaServices {
38+ id: services
39+ width: parent.width
40+
41+ context: "video"
42+ sourceData: root.isCurrentPreview ? widgetData : undefined
43+ fullscreen: false
44+ maximumEmbeddedHeight: rootItem.height / 2
45+
46+ onClose: fullscreen = false
47+
48+// actions: [
49+// Action {
50+// text: i18n.tr("Share")
51+// iconSource: "image://theme/share"
52+// onTriggered: sharePicker.visible = true
53+// }
54+// ]
55+ }
56+
57+// Component {
58+// id: contentItemComp
59+// ContentItem {
60+// url: widgetData["source"]
61+// }
62+// }
63+// ContentPeerPicker {
64+// id: sharePicker
65+// objectName: "sharePickerEvents"
66+// anchors.fill: parent
67+// showTitle: false
68+// visible: false
69+// parent: rootItem
70+// z: 100
71+
72+// contentType: ContentType.Videos
73+// handler: ContentHandler.Share
74+
75+// onPeerSelected: {
76+// visible = false;
77+
78+// var curTransfer = peer.request();
79+// if (curTransfer.state === ContentTransfer.InProgress)
80+// {
81+// var medias = [ contentItemComp.createObject(parent) ]
82+// curTransfer.state = ContentTransfer.Charged;
83+// }
84+// }
85+// onCancelPressed: {
86+// visible = false;
87+// }
88+// }
89+}
qml/Dash/Previews/PreviewVideoPlayback.qml+41−15
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2014 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -15,11 +15,9 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import QtMultimedia 5.0
19−import Ubuntu.Components 1.2
18+import Ubuntu.Components 0.1
20import Ubuntu.Thumbnailer 0.1
19import Ubuntu.Thumbnailer 0.1
21−//import Ubuntu.Content 0.1
22−import "../../Components/MediaServices"
20+import "../../Components"
23
21
24/*! \brief Preview widget for video.
22/*! \brief Preview widget for video.
25
23
@@ -30,19 +28,47 @@ import "../../Components/MediaServices"
30PreviewWidget {
28PreviewWidget {
31 id: root
29 id: root
32 implicitWidth: units.gu(35)
30 implicitWidth: units.gu(35)
33− implicitHeight: services.height
31+ implicitHeight: childrenRect.height
34
32
35− property alias rootItem: services.rootItem
33+ LazyImage {
34+ objectName: "screenshot"
35+ anchors {
36+ left: parent.left
37+ right: parent.right
38+ }
39+ scaleTo: "width"
40+ source: {
41+ var screenshot = widgetData["screenshot"];
42+ if (screenshot) return screenshot;
36
43
37− MediaServices {
44+ var source = widgetData["source"];
38− id: services
45+ if (source) {
39− width: parent.width
46+ if (source.toString().indexOf("file://") === 0) {
47+ return "image://thumbnailer/" + source.toString().substr(7);
48+ }
49+ }
40
50
41− context: "video"
51+ return "";
42− sourceData: root.isCurrentPreview ? widgetData : undefined
52+ }
43− fullscreen: false
53+ initialHeight: width * 10 / 16
44− maximumEmbeddedHeight: rootItem.height / 2
45
54
46− onClose: fullscreen = false
55+ Image {
56+ objectName: "playButton"
57+
58+ readonly property bool bigButton: parent.width > units.gu(40)
59+
60+ anchors.centerIn: parent
61+ width: bigButton ? units.gu(8) : units.gu(4.5)
62+ height: width
63+ source: "../graphics/play_button%1%2.png".arg(previewImageMouseArea.pressed ? "_active" : "").arg(bigButton ? "_big" : "")
64+ visible: parent.state === "ready"
65+ }
66+
67+ MouseArea {
68+ enabled: parent.state === "ready"
69+ id: previewImageMouseArea
70+ anchors.fill: parent
71+ onClicked: Qt.openUrlExternally(widgetData["source"])
72+ }
47 }
73 }
48}
74}
qml/Dash/Previews/PreviewWidgetFactory.qml+1−1
@@ -61,7 +61,7 @@ Loader {
61 case "reviews": return "PreviewRatingDisplay.qml";
61 case "reviews": return "PreviewRatingDisplay.qml";
62 case "table": return "PreviewTable.qml";
62 case "table": return "PreviewTable.qml";
63 case "text": return "PreviewTextSummary.qml";
63 case "text": return "PreviewTextSummary.qml";
64− case "video": return "PreviewVideoPlayback.qml";
64+ case "video": return "PreviewInlineVideo.qml";
65 default: return "";
65 default: return "";
66 }
66 }
67 }
67 }
tests/qmltests/CMakeLists.txt+1−1
@@ -10,7 +10,6 @@ add_unity8_qmltest(Components Dialogs LIGHTDM)
10add_unity8_qmltest(Components DraggingArea)
10add_unity8_qmltest(Components DraggingArea)
11add_unity8_qmltest(Components LazyImage)
11add_unity8_qmltest(Components LazyImage)
12add_unity8_qmltest(Components Lockscreen)
12add_unity8_qmltest(Components Lockscreen)
13−add_unity8_qmltest(Components MediaServices)
14add_unity8_qmlunittest(Components PhysicalKeysMapper)
13add_unity8_qmlunittest(Components PhysicalKeysMapper)
15add_unity8_qmltest(Components Rating)
14add_unity8_qmltest(Components Rating)
16add_unity8_qmltest(Components ResponsiveGridView)
15add_unity8_qmltest(Components ResponsiveGridView)
@@ -31,6 +30,7 @@ add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)
31add_unity8_qmltest(Dash/Previews PreviewExpandable)
30add_unity8_qmltest(Dash/Previews PreviewExpandable)
32add_unity8_qmltest(Dash/Previews PreviewHeader)
31add_unity8_qmltest(Dash/Previews PreviewHeader)
33add_unity8_qmltest(Dash/Previews PreviewImageGallery)
32add_unity8_qmltest(Dash/Previews PreviewImageGallery)
33+add_unity8_qmltest(Dash/Previews PreviewInlineVideo)
34add_unity8_qmltest(Dash/Previews PreviewPayments)
34add_unity8_qmltest(Dash/Previews PreviewPayments)
35add_unity8_qmltest(Dash/Previews PreviewProgress)
35add_unity8_qmltest(Dash/Previews PreviewProgress)
36add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
36add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
tests/qmltests/Dash/Previews/tst_PreviewInlineVideo.qmlnew file+106
@@ -0,0 +1,106 @@
1+/*
2+ * Copyright 2015 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import "../../../../qml/Dash/Previews"
20+import Unity.Test 0.1 as UT
21+import Ubuntu.Components 1.2
22+import QtMultimedia 5.0
23+
24+Rectangle {
25+ width: units.gu(70)
26+ height: units.gu(80)
27+ color: "lightgrey"
28+
29+ property var widgetData0: {
30+ "source": "file:///test-video1",
31+ "screenshot": Qt.resolvedUrl("../artwork/avatar.png")
32+ }
33+
34+ property var widgetData1: {
35+ "source": "file:///test-video2",
36+ "screenshot": "file:///test-video2-screenshot"
37+ }
38+
39+ MediaDataSource {
40+ source: "file:///test-video1"
41+ duration: 6000000
42+ metaData: {
43+ "title" : "TEST MPEG",
44+ "resolution" : { "width": 1920, "height": 1080 }
45+ }
46+ }
47+
48+ Item {
49+ anchors.fill: parent
50+
51+ Item {
52+ id: inner
53+ anchors {
54+ top: parent.top
55+ bottom: parent.bottom
56+ left: parent.left
57+ right: controls.left
58+ }
59+
60+ Item {
61+ anchors.fill: parent
62+ anchors.margins: units.gu(2)
63+
64+ PreviewInlineVideo {
65+ id: videoPlayback
66+ width: parent.width
67+ widgetData: widgetData0
68+
69+ rootItem: inner
70+ }
71+ }
72+
73+ }
74+
75+ Rectangle {
76+ id: controls
77+ color: "darkgrey"
78+ anchors {
79+ top: parent.top
80+ bottom: parent.bottom
81+ right: parent.right
82+ }
83+ width: units.gu(30)
84+
85+ Column {
86+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
87+
88+ UT.MouseTouchEmulationCheckbox {}
89+ }
90+ }
91+ }
92+
93+ UT.UnityTestCase {
94+ name: "PreviewInlineVideoTest"
95+ when: windowShown
96+
97+ function test_loadScreenshot() {
98+ var screenshot = findChild(videoPlayback, "screenshot");
99+ verify(screenshot !== null);
100+
101+ videoPlayback.widgetData = widgetData1;
102+ var screenshotSource = screenshot.source
103+ compare(screenshotSource.toString(), "file:///test-video2-screenshot");
104+ }
105+ }
106+}
tests/qmltests/Dash/Previews/tst_PreviewVideoPlayback.qml+17−62
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2014 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -18,89 +18,44 @@ import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import "../../../../qml/Dash/Previews"
19import "../../../../qml/Dash/Previews"
20import Unity.Test 0.1 as UT
20import Unity.Test 0.1 as UT
21−import Ubuntu.Components 1.2
22−import QtMultimedia 5.0
23
21
24Rectangle {
22Rectangle {
23+ id: root
25− width: units.gu(70)
24+ width: units.gu(40)
26 height: units.gu(80)
25 height: units.gu(80)
27 color: "lightgrey"
26 color: "lightgrey"
28
27
29 property var widgetData0: {
28 property var widgetData0: {
30− "source": "file:///test-video1",
29+ "source": "",
31− "screenshot": Qt.resolvedUrl("../artwork/avatar.png")
30+ "screenshot": ""
32 }
31 }
33
32
34 property var widgetData1: {
33 property var widgetData1: {
35− "source": "file:///test-video2",
34+ "source": "",
36− "screenshot": "file:///test-video2-screenshot"
35+ "screenshot": "../../../tests/qmltests/Components/tst_LazyImage/square.png"
37 }
36 }
38
37
39− MediaDataSource {
38+ property var widgetData2: {
40− source: "file:///test-video1"
39+ "source": "file:///path/to/local/file",
41− duration: 6000000
40+ "screenshot": ""
42− metaData: {
43− "title" : "TEST MPEG",
44− "resolution" : { "width": 1920, "height": 1080 }
45− }
46 }
41 }
47
42
48− Item {
49− anchors.fill: parent
50−
51− Item {
52− id: inner
53− anchors {
54− top: parent.top
55− bottom: parent.bottom
56− left: parent.left
57− right: controls.left
58− }
59−
60− Item {
61− anchors.fill: parent
62− anchors.margins: units.gu(2)
63−
64− PreviewVideoPlayback {
43+ PreviewVideoPlayback {
65− id: videoPlayback
44+ id: videoPlayback
66− width: parent.width
45+ width: parent.width
67− widgetData: widgetData0
46+ widgetData: widgetData1
68−
69− rootItem: inner
70− }
71− }
72−
73− }
74−
75− Rectangle {
76− id: controls
77− color: "darkgrey"
78− anchors {
79− top: parent.top
80− bottom: parent.bottom
81− right: parent.right
82− }
83− width: units.gu(30)
84−
85− Column {
86− anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
87−
88− UT.MouseTouchEmulationCheckbox {}
89− }
90− }
91 }
47 }
92
48
93 UT.UnityTestCase {
49 UT.UnityTestCase {
94− name: "PreviewInlineVideoTest"
50+ name: "PreviewVideoPlaybackTest"
95 when: windowShown
51 when: windowShown
96
52
97 function test_loadScreenshot() {
53 function test_loadScreenshot() {
98 var screenshot = findChild(videoPlayback, "screenshot");
54 var screenshot = findChild(videoPlayback, "screenshot");
99− verify(screenshot !== null);
100
55
101− videoPlayback.widgetData = widgetData1;
56+ videoPlayback.widgetData = widgetData2;
102 var screenshotSource = screenshot.source
57 var screenshotSource = screenshot.source
103− compare(screenshotSource.toString(), "file:///test-video2-screenshot");
58+ verify(screenshotSource.toString().indexOf("image://thumbnailer/") === 0)
104 }
59 }
105 }
60 }
106}
61}