on 74cbb9f help sign in
7 files changed+21−22
since splitsnapshots
unifiedsplit
qml/Launcher/LauncherPanel.qml+1−1 qml/Stage/Stage.qml+2−2 qml/Stage/WindowDecoration.qml+5−6 tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.cpp+2−2 tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.h+1−1 tests/qmltests/Launcher/tst_Launcher.qml+4−4 tests/qmltests/Stage/ApplicationCheckBox.qml+6−6
qml/Launcher/LauncherPanel.qml+1−1
@@ -556,7 +556,7 @@ Rectangle {
556556
557557 function processPositionChanged(mouse) {
558558 if (draggedIndex >= 0) {
559− if (!selectedItem.dragging) {
559+ if (selectedItem && !selectedItem.dragging) {
560560 var distance = Math.max(Math.abs(mouse.x - startX), Math.abs(mouse.y - startY))
561561 if (!preDragging && distance > units.gu(1.5)) {
562562 preDragging = true;
qml/Stage/Stage.qml+2−2
@@ -2207,8 +2207,8 @@ FocusScope {
22072207 consumesInput: false
22082208 interactive: false
22092209 focus: false
2210− requestedWidth: appDelegate.requestedWidth
2211− requestedHeight: appDelegate.requestedHeight
2210+ requestedWidth: appDelegate ? appDelegate.requestedWidth : 0
2211+ requestedHeight: appDelegate ? appDelegate.requestedHeight : 0
22122212
22132213 width: units.gu(40)
22142214 height: units.gu(40)
qml/Stage/WindowDecoration.qml+5−6
@@ -99,13 +99,12 @@ MouseArea {
9999 spacing: units.gu(3)
100100
101101 WindowControlButtons {
102+ Layout.fillHeight: true
103+ Layout.fillWidth: false
104+ Layout.topMargin: units.gu(0.5)
105+ Layout.bottomMargin: units.gu(0.5)
106+
102107 id: buttons
103− anchors {
104− top: parent.top
105− bottom: parent.bottom
106− topMargin: units.gu(0.5)
107− bottomMargin: units.gu(0.5)
108− }
109108 active: root.active
110109 onCloseClicked: root.closeClicked();
111110 onMinimizeClicked: root.minimizeClicked();
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.cpp+2−2
@@ -41,7 +41,7 @@ void MockApplicationMenuRegistry::RegisterSurfaceMenu(const QString &surface,
4141 service);
4242}
4343
44−void MockApplicationMenuRegistry::UnregisterSurfaceMenu(const QString &surfaceId, const QDBusObjectPath &menuObjectPath)
44+void MockApplicationMenuRegistry::UnregisterSurfaceMenu(const QString &surfaceId, const QString &menuObjectPath)
4545{
46− ApplicationMenuRegistry::UnregisterSurfaceMenu(surfaceId, menuObjectPath);
46+ ApplicationMenuRegistry::UnregisterSurfaceMenu(surfaceId, QDBusObjectPath(menuObjectPath));
4747}
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.h+1−1
@@ -32,7 +32,7 @@ public:
3232 const QString &service);
3333
3434 Q_INVOKABLE void UnregisterSurfaceMenu(const QString &surfaceId,
35− const QDBusObjectPath &menuObjectPath);
35+ const QString &menuObjectPath);
3636
3737private:
3838 MockApplicationMenuRegistry(QObject *parent = 0);
tests/qmltests/Launcher/tst_Launcher.qml+4−4
@@ -1015,7 +1015,7 @@ Rectangle {
10151015 // Doing longpress
10161016 mousePress(clickedItem)
10171017 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
1018− verify(quickList, "state", "open")
1018+ tryCompare(quickList, "state", "open")
10191019
10201020 launcher.hide();
10211021
@@ -1035,13 +1035,13 @@ Rectangle {
10351035 // Doing RMB click
10361036 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
10371037 tryCompare(quickListShape, "visible", true)
1038− verify(quickList, "state", "open")
1039− verify(dndArea, "dragging", false)
1038+ tryCompare(quickList, "state", "open")
1039+ tryCompare(dndArea, "dragging", false)
10401040
10411041 // Click somewhere in the empty space to dismiss the quicklist
10421042 mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));
10431043 tryCompare(quickListShape, "visible", false);
1044− verify(quickList, "state", "")
1044+ tryCompare(quickList, "state", "")
10451045 }
10461046
10471047 function test_revealByEdgePush() {
tests/qmltests/Stage/ApplicationCheckBox.qml+6−6
@@ -95,11 +95,12 @@ Column {
9595 }
9696 }
9797 Label {
98+ Layout.alignment: Qt.AlignVCenter
9899 id: appIdLabel
99100 text: root.appId
100− anchors.verticalCenter: parent.verticalCenter
101101 }
102102 Rectangle {
103+ Layout.alignment: Qt.AlignVCenter
103104 color: {
104105 if (d.application) {
105106 if (d.application.state === ApplicationInfoInterface.Starting) {
@@ -117,13 +118,12 @@ Column {
117118 }
118119 width: height
119120 height: appIdLabel.height * 0.7
120− anchors.verticalCenter: parent.verticalCenter
121121 }
122122
123123 MouseArea {
124+ Layout.alignment: Qt.AlignVCenter
124125 width: height
125126 height: appIdLabel.height * 0.7
126− anchors.verticalCenter: parent.verticalCenter
127127 onClicked: root.createSurface()
128128 enabled: d.application && d.application.state === ApplicationInfoInterface.Running
129129 visible: enabled
@@ -146,16 +146,16 @@ Column {
146146 text: promptCount + " prompts"
147147 }
148148 MouseArea {
149+ Layout.alignment: Qt.AlignVCenter
149150 width: height
150151 height: promptsLabel.height * 0.7
151− anchors.verticalCenter: parent.verticalCenter
152152 onClicked: d.application.createPromptSurface()
153153 Label { text: "➕"; anchors.centerIn: parent }
154154 }
155155 MouseArea {
156+ Layout.alignment: Qt.AlignVCenter
156157 width: height
157158 height: promptsLabel.height * 0.7
158− anchors.verticalCenter: parent.verticalCenter
159159 onClicked: d.application.promptSurfaceList.get(0).close()
160160 enabled: d.application && d.application.promptSurfaceList.count > 0
161161 Label { text: "➖"; anchors.centerIn: parent; enabled: parent.enabled }
@@ -173,9 +173,9 @@ Column {
173173 text: "- " + model.surface.name
174174 }
175175 MouseArea {
176+ Layout.alignment: Qt.AlignVCenter
176177 width: height
177178 height: appIdLabel.height * 0.7
178− anchors.verticalCenter: parent.verticalCenter
179179 enabled: model.surface.live
180180 visible: enabled
181181 onClicked: model.surface.setLive(false);