on xenial help sign in
fix issues from review
e8c8848Michael Zanetti
qml/Dash/Previews/PreviewCommentInput.qml+2−5
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.1
19import "../../Components"
19import "../../Components"
20
20
21/*! \brief Preview widget for commenting.
21/*! \brief Preview widget for commenting.
@@ -33,9 +33,6 @@ PreviewWidget {
33 property alias commentText: commentTextArea.text
33 property alias commentText: commentTextArea.text
34
34
35 function submit() {
35 function submit() {
36− // checks if comment text area actually contains something
37− if (commentTextArea.text === "") return;
38−
39 var data = { "comment": commentTextArea.text };
36 var data = { "comment": commentTextArea.text };
40 triggered(root.widgetId, "commented", data);
37 triggered(root.widgetId, "commented", data);
41 }
38 }
@@ -78,7 +75,7 @@ PreviewWidget {
78 id: submitButton
75 id: submitButton
79 objectName: "submitButton"
76 objectName: "submitButton"
80
77
81− readonly property bool readyToSubmit: commentTextArea.text.length > 0
78+ readonly property bool readyToSubmit: commentTextArea.text.trim().length > 0
82
79
83 anchors {
80 anchors {
84 top: parent.top
81 top: parent.top
tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+1−1
@@ -16,7 +16,7 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.1
20import "../../../../qml/Dash/Previews"
20import "../../../../qml/Dash/Previews"
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22