on xenial help sign in
fix issues from review
commite8c88480e54c15c7432bf5e1ddf06b7573716ce7 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 1 Jun 2015, 20:40 (11 years ago) parentb4b85e7
2 files changed+3−6
qml/Dash/Previews/PreviewCommentInput.qml+2−5 tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+1−1
qml/Dash/Previews/PreviewCommentInput.qml+2−5
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.1
1919import "../../Components"
2020
2121/*! \brief Preview widget for commenting.
@@ -33,9 +33,6 @@ PreviewWidget {
3333 property alias commentText: commentTextArea.text
3434
3535 function submit() {
36− // checks if comment text area actually contains something
37− if (commentTextArea.text === "") return;
38−
3936 var data = { "comment": commentTextArea.text };
4037 triggered(root.widgetId, "commented", data);
4138 }
@@ -78,7 +75,7 @@ PreviewWidget {
7875 id: submitButton
7976 objectName: "submitButton"
8077
81− readonly property bool readyToSubmit: commentTextArea.text.length > 0
78+ readonly property bool readyToSubmit: commentTextArea.text.trim().length > 0
8279
8380 anchors {
8481 top: parent.top
tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.1
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222