on xenial help sign in
Rename CardAttributesGrid to CardAttributes.
8cf8e82Ying-Chun Liu
plugins/Dash/CardAttributesGrid.qml → plugins/Dash/CardAttributes.qmlrenamed+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
1import QtQuick 2.2
17import QtQuick 2.2
2import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
3import Ubuntu.Components 1.1
19import Ubuntu.Components 1.1
plugins/Dash/CardCreator.js+1−1
@@ -274,7 +274,7 @@ var kSubtitleLabelCode = 'Label { \n\
274 }\n';
274 }\n';
275
275
276// %1 is used as anchors of attributesRow
276// %1 is used as anchors of attributesRow
277−var kAttributesRowCode = 'CardAttributesGrid { \n\
277+var kAttributesRowCode = 'CardAttributes { \n\
278 id: attributesRow; \n\
278 id: attributesRow; \n\
279 objectName: "attributesRow"; \n\
279 objectName: "attributesRow"; \n\
280 anchors { %1 } \n\
280 anchors { %1 } \n\
plugins/Dash/qmldir+1−1
@@ -3,4 +3,4 @@ plugin Dash-qml
3typeinfo Dash.qmltypes
3typeinfo Dash.qmltypes
4singleton CardCreatorCache 0.1 CardCreatorCache.qml
4singleton CardCreatorCache 0.1 CardCreatorCache.qml
5ScopeStyle 0.1 ScopeStyle.qml
5ScopeStyle 0.1 ScopeStyle.qml
6−CardAttributesGrid 0.1 CardAttributesGrid.qml
6+CardAttributes 0.1 CardAttributes.qml
tests/plugins/Dash/CMakeLists.txt+1−1
@@ -79,4 +79,4 @@ set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
79set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")
79set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")
80add_qml_test(. ScopeStyle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
80add_qml_test(. ScopeStyle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
81add_qml_test(. ListViewWithPageHeaderQML IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
81add_qml_test(. ListViewWithPageHeaderQML IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
82−add_qml_test(. CardAttributesGrid IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
82+add_qml_test(. CardAttributes IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
tests/plugins/Dash/cardcreator/7.res+1−2
@@ -111,10 +111,9 @@ Label {
111 horizontalAlignment: root.headerAlignment;
111 horizontalAlignment: root.headerAlignment;
112 }
112 }
113,
113,
114−CardAttributesGrid {
114+CardAttributes {
115 id: attributesRow;
115 id: attributesRow;
116 objectName: "attributesRow";
116 objectName: "attributesRow";
117− height: units.gu(1.5);
118 anchors { left: parent.left; right: parent.right }
117 anchors { left: parent.left; right: parent.right }
119 model: cardData["attributes"]
118 model: cardData["attributes"]
120 }
119 }
tests/plugins/Dash/tst_CardAttributesGrid.qml → tests/plugins/Dash/tst_CardAttributes.qmlrenamed+5−5
@@ -27,13 +27,13 @@ Item {
27 [{"value":"text1","icon":"image://theme/ok"},{"value":"text2","icon":"image://theme/cancel"},{"value":"text3"}]
27 [{"value":"text1","icon":"image://theme/ok"},{"value":"text2","icon":"image://theme/cancel"},{"value":"text3"}]
28 ]
28 ]
29
29
30− CardAttributesGrid {
30+ CardAttributes {
31− id: cardAttributesGrid
31+ id: cardAttributes
32 model: testData[0]
32 model: testData[0]
33 }
33 }
34
34
35 TestCase {
35 TestCase {
36− name: "CardAttributesGridTest"
36+ name: "CardAttributesTest"
37 when: windowShown
37 when: windowShown
38
38
39 function init() {
39 function init() {
@@ -44,8 +44,8 @@ Item {
44 }
44 }
45
45
46 function test_columns(data) {
46 function test_columns(data) {
47− cardAttributesGrid.model = data;
47+ cardAttributes.model = data;
48− compare(cardAttributesGrid.columns, data.length);
48+ compare(cardAttributes.columns, data.length);
49 }
49 }
50 }
50 }
51}
51}