on xenial help sign in
Fixed qml warnings in 'make tryShell'
ae9d424Nick Dedekind
qml/Launcher/LauncherPanel.qml+4−3
@@ -521,7 +521,7 @@ Rectangle {
521 Image {
521 Image {
522 anchors {
522 anchors {
523 left: parent.left
523 left: parent.left
524− leftMargin: (quickList.item.width - units.gu(1)) / 2 - width / 2
524+ leftMargin: quickList.item ? (quickList.item.width - units.gu(1)) / 2 - width / 2 : 0
525 verticalCenter: parent.verticalCenter
525 verticalCenter: parent.verticalCenter
526 verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
526 verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
527 }
527 }
@@ -564,9 +564,10 @@ Rectangle {
564
564
565 // internal
565 // internal
566 property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
566 property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
567− property int offset: itemCenter + (item.height/2) + height + units.gu(1) > parent.height ?
567+ property int offset: item ? itemCenter + (item.height/2) + height + units.gu(1) > parent.height ?
568 -(item.height/2) - height - units.gu(.5) :
568 -(item.height/2) - height - units.gu(.5) :
569− (item.height/2) + units.gu(.5)
569+ (item.height/2) + units.gu(.5) :
570+ 0
570
571
571 Column {
572 Column {
572 id: quickListColumn
573 id: quickListColumn
qml/Notifications/Notifications.qml+1−1
@@ -33,7 +33,7 @@ ListView {
33 id: snapDecisionProxyModel
33 id: snapDecisionProxyModel
34 objectName: "snapDecisionProxyModel"
34 objectName: "snapDecisionProxyModel"
35
35
36− model: notificationList.model
36+ model: notificationList.model ? notificationList.model : null
37 filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
37 filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
38 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
38 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
39 }
39 }
qml/Panel/IndicatorItem.qml+1−1
@@ -234,7 +234,7 @@ IndicatorDelegate {
234 ]
234 ]
235 }
235 }
236
236
237− onRootActionStateChanged: {
237+ rootActionState.onUpdated: {
238 if (rootActionState == undefined) {
238 if (rootActionState == undefined) {
239 title = "";
239 title = "";
240 leftLabel = "";
240 leftLabel = "";
qml/Panel/Indicators/IndicatorBase.qml−1
@@ -43,6 +43,5 @@ Item {
43 ModelActionRootState {
43 ModelActionRootState {
44 id: rootAction
44 id: rootAction
45 menu: menuModel ? menuModel : null
45 menu: menuModel ? menuModel : null
46− onUpdated: indicatorItem.rootActionStateChanged()
47 }
46 }
48}
47}
tests/mocks/QMenuModel/QDBusActionGroup.qml+2−2
@@ -41,8 +41,8 @@ QtObject {
41 signal activated
41 signal activated
42
42
43 property string actionName: \"" + actionName + "\"
43 property string actionName: \"" + actionName + "\"
44− property bool valid: ActionData.data[actionName] != undefined ? ActionData.data[actionName].valid : false
44+ property bool valid: ActionData.data.hasOwnProperty(actionName) ? ActionData.data[actionName].valid : false
45− property var state: ActionData.data[actionName] != undefined ? ActionData.data[actionName].state : undefined
45+ property var state: ActionData.data.hasOwnProperty(actionName) ? ActionData.data[actionName].state : undefined
46
46
47 function activate() {
47 function activate() {
48 activated();
48 activated();
tests/mocks/QMenuModel/actiondata.h+3−1
@@ -31,7 +31,9 @@ class Q_DECL_EXPORT ActionData : public QObject
31public:
31public:
32 ActionData(QObject* parent = 0)
32 ActionData(QObject* parent = 0)
33 : QObject(parent)
33 : QObject(parent)
34+ , m_data(QVariantMap())
34− {}
35+ {
36+ }
35
37
36 QVariant data() const { return m_data; }
38 QVariant data() const { return m_data; }
37 void setData(const QVariant& data)
39 void setData(const QVariant& data)