on xenial help sign in
Renames
commitfa42def9ebec7e18cb111d5691064c55500452ef authorAndrea Cimitan <andrea.cimitan@gmail.com> dateWed 1 Jul 2015, 16:48 (11 years ago) parent11d074b
5 files changed+16−16
qml/Dash/Previews/PreviewSocialComment.qml → qml/Dash/Previews/PreviewComment.qml+1−1 qml/Dash/Previews/PreviewWidgetFactory.qml+1−1 tests/qmltests/CMakeLists.txt+1−1 tests/qmltests/Dash/Previews/tst_PreviewSocialComment.qml → tests/qmltests/Dash/Previews/tst_PreviewComment.qml+12−12 tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+1−1
qml/Dash/Previews/PreviewSocialComment.qml → qml/Dash/Previews/PreviewComment.qmlrenamed+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 1.2
1919
20−/*! \brief Preview widget for social comments.
20+/*! \brief Preview widget for comments.
2121
2222 This widget shows an (optional) avatar contained in widgetData["source"]
2323 along with a label that comes from widgetData["author"],
qml/Dash/Previews/PreviewWidgetFactory.qml+1−1
@@ -50,6 +50,7 @@ Loader {
5050 switch (widgetType) {
5151 case "actions": return "PreviewActions.qml";
5252 case "audio": return "PreviewAudioPlayback.qml";
53+ case "comment": return "PreviewComment.qml";
5354 case "comment-input": return "PreviewCommentInput.qml";
5455 case "expandable": return "PreviewExpandable.qml";
5556 case "gallery": return "PreviewImageGallery.qml";
@@ -60,7 +61,6 @@ Loader {
6061 case "rating-input": return "PreviewRatingInput.qml";
6162 case "rating-edit": return "PreviewRatingEdit.qml";
6263 case "reviews": return "PreviewRatingDisplay.qml";
63− case "social-comment": return "PreviewSocialComment.qml";
6464 case "table": return "PreviewTable.qml";
6565 case "text": return "PreviewTextSummary.qml";
6666 case "video": return "PreviewVideoPlayback.qml";
tests/qmltests/CMakeLists.txt+1−1
@@ -27,6 +27,7 @@ add_unity8_qmltest(Dash PreviewListView)
2727add_unity8_qmltest(Dash/Previews Preview)
2828add_unity8_qmltest(Dash/Previews PreviewActions)
2929add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)
30+add_unity8_qmltest(Dash/Previews PreviewComment)
3031add_unity8_qmltest(Dash/Previews PreviewCommentInput)
3132add_unity8_qmltest(Dash/Previews PreviewExpandable)
3233add_unity8_qmltest(Dash/Previews PreviewHeader)
@@ -36,7 +37,6 @@ add_unity8_qmltest(Dash/Previews PreviewProgress)
3637add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
3738add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
3839add_unity8_qmltest(Dash/Previews PreviewRatingInput)
39−add_unity8_qmltest(Dash/Previews PreviewSocialComment)
4040add_unity8_qmltest(Dash/Previews PreviewTable)
4141add_unity8_qmltest(Dash/Previews PreviewTextSummary)
4242add_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 {
4646 "source": "../../graphics/avatars/amanda@12.png"
4747 }
4848
49− PreviewSocialComment {
50− id: previewCommentInput
49+ PreviewComment {
50+ id: previewComment
5151 anchors.left: parent.left
5252 anchors.right: parent.right
5353 widgetData: comment
54− widgetId: "previewSocialComment"
54+ widgetId: "previewComment"
5555 }
5656
5757 UT.UnityTestCase {
58− name: "PreviewSocialCommentTest"
58+ name: "PreviewCommentTest"
5959 when: windowShown
6060
6161 function init() {
62− previewCommentInput.widgetData = comment;
62+ previewComment.widgetData = comment;
6363 }
6464
6565 function test_AnchorsNoAvatar() {
66− var column = findChild(previewCommentInput, "column");
67− var avatar = findChild(previewCommentInput, "avatar");
66+ var column = findChild(previewComment, "column");
67+ var avatar = findChild(previewComment, "avatar");
6868
69− compare(previewCommentInput.widgetData, comment);
69+ compare(previewComment.widgetData, comment);
7070 compare(avatar.visible, true);
7171 compare(column.anchors.left, avatar.anchors.right);
7272
73− previewCommentInput.widgetData = commentNoImage;
73+ previewComment.widgetData = commentNoImage;
7474 tryCompare(avatar, "visible", false);
75− compare(column.anchors.left, previewCommentInput.anchors.left);
75+ compare(column.anchors.left, previewComment.anchors.left);
7676 }
7777
7878 function test_OptionalSubtitle() {
79− var subtitle = findChild(previewCommentInput, "subtitle");
80− previewCommentInput.widgetData = commentNoSubtitle;
79+ var subtitle = findChild(previewComment, "subtitle");
80+ previewComment.widgetData = commentNoSubtitle;
8181 tryCompare(subtitle, "visible", false);
8282 }
8383 }
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+1−1
@@ -77,6 +77,7 @@ Rectangle {
7777 return [
7878 { tag: "Actions", type: "actions", source: "PreviewActions.qml" },
7979 { tag: "Audio", type: "audio", source: "PreviewAudioPlayback.qml" },
80+ { tag: "Comment", type: "comment", source: "PreviewComment.qml" },
8081 { tag: "Comment Input", type: "comment-input", source: "PreviewCommentInput.qml" },
8182 { tag: "Expandable", type: "expandable", source: "PreviewExpandable.qml" },
8283 { tag: "Gallery", type: "gallery", source: "PreviewImageGallery.qml" },
@@ -85,7 +86,6 @@ Rectangle {
8586 { tag: "Progress", type: "progress", source: "PreviewProgress.qml" },
8687 { tag: "Rating Input", type: "rating-input", source: "PreviewRatingInput.qml" },
8788 { tag: "Rating Display", type: "reviews", source: "PreviewRatingDisplay.qml" },
88− { tag: "Social Comment", type: "social-comment", source: "PreviewSocialComment.qml" },
8989 { tag: "Table", type: "table", source: "PreviewTable.qml" },
9090 { tag: "Text", type: "text", source: "PreviewTextSummary.qml" },
9191 { tag: "Video", type: "video", source: "PreviewVideoPlayback.qml" },