Merge lp:~nick-dedekind/unity8/move-indicator-qml into lp:unity8

Proposed by Nick Dedekind
Status: Merged
Approved by: Michał Sawicz
Approved revision: 980
Merged at revision: 1002
Proposed branch: lp:~nick-dedekind/unity8/move-indicator-qml
Merge into: lp:unity8
Diff against target: 272 lines (+14/-99)
13 files modified
plugins/Unity/Indicators/CMakeLists.txt (+1/-4)
plugins/Unity/Indicators/qmldir (+0/-4)
qml/Panel/Indicators/DefaultIndicatorPage.qml (+2/-2)
qml/Panel/Indicators/DefaultIndicatorWidget.qml (+1/-2)
qml/Panel/Indicators/IndicatorBase.qml (+2/-3)
qml/Panel/Indicators/IndicatorDelegate.qml (+1/-2)
tests/mocks/Unity/Indicators/IndicatorBase.qml (+0/-38)
tests/mocks/Unity/Indicators/MenuItemFactory.qml (+0/-38)
tests/mocks/Unity/Indicators/qmldir (+0/-2)
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml (+1/-0)
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml (+1/-0)
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml (+3/-2)
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml (+2/-2)
To merge this branch: bzr merge lp:~nick-dedekind/unity8/move-indicator-qml
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michał Sawicz Approve
Review via email: mp+223947@code.launchpad.net

Commit message

Moved [Message]MenuItemFacotory from Unity.Indicators plugin to qml folder.

Description of the change

Moved [Message]MenuItemFacotory from Unity.Indicators plugin to qml folder.

 * Are there any related MPs required for this MP to build/function as expected? Please list.
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
979. By Nick Dedekind

moved qml to root plugin dir. moved IndicatoBase to Panel/Indicators

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Unexpected test failures:
qmltestrunner.DefaultIndicatorPage::test_empty
qmltestrunner.DefaultIndicatorPage::test_reloadData
qmltestrunner.DefaultIndicatorPage::test_traverse_rootMenuType
qmltestrunner.tst_DefaultIndicatorWidget::compile
testDash.xml.<init>

review: Needs Fixing
980. By Nick Dedekind

fixed tests

Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes. Everything still good.

 * Did CI run pass? If not, please explain why.
Not yet, expecting testShell failure.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
981. By Nick Dedekind

merged with trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Unity/Indicators/CMakeLists.txt'
--- plugins/Unity/Indicators/CMakeLists.txt 2014-05-02 22:57:00 +0000
+++ plugins/Unity/Indicators/CMakeLists.txt 2014-07-03 13:48:00 +0000
@@ -51,7 +51,4 @@
5151
52qt5_use_modules(IndicatorsQml Core Qml Quick)52qt5_use_modules(IndicatorsQml Core Qml Quick)
5353
54add_unity8_plugin(Unity.Indicators 0.1 Unity/Indicators54add_unity8_plugin(Unity.Indicators 0.1 Unity/Indicators TARGETS IndicatorsQml)
55 SEARCH_PATH qml
56 TARGETS IndicatorsQml
57)
5855
=== renamed file 'plugins/Unity/Indicators/qml/CachedUnityMenuModel.qml' => 'plugins/Unity/Indicators/CachedUnityMenuModel.qml'
=== removed directory 'plugins/Unity/Indicators/qml'
=== renamed file 'plugins/Unity/Indicators/qml/qmldir' => 'plugins/Unity/Indicators/qmldir'
--- plugins/Unity/Indicators/qml/qmldir 2014-05-02 22:57:00 +0000
+++ plugins/Unity/Indicators/qmldir 2014-07-03 13:48:00 +0000
@@ -4,7 +4,3 @@
44
5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
6IndicatorBase 0.1 IndicatorBase.qml6IndicatorBase 0.1 IndicatorBase.qml
7MenuItemFactory 0.1 MenuItemFactory.qml
8MessageMenuItemFactory 0.1 MessageMenuItemFactory.qml
9
10internal RemoveBackground RemoveBackground.qml
117
=== modified file 'qml/Panel/Indicators/DefaultIndicatorPage.qml'
--- qml/Panel/Indicators/DefaultIndicatorPage.qml 2013-12-13 14:59:04 +0000
+++ qml/Panel/Indicators/DefaultIndicatorPage.qml 2014-07-03 13:48:00 +0000
@@ -22,7 +22,7 @@
22import Ubuntu.Components 0.1 as Components22import Ubuntu.Components 0.1 as Components
23import Unity.Indicators 0.1 as Indicators23import Unity.Indicators 0.1 as Indicators
2424
25Indicators.IndicatorBase {25IndicatorBase {
26 id: main26 id: main
2727
28 //const28 //const
@@ -174,7 +174,7 @@
174 }174 }
175 }175 }
176176
177 Indicators.MenuItemFactory {177 MenuItemFactory {
178 id: factory178 id: factory
179 menuModel: mainMenu.model ? mainMenu.model : null179 menuModel: mainMenu.model ? mainMenu.model : null
180 }180 }
181181
=== modified file 'qml/Panel/Indicators/DefaultIndicatorWidget.qml'
--- qml/Panel/Indicators/DefaultIndicatorWidget.qml 2014-07-01 13:56:53 +0000
+++ qml/Panel/Indicators/DefaultIndicatorWidget.qml 2014-07-03 13:48:00 +0000
@@ -20,9 +20,8 @@
20import QtQuick 2.020import QtQuick 2.0
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import Ubuntu.Settings.Components 0.122import Ubuntu.Settings.Components 0.1
23import Unity.Indicators 0.1 as Indicators
2423
25Indicators.IndicatorBase {24IndicatorBase {
26 id: indicatorWidget25 id: indicatorWidget
2726
28 property int iconSize: units.gu(2)27 property int iconSize: units.gu(2)
2928
=== renamed file 'plugins/Unity/Indicators/qml/IndicatorBase.qml' => 'qml/Panel/Indicators/IndicatorBase.qml'
--- plugins/Unity/Indicators/qml/IndicatorBase.qml 2013-11-24 02:23:56 +0000
+++ qml/Panel/Indicators/IndicatorBase.qml 2014-07-03 13:48:00 +0000
@@ -18,8 +18,7 @@
18 */18 */
1919
20import QtQuick 2.020import QtQuick 2.0
21import QMenuModel 0.1 as QMenuModel21import Unity.Indicators 0.1
22import Unity.Indicators 0.1 as Indicators
2322
24Item {23Item {
25 id: indicatorItem24 id: indicatorItem
@@ -43,7 +42,7 @@
43 menuObjectPath: indicatorItem.deviceMenuObjectPath42 menuObjectPath: indicatorItem.deviceMenuObjectPath
44 }43 }
4544
46 property var rootActionState: Indicators.RootActionState {45 property RootActionState rootActionState: RootActionState {
47 menu: menuModel46 menu: menuModel
48 onUpdated: indicatorItem.rootActionStateChanged()47 onUpdated: indicatorItem.rootActionStateChanged()
49 }48 }
5049
=== modified file 'qml/Panel/Indicators/IndicatorDelegate.qml'
--- qml/Panel/Indicators/IndicatorDelegate.qml 2014-01-14 15:35:57 +0000
+++ qml/Panel/Indicators/IndicatorDelegate.qml 2014-07-03 13:48:00 +0000
@@ -18,9 +18,8 @@
18 */18 */
1919
20import QtQuick 2.020import QtQuick 2.0
21import Unity.Indicators 0.1 as Indicators
2221
23Indicators.IndicatorBase {22IndicatorBase {
24 enabled: false23 enabled: false
2524
26 onRootActionStateChanged: {25 onRootActionStateChanged: {
2726
=== renamed file 'plugins/Unity/Indicators/qml/MenuItemFactory.qml' => 'qml/Panel/Indicators/MenuItemFactory.qml'
=== renamed file 'plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml' => 'qml/Panel/Indicators/MessageMenuItemFactory.qml'
=== renamed file 'plugins/Unity/Indicators/qml/RemoveBackground.qml' => 'qml/Panel/Indicators/RemoveBackground.qml'
=== removed file 'tests/mocks/Unity/Indicators/IndicatorBase.qml'
--- tests/mocks/Unity/Indicators/IndicatorBase.qml 2013-12-13 11:18:03 +0000
+++ tests/mocks/Unity/Indicators/IndicatorBase.qml 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
19
20import QtQuick 2.0
21import QMenuModel 0.1
22
23Item {
24 id: indicatorBase
25
26 //const
27 property string busName
28 property string actionsObjectPath
29 property string menuObjectPath
30 property string rootMenuType: "com.canonical.indicator.root"
31 property string deviceMenuObjectPath: menuObjectPath
32
33 property var menuModel: UnityMenuModel {}
34
35 property RootActionState rootActionState: RootActionState {
36 onUpdated: indicatorBase.rootActionStateChanged()
37 }
38}
390
=== removed file 'tests/mocks/Unity/Indicators/MenuItemFactory.qml'
--- tests/mocks/Unity/Indicators/MenuItemFactory.qml 2013-12-13 13:12:40 +0000
+++ tests/mocks/Unity/Indicators/MenuItemFactory.qml 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
19
20import QtQuick 2.0
21import Ubuntu.Components.ListItems 0.1 as ListItem
22
23Item {
24 id: menuFactory
25
26 property var menuModel: null
27
28 Component {
29 id: standardMenu;
30 ListItem.Standard {
31 objectName: "standardMenu"
32 }
33 }
34
35 function load(modelData) {
36 return standardMenu;
37 }
38}
390
=== modified file 'tests/mocks/Unity/Indicators/qmldir'
--- tests/mocks/Unity/Indicators/qmldir 2014-05-02 22:57:21 +0000
+++ tests/mocks/Unity/Indicators/qmldir 2014-07-03 13:48:00 +0000
@@ -3,8 +3,6 @@
3typeinfo Indicators.qmltypes3typeinfo Indicators.qmltypes
44
5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
6IndicatorBase 0.1 IndicatorBase.qml
7IndicatorsModel 0.1 IndicatorsModel.qml6IndicatorsModel 0.1 IndicatorsModel.qml
8FakeMenuPage 0.1 FakeMenuPage.qml7FakeMenuPage 0.1 FakeMenuPage.qml
9MenuItemFactory 0.1 MenuItemFactory.qml
10RootActionState 0.1 RootActionState.qml8RootActionState 0.1 RootActionState.qml
119
=== modified file 'tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml'
--- tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-01-15 12:34:00 +0000
+++ tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-07-03 13:48:00 +0000
@@ -31,6 +31,7 @@
31 anchors.fill: parent31 anchors.fill: parent
32 contentActive: true32 contentActive: true
3333
34 menuModel: UnityMenuModel {}
34 busName: "test"35 busName: "test"
35 actionsObjectPath: "test"36 actionsObjectPath: "test"
36 menuObjectPath: "test"37 menuObjectPath: "test"
3738
=== modified file 'tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml'
--- tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml 2014-07-01 12:15:35 +0000
+++ tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml 2014-07-03 13:48:00 +0000
@@ -33,6 +33,7 @@
33 top: parent.top33 top: parent.top
34 }34 }
3535
36 menuModel: UnityMenuModel {}
36 busName: "test"37 busName: "test"
37 actionsObjectPath: "test"38 actionsObjectPath: "test"
38 deviceMenuObjectPath: "test"39 deviceMenuObjectPath: "test"
3940
=== modified file 'tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml'
--- tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml 2014-05-01 14:25:18 +0000
+++ tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml 2014-07-03 13:48:00 +0000
@@ -18,15 +18,16 @@
18import QtTest 1.018import QtTest 1.0
19import Unity.Test 0.1 as UT19import Unity.Test 0.1 as UT
20import QMenuModel 0.120import QMenuModel 0.1
21import Unity.Indicators 0.1 as Indicators
22import Utils 0.1 as Utils21import Utils 0.1 as Utils
22import "../../../../qml/Panel/Indicators"
23
2324
24Item {25Item {
25 id: testView26 id: testView
26 width: units.gu(40)27 width: units.gu(40)
27 height: units.gu(70)28 height: units.gu(70)
2829
29 Indicators.MenuItemFactory {30 MenuItemFactory {
30 id: factory31 id: factory
31 menuModel: UnityMenuModel {}32 menuModel: UnityMenuModel {}
32 }33 }
3334
=== modified file 'tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml'
--- tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml 2014-04-14 17:26:06 +0000
+++ tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml 2014-07-03 13:48:00 +0000
@@ -18,15 +18,15 @@
18import QtTest 1.018import QtTest 1.0
19import Unity.Test 0.1 as UT19import Unity.Test 0.1 as UT
20import QMenuModel 0.120import QMenuModel 0.1
21import Unity.Indicators 0.1 as Indicators
22import Utils 0.1 as Utils21import Utils 0.1 as Utils
22import "../../../../qml/Panel/Indicators"
2323
24Item {24Item {
25 id: testView25 id: testView
26 width: units.gu(40)26 width: units.gu(40)
27 height: units.gu(70)27 height: units.gu(70)
2828
29 Indicators.MessageMenuItemFactory {29 MessageMenuItemFactory {
30 id: factory30 id: factory
31 menuModel: UnityMenuModel {}31 menuModel: UnityMenuModel {}
32 menuIndex: 032 menuIndex: 0

Subscribers

People subscribed via source and target branches