on xenial help sign in
Renames
fa42defAndrea Cimitan
qml/Dash/Previews/PreviewSocialComment.qml → qml/Dash/Previews/PreviewComment.qmlrenamed+1−1
@@ -17,7 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 1.2
18import Ubuntu.Components 1.2
19
19
20−/*! \brief Preview widget for social comments.
20+/*! \brief Preview widget for comments.
21
21
22 This widget shows an (optional) avatar contained in widgetData["source"]
22 This widget shows an (optional) avatar contained in widgetData["source"]
23 along with a label that comes from widgetData["author"],
23 along with a label that comes from widgetData["author"],
qml/Dash/Previews/PreviewWidgetFactory.qml+1−1
@@ -50,6 +50,7 @@ Loader {
50 switch (widgetType) {
50 switch (widgetType) {
51 case "actions": return "PreviewActions.qml";
51 case "actions": return "PreviewActions.qml";
52 case "audio": return "PreviewAudioPlayback.qml";
52 case "audio": return "PreviewAudioPlayback.qml";
53+ case "comment": return "PreviewComment.qml";
53 case "comment-input": return "PreviewCommentInput.qml";
54 case "comment-input": return "PreviewCommentInput.qml";
54 case "expandable": return "PreviewExpandable.qml";
55 case "expandable": return "PreviewExpandable.qml";
55 case "gallery": return "PreviewImageGallery.qml";
56 case "gallery": return "PreviewImageGallery.qml";
@@ -60,7 +61,6 @@ Loader {
60 case "rating-input": return "PreviewRatingInput.qml";
61 case "rating-input": return "PreviewRatingInput.qml";
61 case "rating-edit": return "PreviewRatingEdit.qml";
62 case "rating-edit": return "PreviewRatingEdit.qml";
62 case "reviews": return "PreviewRatingDisplay.qml";
63 case "reviews": return "PreviewRatingDisplay.qml";
63− case "social-comment": return "PreviewSocialComment.qml";
64 case "table": return "PreviewTable.qml";
64 case "table": return "PreviewTable.qml";
65 case "text": return "PreviewTextSummary.qml";
65 case "text": return "PreviewTextSummary.qml";
66 case "video": return "PreviewVideoPlayback.qml";
66 case "video": return "PreviewVideoPlayback.qml";
tests/qmltests/CMakeLists.txt+1−1
@@ -27,6 +27,7 @@ add_unity8_qmltest(Dash PreviewListView)
27add_unity8_qmltest(Dash/Previews Preview)
27add_unity8_qmltest(Dash/Previews Preview)
28add_unity8_qmltest(Dash/Previews PreviewActions)
28add_unity8_qmltest(Dash/Previews PreviewActions)
29add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)
29add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)
30+add_unity8_qmltest(Dash/Previews PreviewComment)
30add_unity8_qmltest(Dash/Previews PreviewCommentInput)
31add_unity8_qmltest(Dash/Previews PreviewCommentInput)
31add_unity8_qmltest(Dash/Previews PreviewExpandable)
32add_unity8_qmltest(Dash/Previews PreviewExpandable)
32add_unity8_qmltest(Dash/Previews PreviewHeader)
33add_unity8_qmltest(Dash/Previews PreviewHeader)
@@ -36,7 +37,6 @@ add_unity8_qmltest(Dash/Previews PreviewProgress)
36add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
37add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
37add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
38add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
38add_unity8_qmltest(Dash/Previews PreviewRatingInput)
39add_unity8_qmltest(Dash/Previews PreviewRatingInput)
39−add_unity8_qmltest(Dash/Previews PreviewSocialComment)
40add_unity8_qmltest(Dash/Previews PreviewTable)
40add_unity8_qmltest(Dash/Previews PreviewTable)
41add_unity8_qmltest(Dash/Previews PreviewTextSummary)
41add_unity8_qmltest(Dash/Previews PreviewTextSummary)
42add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
42add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
tests/qmltests/Dash/Previews/tst_PreviewSocialComment.qml → tests/qmltests/Dash/Previews/tst_PreviewComment.qmlrenamed+12−12
@@ -46,38 +46,38 @@ Rectangle {
46 "source": "../../graphics/avatars/amanda@12.png"
46 "source": "../../graphics/avatars/amanda@12.png"
47 }
47 }
48
48
49− PreviewSocialComment {
49+ PreviewComment {
50− id: previewCommentInput
50+ id: previewComment
51 anchors.left: parent.left
51 anchors.left: parent.left
52 anchors.right: parent.right
52 anchors.right: parent.right
53 widgetData: comment
53 widgetData: comment
54− widgetId: "previewSocialComment"
54+ widgetId: "previewComment"
55 }
55 }
56
56
57 UT.UnityTestCase {
57 UT.UnityTestCase {
58− name: "PreviewSocialCommentTest"
58+ name: "PreviewCommentTest"
59 when: windowShown
59 when: windowShown
60
60
61 function init() {
61 function init() {
62− previewCommentInput.widgetData = comment;
62+ previewComment.widgetData = comment;
63 }
63 }
64
64
65 function test_AnchorsNoAvatar() {
65 function test_AnchorsNoAvatar() {
66− var column = findChild(previewCommentInput, "column");
66+ var column = findChild(previewComment, "column");
67− var avatar = findChild(previewCommentInput, "avatar");
67+ var avatar = findChild(previewComment, "avatar");
68
68
69− compare(previewCommentInput.widgetData, comment);
69+ compare(previewComment.widgetData, comment);
70 compare(avatar.visible, true);
70 compare(avatar.visible, true);
71 compare(column.anchors.left, avatar.anchors.right);
71 compare(column.anchors.left, avatar.anchors.right);
72
72
73− previewCommentInput.widgetData = commentNoImage;
73+ previewComment.widgetData = commentNoImage;
74 tryCompare(avatar, "visible", false);
74 tryCompare(avatar, "visible", false);
75− compare(column.anchors.left, previewCommentInput.anchors.left);
75+ compare(column.anchors.left, previewComment.anchors.left);
76 }
76 }
77
77
78 function test_OptionalSubtitle() {
78 function test_OptionalSubtitle() {
79− var subtitle = findChild(previewCommentInput, "subtitle");
79+ var subtitle = findChild(previewComment, "subtitle");
80− previewCommentInput.widgetData = commentNoSubtitle;
80+ previewComment.widgetData = commentNoSubtitle;
81 tryCompare(subtitle, "visible", false);
81 tryCompare(subtitle, "visible", false);
82 }
82 }
83 }
83 }
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+1−1
@@ -77,6 +77,7 @@ Rectangle {
77 return [
77 return [
78 { tag: "Actions", type: "actions", source: "PreviewActions.qml" },
78 { tag: "Actions", type: "actions", source: "PreviewActions.qml" },
79 { tag: "Audio", type: "audio", source: "PreviewAudioPlayback.qml" },
79 { tag: "Audio", type: "audio", source: "PreviewAudioPlayback.qml" },
80+ { tag: "Comment", type: "comment", source: "PreviewComment.qml" },
80 { tag: "Comment Input", type: "comment-input", source: "PreviewCommentInput.qml" },
81 { tag: "Comment Input", type: "comment-input", source: "PreviewCommentInput.qml" },
81 { tag: "Expandable", type: "expandable", source: "PreviewExpandable.qml" },
82 { tag: "Expandable", type: "expandable", source: "PreviewExpandable.qml" },
82 { tag: "Gallery", type: "gallery", source: "PreviewImageGallery.qml" },
83 { tag: "Gallery", type: "gallery", source: "PreviewImageGallery.qml" },
@@ -85,7 +86,6 @@ Rectangle {
85 { tag: "Progress", type: "progress", source: "PreviewProgress.qml" },
86 { tag: "Progress", type: "progress", source: "PreviewProgress.qml" },
86 { tag: "Rating Input", type: "rating-input", source: "PreviewRatingInput.qml" },
87 { tag: "Rating Input", type: "rating-input", source: "PreviewRatingInput.qml" },
87 { tag: "Rating Display", type: "reviews", source: "PreviewRatingDisplay.qml" },
88 { tag: "Rating Display", type: "reviews", source: "PreviewRatingDisplay.qml" },
88− { tag: "Social Comment", type: "social-comment", source: "PreviewSocialComment.qml" },
89 { tag: "Table", type: "table", source: "PreviewTable.qml" },
89 { tag: "Table", type: "table", source: "PreviewTable.qml" },
90 { tag: "Text", type: "text", source: "PreviewTextSummary.qml" },
90 { tag: "Text", type: "text", source: "PreviewTextSummary.qml" },
91 { tag: "Video", type: "video", source: "PreviewVideoPlayback.qml" },
91 { tag: "Video", type: "video", source: "PreviewVideoPlayback.qml" },