on xenial help sign in
Rename PreviewRating to PreviewRatingInput
commit05d8ae80db13ed066d17224bf1dfb27c27e472df authorAndrea Cimitan <andrea.cimitan@canonical.com> dateFri 28 Feb 2014, 10:47 (13 years ago) parentf79f0e1c62f417
5 files changed+18−18
qml/Dash/Previews/PreviewRating.qml → qml/Dash/Previews/PreviewRatingInput.qml qml/Dash/Previews/PreviewWidgetFactory.qml+1−1 tests/qmltests/CMakeLists.txt+1−1 tests/qmltests/Dash/Previews/tst_PreviewRating.qml → tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+15−15 tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+1−1
qml/Dash/Previews/PreviewRating.qml → qml/Dash/Previews/PreviewRatingInput.qmlrenamed

The content is the same.

qml/Dash/Previews/PreviewWidgetFactory.qml+1−1
@@ -48,7 +48,7 @@ Loader {
4848 case "header": return "PreviewHeader.qml";
4949 case "image": return "PreviewZoomableImage.qml"
5050 case "progress": return "PreviewProgress.qml";
51− case "rating-input": return "PreviewRating.qml";
51+ case "rating-input": return "PreviewRatingInput.qml";
5252 case "text": return "PreviewTextSummary.qml";
5353 case "video": return "PreviewVideoPlayback.qml";
5454 default: return "";
tests/qmltests/CMakeLists.txt+1−1
@@ -62,7 +62,7 @@ add_qml_test(Dash/Previews PreviewAudioPlayback IMPORT_PATHS ${qmltest_DEFAULT_I
6262add_qml_test(Dash/Previews PreviewHeader IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
6363add_qml_test(Dash/Previews PreviewImageGallery IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
6464add_qml_test(Dash/Previews PreviewProgress IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
65−add_qml_test(Dash/Previews PreviewRating IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
65+add_qml_test(Dash/Previews PreviewRatingInput IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
6666add_qml_test(Dash/Previews PreviewTextSummary IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
6767add_qml_test(Dash/Previews PreviewVideoPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
6868add_qml_test(Dash/Previews PreviewWidgetFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
tests/qmltests/Dash/Previews/tst_PreviewRating.qml → tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qmlrenamed+15−15
@@ -43,12 +43,12 @@ Rectangle {
4343
4444 property var widgetDataNewLabels: { "visible": "both", "required": "both", "rating-label": "TestRatingLabel", "review-label": "TestReviewLabel", "submit-label": "TestSubmitLabel" }
4545
46− PreviewRating {
47− id: previewRating
46+ PreviewRatingInput {
47+ id: previewRatingInput
4848 anchors.left: parent.left
4949 anchors.right: parent.right
5050 widgetData: widgetDataBoth
51− widgetId: "previewRating"
51+ widgetId: "previewRatingInput"
5252 }
5353
5454 SignalSpy {
@@ -57,12 +57,12 @@ Rectangle {
5757 }
5858
5959 UT.UnityTestCase {
60− name: "PreviewRatingTest"
60+ name: "PreviewRatingInputTest"
6161 when: windowShown
6262
63− property var rating: findChild(previewRating, "rating")
64− property var reviewTextArea: findChild(previewRating, "reviewTextArea")
65− property var submitButton: findChild(previewRating, "submitButton")
63+ property var rating: findChild(previewRatingInput, "rating")
64+ property var reviewTextArea: findChild(previewRatingInput, "reviewTextArea")
65+ property var submitButton: findChild(previewRatingInput, "submitButton")
6666
6767 function init() {
6868 rating.value = -1;
@@ -70,10 +70,10 @@ Rectangle {
7070 }
7171
7272 function test_labels() {
73− var ratingLabel = findChild(previewRating, "ratingLabel");
74− var reviewLabel = findChild(previewRating, "reviewLabel");
73+ var ratingLabel = findChild(previewRatingInput, "ratingLabel");
74+ var reviewLabel = findChild(previewRatingInput, "reviewLabel");
7575
76− previewRating.widgetData = widgetDataNewLabels;
76+ previewRatingInput.widgetData = widgetDataNewLabels;
7777 compare(ratingLabel.text, widgetDataNewLabels["rating-label"]);
7878 compare(reviewLabel.text, widgetDataNewLabels["review-label"]);
7979 compare(submitButton.text, widgetDataNewLabels["submit-label"]);
@@ -106,9 +106,9 @@ Rectangle {
106106
107107 function test_submit_and_visibility(data) {
108108 spy.clear();
109− spy.target = previewRating;
109+ spy.target = previewRatingInput;
110110
111− previewRating.widgetData = data.widgetData;
111+ previewRatingInput.widgetData = data.widgetData;
112112
113113 if (data.widgetData["visible"] !== "review") {
114114 verify(rating.visible === true);
@@ -161,9 +161,9 @@ Rectangle {
161161
162162 function test_triggered(data) {
163163 spy.clear();
164− spy.target = previewRating;
164+ spy.target = previewRatingInput;
165165
166− previewRating.widgetData = data.widgetData;
166+ previewRatingInput.widgetData = data.widgetData;
167167
168168 if (data.inputRating > 0) rating.value = data.inputRating;
169169 if (data.inputText !== "") {
@@ -173,7 +173,7 @@ Rectangle {
173173
174174 compare(spy.count, 1);
175175 var args = spy.signalArguments[0];
176− compare(args[0], previewRating.widgetId);
176+ compare(args[0], previewRatingInput.widgetId);
177177 compare(args[1], data.widgetData["required"]);
178178 compare(args[2]["rating"], data.triggeredData["rating"]);
179179 compare(args[2]["review"], data.triggeredData["review"]);
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+1−1
@@ -81,7 +81,7 @@ Rectangle {
8181 { tag: "Header", type: "header", source: "PreviewHeader.qml" },
8282 { tag: "Image", type: "image", source: "PreviewZoomableImage.qml" },
8383 { tag: "Progress", type: "progress", source: "PreviewProgress.qml" },
84− { tag: "Rating Input", type: "rating-input", source: "PreviewRating.qml" },
84+ { tag: "Rating Input", type: "rating-input", source: "PreviewRatingInput.qml" },
8585 { tag: "Text", type: "text", source: "PreviewTextSummary.qml" },
8686 { tag: "Video", type: "video", source: "PreviewVideoPlayback.qml" },
8787 ];