on xenial help sign in
Merge
74d4472Albert Astals
debian/changelog+7
@@ -1,3 +1,10 @@
1+unity8 (7.86+14.10.20140522-0ubuntu1) utopic; urgency=low
2+
3+ [ Albert Astals ]
4+ * Use Interface classes from unity-api
5+
6+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 22 May 2014 17:59:23 +0000
7+
1unity8 (7.86+14.10.20140519-0ubuntu1) utopic; urgency=low
8unity8 (7.86+14.10.20140519-0ubuntu1) utopic; urgency=low
2
9
3 [ Ubuntu daily release ]
10 [ Ubuntu daily release ]
po/ar.po+5−5
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-02-21 11:19+0000\n"
11+"PO-Revision-Date: 2014-05-22 08:22+0000\n"
12"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
12"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
13"Language-Team: Arabic <ar@li.org>\n"
13"Language-Team: Arabic <ar@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-23 09:13+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,7 +89,7 @@ msgstr "شاهد أقل"
89
89
90#: qml/Dash/DashApps.qml:37
90#: qml/Dash/DashApps.qml:37
91msgid "Recent"
91msgid "Recent"
92−msgstr ""
92+msgstr "استُخدمت مؤخرًا"
93
93
94#: qml/Dash/PreviewListView.qml:52
94#: qml/Dash/PreviewListView.qml:52
95#, qt-format
95#, qt-format
@@ -118,7 +118,7 @@ msgstr "أرسل"
118
118
119#: qml/Greeter/Greeter.qml:151
119#: qml/Greeter/Greeter.qml:151
120msgid "Swipe to unlock"
120msgid "Swipe to unlock"
121−msgstr ""
121+msgstr "اسحب لفتح القفل"
122
122
123#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
124msgid "Emergency Call"
po/de.po+14−14
@@ -8,23 +8,23 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-15 11:01+0000\n"
11+"PO-Revision-Date: 2014-05-20 13:45+0000\n"
12−"Last-Translator: Dennis Baudys <Unknown>\n"
12+"Last-Translator: Tobias Bannert <Unknown>\n"
13"Language-Team: German <de@li.org>\n"
13"Language-Team: German <de@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
22msgid "Lock to Launcher"
22msgid "Lock to Launcher"
23−msgstr ""
23+msgstr "Im Starter sperren"
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
26msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
27−msgstr ""
27+msgstr "Aus dem Starter entsperren"
28
28
29#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
30msgid "Skip intro"
30msgid "Skip intro"
@@ -80,28 +80,28 @@ msgstr "Letzte Suchbegriffe"
80
80
81#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
82msgid "See more"
82msgid "See more"
83−msgstr ""
83+msgstr "Mehr ansehen"
84
84
85#: qml/Components/SeeMore.qml:58
85#: qml/Components/SeeMore.qml:58
86msgid "See less"
86msgid "See less"
87−msgstr ""
87+msgstr "Weniger ansehen"
88
88
89#: qml/Dash/DashApps.qml:37
89#: qml/Dash/DashApps.qml:37
90msgid "Recent"
90msgid "Recent"
91−msgstr ""
91+msgstr "Kürzlich"
92
92
93#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
94#, qt-format
94#, qt-format
95msgid "%1 Preview"
95msgid "%1 Preview"
96−msgstr ""
96+msgstr "%1 Vorschau"
97
97
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
99msgid "More..."
99msgid "More..."
100−msgstr ""
100+msgstr "Mehr …"
101
101
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
103msgid "Less..."
103msgid "Less..."
104−msgstr ""
104+msgstr "Weniger …"
105
105
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
107msgid "Rate this"
107msgid "Rate this"
@@ -117,7 +117,7 @@ msgstr "Senden"
117
117
118#: qml/Greeter/Greeter.qml:151
118#: qml/Greeter/Greeter.qml:151
119msgid "Swipe to unlock"
119msgid "Swipe to unlock"
120−msgstr ""
120+msgstr "Wischen zum Entsperren"
121
121
122#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
123msgid "Emergency Call"
123msgid "Emergency Call"
@@ -158,7 +158,7 @@ msgstr "Passwort anzeigen"
158
158
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
160msgid "Please enter SIM PIN"
160msgid "Please enter SIM PIN"
161−msgstr ""
161+msgstr "Bitte die PIN der SIM eingeben"
162
162
163#: qml/Panel/SearchIndicator.qml:27
163#: qml/Panel/SearchIndicator.qml:27
164msgid "Search"
164msgid "Search"
po/it.po+12−12
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-22 09:15+0000\n"
11+"PO-Revision-Date: 2014-05-23 11:52+0000\n"
12−"Last-Translator: Domenico <domenico.verde125@live.it>\n"
12+"Last-Translator: Gio <gio.scino@gmail.com>\n"
13"Language-Team: Italian <it@li.org>\n"
13"Language-Team: Italian <it@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-24 06:52+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -83,28 +83,28 @@ msgstr "Ricerche recenti"
83
83
84#: qml/Components/SeeMore.qml:35
84#: qml/Components/SeeMore.qml:35
85msgid "See more"
85msgid "See more"
86−msgstr ""
86+msgstr "Mostra di più"
87
87
88#: qml/Components/SeeMore.qml:58
88#: qml/Components/SeeMore.qml:58
89msgid "See less"
89msgid "See less"
90−msgstr ""
90+msgstr "Mostra meno"
91
91
92#: qml/Dash/DashApps.qml:37
92#: qml/Dash/DashApps.qml:37
93msgid "Recent"
93msgid "Recent"
94−msgstr ""
94+msgstr "Recenti"
95
95
96#: qml/Dash/PreviewListView.qml:52
96#: qml/Dash/PreviewListView.qml:52
97#, qt-format
97#, qt-format
98msgid "%1 Preview"
98msgid "%1 Preview"
99−msgstr ""
99+msgstr "Anteprime: %1"
100
100
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "More..."
102msgid "More..."
103−msgstr ""
103+msgstr "Altro..."
104
104
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
106msgid "Less..."
106msgid "Less..."
107−msgstr ""
107+msgstr "Meno..."
108
108
109#: qml/Dash/Previews/PreviewRatingInput.qml:81
109#: qml/Dash/Previews/PreviewRatingInput.qml:81
110msgid "Rate this"
110msgid "Rate this"
@@ -120,7 +120,7 @@ msgstr "Invia"
120
120
121#: qml/Greeter/Greeter.qml:151
121#: qml/Greeter/Greeter.qml:151
122msgid "Swipe to unlock"
122msgid "Swipe to unlock"
123−msgstr ""
123+msgstr "Scorrere per sbloccare"
124
124
125#: qml/Greeter/Lockscreen.qml:149
125#: qml/Greeter/Lockscreen.qml:149
126msgid "Emergency Call"
126msgid "Emergency Call"
@@ -161,7 +161,7 @@ msgstr "Mostra password"
161
161
162#: qml/Notifications/NotificationMenuItemFactory.qml:103
162#: qml/Notifications/NotificationMenuItemFactory.qml:103
163msgid "Please enter SIM PIN"
163msgid "Please enter SIM PIN"
164−msgstr ""
164+msgstr "Inserire il codice PIN"
165
165
166#: qml/Panel/SearchIndicator.qml:27
166#: qml/Panel/SearchIndicator.qml:27
167msgid "Search"
167msgid "Search"
po/km.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-19 06:25+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 17007)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
po/lt.po+9−9
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-15 12:42+0000\n"
11+"PO-Revision-Date: 2014-05-19 17:15+0000\n"
12−"Last-Translator: Gediminas Paulauskas <menesis@pov.lt>\n"
12+"Last-Translator: Mantas Kriaučiūnas <mantas@akl.lt>\n"
13"Language-Team: Lithuanian <lt@li.org>\n"
13"Language-Team: Lithuanian <lt@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,7 +89,7 @@ msgstr ""
89
89
90#: qml/Dash/DashApps.qml:37
90#: qml/Dash/DashApps.qml:37
91msgid "Recent"
91msgid "Recent"
92−msgstr ""
92+msgstr "Paskiausieji"
93
93
94#: qml/Dash/PreviewListView.qml:52
94#: qml/Dash/PreviewListView.qml:52
95#, qt-format
95#, qt-format
@@ -98,11 +98,11 @@ msgstr ""
98
98
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
100msgid "More..."
100msgid "More..."
101−msgstr ""
101+msgstr "Daugiau..."
102
102
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
104msgid "Less..."
104msgid "Less..."
105−msgstr ""
105+msgstr "Mažiau..."
106
106
107#: qml/Dash/Previews/PreviewRatingInput.qml:81
107#: qml/Dash/Previews/PreviewRatingInput.qml:81
108msgid "Rate this"
108msgid "Rate this"
@@ -118,7 +118,7 @@ msgstr "Siųsti"
118
118
119#: qml/Greeter/Greeter.qml:151
119#: qml/Greeter/Greeter.qml:151
120msgid "Swipe to unlock"
120msgid "Swipe to unlock"
121−msgstr ""
121+msgstr "Braukite ir atrakinsite"
122
122
123#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
124msgid "Emergency Call"
@@ -159,7 +159,7 @@ msgstr "Rodyti slaptažodį"
159
159
160#: qml/Notifications/NotificationMenuItemFactory.qml:103
160#: qml/Notifications/NotificationMenuItemFactory.qml:103
161msgid "Please enter SIM PIN"
161msgid "Please enter SIM PIN"
162−msgstr ""
162+msgstr "Įveskite SIM kortelės PIN kodą"
163
163
164#: qml/Panel/SearchIndicator.qml:27
164#: qml/Panel/SearchIndicator.qml:27
165msgid "Search"
165msgid "Search"
po/nb.po+5−5
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-05-15 17:12+0000\n"
11+"PO-Revision-Date: 2014-05-19 15:25+0000\n"
12−"Last-Translator: Åka Sikrom <Unknown>\n"
12+"Last-Translator: Thor Fjalestad <silvereyerocker@gmail.com>\n"
13"Language-Team: Norwegian Bokmal <nb@li.org>\n"
13"Language-Team: Norwegian Bokmal <nb@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 17007)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -76,7 +76,7 @@ msgstr ""
76
76
77#: qml/Components/PageHeader.qml:365
77#: qml/Components/PageHeader.qml:365
78msgid "Recent searches"
78msgid "Recent searches"
79−msgstr "Siste søk"
79+msgstr "Nylige søk"
80
80
81#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
82msgid "See more"
82msgid "See more"
po/pl.po+11−11
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-10 11:38+0000\n"
11+"PO-Revision-Date: 2014-05-23 14:26+0000\n"
12−"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12+"Last-Translator: igosoft <igosoft@gmail.com>\n"
13"Language-Team: Polish <pl@li.org>\n"
13"Language-Team: Polish <pl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-24 06:52+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -80,15 +80,15 @@ msgstr "Ostatnie wyszukiwania"
80
80
81#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
82msgid "See more"
82msgid "See more"
83−msgstr ""
83+msgstr "Zobacz więcej"
84
84
85#: qml/Components/SeeMore.qml:58
85#: qml/Components/SeeMore.qml:58
86msgid "See less"
86msgid "See less"
87−msgstr ""
87+msgstr "Zobacz mniej"
88
88
89#: qml/Dash/DashApps.qml:37
89#: qml/Dash/DashApps.qml:37
90msgid "Recent"
90msgid "Recent"
91−msgstr ""
91+msgstr "Ostatnio używane"
92
92
93#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
94#, qt-format
94#, qt-format
@@ -97,11 +97,11 @@ msgstr ""
97
97
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
99msgid "More..."
99msgid "More..."
100−msgstr ""
100+msgstr "Więcej..."
101
101
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
103msgid "Less..."
103msgid "Less..."
104−msgstr ""
104+msgstr "Mniej..."
105
105
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
107msgid "Rate this"
107msgid "Rate this"
@@ -117,7 +117,7 @@ msgstr "Wyślij"
117
117
118#: qml/Greeter/Greeter.qml:151
118#: qml/Greeter/Greeter.qml:151
119msgid "Swipe to unlock"
119msgid "Swipe to unlock"
120−msgstr ""
120+msgstr "Przeciągnij aby odblokować"
121
121
122#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
123msgid "Emergency Call"
123msgid "Emergency Call"
@@ -158,7 +158,7 @@ msgstr "Wyświetl hasło"
158
158
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
160msgid "Please enter SIM PIN"
160msgid "Please enter SIM PIN"
161−msgstr ""
161+msgstr "Wprowadź kod PIN karty SIM"
162
162
163#: qml/Panel/SearchIndicator.qml:27
163#: qml/Panel/SearchIndicator.qml:27
164msgid "Search"
164msgid "Search"
po/sl.po+6−6
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-02-21 16:38+0000\n"
11+"PO-Revision-Date: 2014-05-22 14:07+0000\n"
12"Last-Translator: Damir Jerovšek <Unknown>\n"
12"Last-Translator: Damir Jerovšek <Unknown>\n"
13"Language-Team: Slovenian <sl@li.org>\n"
13"Language-Team: Slovenian <sl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-23 09:13+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -90,12 +90,12 @@ msgstr "Pokaži manj"
90
90
91#: qml/Dash/DashApps.qml:37
91#: qml/Dash/DashApps.qml:37
92msgid "Recent"
92msgid "Recent"
93−msgstr ""
93+msgstr "Nedavno"
94
94
95#: qml/Dash/PreviewListView.qml:52
95#: qml/Dash/PreviewListView.qml:52
96#, qt-format
96#, qt-format
97msgid "%1 Preview"
97msgid "%1 Preview"
98−msgstr ""
98+msgstr "%1 predogled"
99
99
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
101msgid "More..."
101msgid "More..."
@@ -119,7 +119,7 @@ msgstr "Pošlji"
119
119
120#: qml/Greeter/Greeter.qml:151
120#: qml/Greeter/Greeter.qml:151
121msgid "Swipe to unlock"
121msgid "Swipe to unlock"
122−msgstr ""
122+msgstr "Podrsajte za odklenitev"
123
123
124#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
125msgid "Emergency Call"
125msgid "Emergency Call"
po/tr.po+7−7
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-03-05 08:54+0000\n"
11+"PO-Revision-Date: 2014-05-19 12:52+0000\n"
12−"Last-Translator: Muhammed Yüce <muhammedyuceee@gmail.com>\n"
12+"Last-Translator: Volkan Gezer <Unknown>\n"
13"Language-Team: Turkish <tr@li.org>\n"
13"Language-Team: Turkish <tr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 16985)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,12 +89,12 @@ msgstr "Daha azını gör"
89
89
90#: qml/Dash/DashApps.qml:37
90#: qml/Dash/DashApps.qml:37
91msgid "Recent"
91msgid "Recent"
92−msgstr ""
92+msgstr "En son"
93
93
94#: qml/Dash/PreviewListView.qml:52
94#: qml/Dash/PreviewListView.qml:52
95#, qt-format
95#, qt-format
96msgid "%1 Preview"
96msgid "%1 Preview"
97−msgstr ""
97+msgstr "%1 Önizlemesi"
98
98
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
100msgid "More..."
100msgid "More..."
@@ -118,7 +118,7 @@ msgstr "Gönder"
118
118
119#: qml/Greeter/Greeter.qml:151
119#: qml/Greeter/Greeter.qml:151
120msgid "Swipe to unlock"
120msgid "Swipe to unlock"
121−msgstr ""
121+msgstr "Açmak için kaydırın"
122
122
123#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
124msgid "Emergency Call"
po/zh_CN.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-05-19 06:25+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
18−"X-Generator: Launchpad (build 17007)\n"
18+"X-Generator: Launchpad (build 17017)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
qml/Components/PageHeader.qml+1−1
@@ -25,7 +25,7 @@ Item {
25 property bool searchEntryEnabled: false
25 property bool searchEntryEnabled: false
26 property alias searchQuery: searchField.text
26 property alias searchQuery: searchField.text
27 property ListModel searchHistory
27 property ListModel searchHistory
28− property Scope scope
28+ property var scope: null
29 property alias childItem: itemContainer.children
29 property alias childItem: itemContainer.children
30 property alias afterLineChildItem: afterLineContainer.children
30 property alias afterLineChildItem: afterLineContainer.children
31 property alias showBackButton: backButton.visible
31 property alias showBackButton: backButton.visible
qml/Dash/CardCarousel.qml+2−2
@@ -42,8 +42,8 @@ DashRenderer {
42 cacheBuffer: 1404 // 18px * 13gu * 6
42 cacheBuffer: 1404 // 18px * 13gu * 6
43 model: cardCarousel.model
43 model: cardCarousel.model
44
44
45− onClicked: cardCarousel.clicked(index, itemY)
45+ onClicked: cardCarousel.clicked(index, null)
46− onPressAndHold: cardCarousel.pressAndHold(index, itemY)
46+ onPressAndHold: cardCarousel.pressAndHold(index)
47
47
48 property real fontScale: 1 / selectedItemScaleFactor
48 property real fontScale: 1 / selectedItemScaleFactor
49 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
49 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
qml/Dash/CardFilterGrid.qml+2−2
@@ -64,8 +64,8 @@ DashRenderer {
64 }
64 }
65 Connections {
65 Connections {
66 target: loader.item
66 target: loader.item
67− onClicked: genericFilterGrid.clicked(index, item.y)
67+ onClicked: genericFilterGrid.clicked(index, result)
68− onPressAndHold: genericFilterGrid.pressAndHold(index, item.y)
68+ onPressAndHold: genericFilterGrid.pressAndHold(index)
69 }
69 }
70 }
70 }
71 }
71 }
qml/Dash/DashContent.qml+1−1
@@ -138,7 +138,7 @@ Item {
138
138
139 readonly property bool moving: item ? item.moving : false
139 readonly property bool moving: item ? item.moving : false
140 readonly property var categoryView: item ? item.categoryView : null
140 readonly property var categoryView: item ? item.categoryView : null
141− readonly property Scope theScope: scope
141+ readonly property var theScope: scope
142
142
143 // these are needed for autopilot tests
143 // these are needed for autopilot tests
144 readonly property string scopeId: scope.id
144 readonly property string scopeId: scope.id
qml/Dash/DashDepartments.qml+2−5
@@ -99,10 +99,7 @@ AbstractButton {
99 readonly property int maxHeight: units.gu(60)
99 readonly property int maxHeight: units.gu(60)
100 property int prevHeight: maxHeight
100 property int prevHeight: maxHeight
101 height: currentItem ? currentItem.height : maxHeight
101 height: currentItem ? currentItem.height : maxHeight
102− onHeightChanged: {
103− console.log("MOOO", height)
104− prevHeight = height;
102+ onHeightChanged: prevHeight = height;
105− }
106 anchors.top: root.bottom
103 anchors.top: root.bottom
107 delegate: DashDepartmentsList {
104 delegate: DashDepartmentsList {
108 visible: root.showList
105 visible: root.showList
@@ -158,4 +155,4 @@ AbstractButton {
158 departmentModel.append({"departmentId": scope.currentDepartment});
155 departmentModel.append({"departmentId": scope.currentDepartment});
159 }
156 }
160 }
157 }
161−}
158+}
qml/Dash/DashRenderer.qml+3−4
@@ -50,13 +50,12 @@ Item {
50
50
51 /// Emitted when the user clicked on an item
51 /// Emitted when the user clicked on an item
52 /// @param index is the index of the clicked item
52 /// @param index is the index of the clicked item
53− /// @param itemY is y of the clicked delegate
53+ /// @param result result model of the cliked item, used for activation
54− signal clicked(int index, real itemY)
54+ signal clicked(int index, var result)
55
55
56 /// Emitted when the user pressed and held on an item
56 /// Emitted when the user pressed and held on an item
57 /// @param index is the index of the held item
57 /// @param index is the index of the held item
58− /// @param itemY is y of the held delegate
59− signal pressAndHold(int index, real itemY)
58+ signal pressAndHold(int index)
60
59
61 function setFilter(filter, animate) {
60 function setFilter(filter, animate) {
62 }
61 }
qml/Dash/GenericScopeView.qml+2−3
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28− property Scope scope: null
28+ property var scope: null
29 property SortFilterProxyModel categories: categoryFilter
29 property SortFilterProxyModel categories: categoryFilter
30 property bool isCurrent: false
30 property bool isCurrent: false
31 property alias moving: categoryView.moving
31 property alias moving: categoryView.moving
@@ -187,8 +187,7 @@ FocusScope {
187 // TODO Technically it is possible that calling activate() will make the scope emit
187 // TODO Technically it is possible that calling activate() will make the scope emit
188 // previewRequested so that we show a preview but there's no scope that does that yet
188 // previewRequested so that we show a preview but there's no scope that does that yet
189 // so it's not implemented
189 // so it's not implemented
190− var item = target.model.get(index);
191− scopeView.scope.activate(item.result)
190+ scopeView.scope.activate(result)
192 } else {
191 } else {
193 previewListView.model = target.model;
192 previewListView.model = target.model;
194 previewListView.currentIndex = -1
193 previewListView.currentIndex = -1
qml/Dash/PreviewListView.qml+2−2
@@ -23,7 +23,7 @@ import "Previews" as Previews
23Item {
23Item {
24 id: root
24 id: root
25
25
26− property Scope scope: null
26+ property var scope: null
27 property var pageHeader: null
27 property var pageHeader: null
28
28
29 property alias open: previewListView.open
29 property alias open: previewListView.open
@@ -116,7 +116,7 @@ Item {
116
116
117 previewModel: {
117 previewModel: {
118 var previewStack = root.scope.preview(result);
118 var previewStack = root.scope.preview(result);
119− return previewStack.get(0);
119+ return previewStack.getPreviewModel(0);
120 }
120 }
121 }
121 }
122
122
qml/ScopeTool.qml+1−1
@@ -74,7 +74,7 @@ Rectangle {
74
74
75 model: filteredScopes
75 model: filteredScopes
76 searchHistory: SearchHistoryModel { }
76 searchHistory: SearchHistoryModel { }
77− property Scope scope: scopes.get(currentIndex)
77+ property var scope: scopes.getScope(currentIndex)
78
78
79 anchors {
79 anchors {
80 top: parent.top
80 top: parent.top
tests/mocks/Unity/CMakeLists.txt+8
@@ -6,6 +6,7 @@ add_subdirectory(Notifications)
6pkg_search_module(DEE dee-1.0 REQUIRED)
6pkg_search_module(DEE dee-1.0 REQUIRED)
7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
8pkg_search_module(DEEQT libdee-qt5 REQUIRED)
8pkg_search_module(DEEQT libdee-qt5 REQUIRED)
9+pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=1)
9
10
10include_directories(
11include_directories(
11 ${CMAKE_CURRENT_BINARY_DIR}
12 ${CMAKE_CURRENT_BINARY_DIR}
@@ -28,6 +29,13 @@ set(UnityQML_SOURCES
28 fake_previewstack.cpp
29 fake_previewstack.cpp
29 fake_previewwidgetmodel.cpp
30 fake_previewwidgetmodel.cpp
30 fake_unity_plugin.cpp
31 fake_unity_plugin.cpp
32+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/CategoriesInterface.h
33+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewModelInterface.h
34+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewStackInterface.h
35+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewWidgetModelInterface.h
36+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ResultsModelInterface.h
37+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ScopeInterface.h
38+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ScopesInterface.h
31)
39)
32
40
33add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
41add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
tests/mocks/Unity/fake_categories.cpp+6−22
@@ -22,24 +22,9 @@
22#include "fake_resultsmodel.h"
22#include "fake_resultsmodel.h"
23
23
24Categories::Categories(int category_count, QObject* parent)
24Categories::Categories(int category_count, QObject* parent)
25− : QAbstractListModel(parent)
25+ : unity::shell::scopes::CategoriesInterface(parent)
26 , m_category_count(category_count)
26 , m_category_count(category_count)
27{
27{
28− m_roles[Categories::RoleCategoryId] = "categoryId";
29− m_roles[Categories::RoleName] = "name";
30− m_roles[Categories::RoleIcon] = "icon";
31− m_roles[Categories::RoleRawRendererTemplate] = "rawRendererTemplate";
32− m_roles[Categories::RoleRenderer] = "renderer";
33− m_roles[Categories::RoleComponents] = "components";
34− m_roles[Categories::RoleProgressSource] = "progressSource";
35− m_roles[Categories::RoleResults] = "results";
36− m_roles[Categories::RoleCount] = "count";
37−}
38−
39−QHash<int, QByteArray>
40−Categories::roleNames() const
41−{
42− return m_roles;
43}
28}
44
29
45int Categories::rowCount(const QModelIndex& /*parent*/) const
30int Categories::rowCount(const QModelIndex& /*parent*/) const
@@ -65,6 +50,11 @@ void Categories::addSpecialCategory(QString const& categoryId, QString const& na
65 }
50 }
66}
51}
67
52
53+bool Categories::overrideCategoryJson(QString const& categoryId, QString const& json)
54+{
55+ qFatal("Using un-implemented Categories::overrideCategoryJson");
56+}
57+
68void Categories::countChanged()
58void Categories::countChanged()
69{
59{
70 QObject* countObject = sender();
60 QObject* countObject = sender();
@@ -126,9 +116,6 @@ Categories::data(const QModelIndex& index, int role) const
126 map["title"] = "HOLA";
116 map["title"] = "HOLA";
127 return map;
117 return map;
128 }
118 }
129− case RoleProgressSource:
130− qFatal("Using un-implemented RoleProgressSource Categories role");
131− return QVariant();
132 case RoleResults:
119 case RoleResults:
133 return QVariant();
120 return QVariant();
134 case RoleCount:
121 case RoleCount:
@@ -172,9 +159,6 @@ Categories::data(const QModelIndex& index, int role) const
172 map["subtitle"] = "HOLA";
159 map["subtitle"] = "HOLA";
173 return map;
160 return map;
174 }
161 }
175− case RoleProgressSource:
176− qFatal("Using un-implemented RoleProgressSource Categories role");
177− return QVariant();
178 case RoleResults:
162 case RoleResults:
179 return QVariant::fromValue(resultsModel);
163 return QVariant::fromValue(resultsModel);
180 case RoleCount:
164 case RoleCount:
tests/mocks/Unity/fake_categories.h+5−18
@@ -17,44 +17,31 @@
17#ifndef FAKE_CATEGORIES_H
17#ifndef FAKE_CATEGORIES_H
18#define FAKE_CATEGORIES_H
18#define FAKE_CATEGORIES_H
19
19
20+#include <unity/shell/scopes/CategoriesInterface.h>
21+
20// Qt
22// Qt
21−#include <QAbstractListModel>
22#include <QList>
23#include <QList>
23
24
24class ResultsModel;
25class ResultsModel;
25
26
26−class Categories : public QAbstractListModel
27+class Categories : public unity::shell::scopes::CategoriesInterface
27{
28{
28 Q_OBJECT
29 Q_OBJECT
29
30
30− Q_ENUMS(Roles)
31−
32public:
31public:
33 Categories(int category_count, QObject* parent = 0);
32 Categories(int category_count, QObject* parent = 0);
34− enum Roles {
35− RoleCategoryId,
36− RoleName,
37− RoleIcon,
38− RoleRawRendererTemplate,
39− RoleRenderer,
40− RoleComponents,
41− RoleProgressSource, // maybe
42− RoleResults,
43− RoleCount
44− };
45
33
46 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
34 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
47− QHash<int, QByteArray> roleNames() const override;
48 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
35 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
49
36
50− Q_INVOKABLE void addSpecialCategory(QString const& categoryId, QString const& name, QString const& icon, QString const& rawTemplate, QObject* countObject);
37+ Q_INVOKABLE void addSpecialCategory(QString const& categoryId, QString const& name, QString const& icon, QString const& rawTemplate, QObject* countObject) override;
38+ Q_INVOKABLE bool overrideCategoryJson(QString const& categoryId, QString const& json) override;
51
39
52private Q_SLOTS:
40private Q_SLOTS:
53 void countChanged();
41 void countChanged();
54
42
55private:
43private:
56 mutable QHash<int, ResultsModel*> m_resultsModels;
44 mutable QHash<int, ResultsModel*> m_resultsModels;
57− QHash<int, QByteArray> m_roles;
58 int m_category_count;
45 int m_category_count;
59
46
60 struct CategoryData {
47 struct CategoryData {
tests/mocks/Unity/fake_previewmodel.cpp+2−15
@@ -27,22 +27,14 @@
27// Qt
27// Qt
28#include <QDebug>
28#include <QDebug>
29
29
30−PreviewModel::PreviewModel(QObject* parent) : QAbstractListModel(parent)
30+PreviewModel::PreviewModel(QObject* parent)
31+ : unity::shell::scopes::PreviewModelInterface(parent)
31{
32{
32 // we have one column by default
33 // we have one column by default
33 PreviewWidgetModel* columnModel = new PreviewWidgetModel(this);
34 PreviewWidgetModel* columnModel = new PreviewWidgetModel(this);
34 m_previewWidgetModels.append(columnModel);
35 m_previewWidgetModels.append(columnModel);
35}
36}
36
37
37−QHash<int, QByteArray> PreviewModel::roleNames() const
38−{
39− QHash<int, QByteArray> roles;
40−
41− roles[Roles::RoleColumnModel] = "columnModel";
42−
43− return roles;
44−}
45−
46void PreviewModel::setWidgetColumnCount(int count)
38void PreviewModel::setWidgetColumnCount(int count)
47{
39{
48 if (count != 1) {
40 if (count != 1) {
@@ -65,11 +57,6 @@ bool PreviewModel::processingAction() const
65 return false;
57 return false;
66}
58}
67
59
68−void PreviewModel::setProcessingAction(bool /*processing*/)
69−{
70− qFatal("PreviewModel::setProcessingAction not implemented");
71−}
72−
73int PreviewModel::rowCount(const QModelIndex&) const
60int PreviewModel::rowCount(const QModelIndex&) const
74{
61{
75 return m_previewWidgetModels.size();
62 return m_previewWidgetModels.size();
tests/mocks/Unity/fake_previewmodel.h+7−25
@@ -18,47 +18,29 @@
18#ifndef FAKE_PREVIEWMODEL_H
18#ifndef FAKE_PREVIEWMODEL_H
19#define FAKE_PREVIEWMODEL_H
19#define FAKE_PREVIEWMODEL_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewModelInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewWidgetModel;
26class PreviewWidgetModel;
26
27
27−class PreviewModel : public QAbstractListModel
28+class PreviewModel : public unity::shell::scopes::PreviewModelInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33− Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
34− Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35− Q_PROPERTY(bool processingAction READ processingAction NOTIFY processingActionChanged)
36−
37public:
32public:
38 explicit PreviewModel(QObject* parent = 0);
33 explicit PreviewModel(QObject* parent = 0);
39
34
40− enum Roles {
41− RoleColumnModel
42− };
43−
44 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
35 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
45− QHash<int, QByteArray> roleNames() const override;
46 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
36 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
47
37
48− void setWidgetColumnCount(int count);
38+ void setWidgetColumnCount(int count) override;
49− int widgetColumnCount() const;
39+ int widgetColumnCount() const override;
50− bool loaded() const;
40+ bool loaded() const override;
51− bool processingAction() const;
41+ bool processingAction() const override;
52− void setProcessingAction(bool processing);
53−
54−Q_SIGNALS:
55− void widgetColumnCountChanged();
56− void loadedChanged();
57− void processingActionChanged();
58− void triggered(QString const&, QString const&, QVariantMap const&);
59
42
60private:
43private:
61− QHash<int, QByteArray> m_roles;
62 QList<PreviewWidgetModel*> m_previewWidgetModels;
44 QList<PreviewWidgetModel*> m_previewWidgetModels;
63};
45};
64
46
tests/mocks/Unity/fake_previewstack.cpp+3−11
@@ -21,7 +21,8 @@
21#include "fake_previewmodel.h"
21#include "fake_previewmodel.h"
22#include "fake_scope.h"
22#include "fake_scope.h"
23
23
24−PreviewStack::PreviewStack(QObject* parent) : QAbstractListModel(parent)
24+PreviewStack::PreviewStack(QObject* parent)
25+ : unity::shell::scopes::PreviewStackInterface(parent)
25{
26{
26 m_previews << new PreviewModel(this);
27 m_previews << new PreviewModel(this);
27}
28}
@@ -30,15 +31,6 @@ PreviewStack::~PreviewStack()
30{
31{
31}
32}
32
33
33−QHash<int, QByteArray> PreviewStack::roleNames() const
34−{
35− QHash<int, QByteArray> roles;
36−
37− roles[Roles::RolePreviewModel] = "previewModel";
38−
39− return roles;
40−}
41−
42void PreviewStack::setWidgetColumnCount(int columnCount)
34void PreviewStack::setWidgetColumnCount(int columnCount)
43{
35{
44 if (columnCount != 1) {
36 if (columnCount != 1) {
@@ -56,7 +48,7 @@ int PreviewStack::rowCount(const QModelIndex&) const
56 return m_previews.size();
48 return m_previews.size();
57}
49}
58
50
59−PreviewModel* PreviewStack::get(int index) const
51+unity::shell::scopes::PreviewModelInterface* PreviewStack::getPreviewModel(int index) const
60{
52{
61 if (index >= m_previews.size()) {
53 if (index >= m_previews.size()) {
62 return nullptr;
54 return nullptr;
tests/mocks/Unity/fake_previewstack.h+6−17
@@ -18,39 +18,28 @@
18#ifndef FAKE_PREVIEWSTACK_H
18#ifndef FAKE_PREVIEWSTACK_H
19#define FAKE_PREVIEWSTACK_H
19#define FAKE_PREVIEWSTACK_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewStackInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewModel;
26class PreviewModel;
26
27
27−class PreviewStack : public QAbstractListModel
28+class PreviewStack : public unity::shell::scopes::PreviewStackInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33− Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
34−
35public:
32public:
36 explicit PreviewStack(QObject* parent = 0);
33 explicit PreviewStack(QObject* parent = 0);
37 virtual ~PreviewStack();
34 virtual ~PreviewStack();
38
35
39− enum Roles {
40− RolePreviewModel
41− };
42−
43 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
36 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
44− QHash<int, QByteArray> roleNames() const override;
45 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
37 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
46
38
47− Q_INVOKABLE PreviewModel* get(int index) const;
39+ Q_INVOKABLE unity::shell::scopes::PreviewModelInterface* getPreviewModel(int index) const override;
48−
49− void setWidgetColumnCount(int columnCount);
50− int widgetColumnCount() const;
51
40
52−Q_SIGNALS:
41+ void setWidgetColumnCount(int columnCount) override;
53− void widgetColumnCountChanged();
42+ int widgetColumnCount() const override;
54
43
55private:
44private:
56 QList<PreviewModel*> m_previews;
45 QList<PreviewModel*> m_previews;
tests/mocks/Unity/fake_previewwidgetmodel.cpp+2−10
@@ -35,12 +35,9 @@ struct PreviewData
35 }
35 }
36};
36};
37
37
38−PreviewWidgetModel::PreviewWidgetModel(QObject* parent) : QAbstractListModel(parent)
38+PreviewWidgetModel::PreviewWidgetModel(QObject* parent)
39+ : unity::shell::scopes::PreviewWidgetModelInterface(parent)
39{
40{
40− m_roles[Roles::RoleWidgetId] = "widgetId";
41− m_roles[Roles::RoleType] = "type";
42− m_roles[Roles::RoleProperties] = "properties";
43−
44 populateWidgets();
41 populateWidgets();
45}
42}
46
43
@@ -60,11 +57,6 @@ void PreviewWidgetModel::populateWidgets()
60
57
61}
58}
62
59
63−QHash<int, QByteArray> PreviewWidgetModel::roleNames() const
64−{
65− return m_roles;
66−}
67−
68int PreviewWidgetModel::rowCount(const QModelIndex&) const
60int PreviewWidgetModel::rowCount(const QModelIndex&) const
69{
61{
70 return m_previewWidgets.size();
62 return m_previewWidgets.size();
tests/mocks/Unity/fake_previewwidgetmodel.h+3−12
@@ -18,33 +18,24 @@
18#ifndef FAKE_PREVIEWWIDGETMODEL_H
18#ifndef FAKE_PREVIEWWIDGETMODEL_H
19#define FAKE_PREVIEWWIDGETMODEL_H
19#define FAKE_PREVIEWWIDGETMODEL_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewWidgetModelInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewData;
26class PreviewData;
26
27
27−class PreviewWidgetModel : public QAbstractListModel
28+class PreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33public:
32public:
34 explicit PreviewWidgetModel(QObject* parent = 0);
33 explicit PreviewWidgetModel(QObject* parent = 0);
35
34
36− enum Roles {
37− RoleWidgetId,
38− RoleType,
39− RoleProperties
40− };
41−
42 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
35 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
43− QHash<int, QByteArray> roleNames() const override;
44 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
36 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
45
37
46private:
38private:
47− QHash<int, QByteArray> m_roles;
48 QList<QSharedPointer<PreviewData>> m_previewWidgets;
39 QList<QSharedPointer<PreviewData>> m_previewWidgets;
49
40
50 void populateWidgets();
41 void populateWidgets();
tests/mocks/Unity/fake_resultsmodel.cpp+1−44
@@ -23,25 +23,10 @@
23#include <paths.h>
23#include <paths.h>
24
24
25ResultsModel::ResultsModel(int result_count, int categoryId, QObject* parent)
25ResultsModel::ResultsModel(int result_count, int categoryId, QObject* parent)
26− : QAbstractListModel(parent)
26+ : unity::shell::scopes::ResultsModelInterface(parent)
27 , m_result_count(result_count)
27 , m_result_count(result_count)
28 , m_categoryId(categoryId)
28 , m_categoryId(categoryId)
29{
29{
30− m_roles[ResultsModel::RoleUri] = "uri";
31− m_roles[ResultsModel::RoleCategoryId] = "categoryId";
32− m_roles[ResultsModel::RoleDndUri] = "dndUri";
33− m_roles[ResultsModel::RoleResult] = "result";
34− m_roles[ResultsModel::RoleTitle] = "title";
35− m_roles[ResultsModel::RoleArt] = "art";
36− m_roles[ResultsModel::RoleSubtitle] = "subtitle";
37− m_roles[ResultsModel::RoleMascot] = "mascot";
38− m_roles[ResultsModel::RoleEmblem] = "emblem";
39− m_roles[ResultsModel::RoleOldPrice] = "oldPrice";
40− m_roles[ResultsModel::RolePrice] = "price";
41− m_roles[ResultsModel::RoleAltPrice] = "altPrice";
42− m_roles[ResultsModel::RoleRating] = "rating";
43− m_roles[ResultsModel::RoleAltRating] = "altRating";
44− m_roles[ResultsModel::RoleSummary] = "summary";
45}
30}
46
31
47QString ResultsModel::categoryId() const
32QString ResultsModel::categoryId() const
@@ -54,12 +39,6 @@ void ResultsModel::setCategoryId(QString const& /*id*/)
54 qFatal("Calling un-implemented ResultsModel::setCategoryId");
39 qFatal("Calling un-implemented ResultsModel::setCategoryId");
55}
40}
56
41
57−QHash<int, QByteArray>
58−ResultsModel::roleNames() const
59−{
60− return m_roles;
61−}
62−
63int ResultsModel::rowCount(const QModelIndex& parent) const
42int ResultsModel::rowCount(const QModelIndex& parent) const
64{
43{
65 Q_UNUSED(parent);
44 Q_UNUSED(parent);
@@ -72,23 +51,6 @@ int ResultsModel::count() const
72 return rowCount();
51 return rowCount();
73}
52}
74
53
75−QVariant ResultsModel::get(int row) const
76−{
77− if (row >= m_result_count || row < 0) return QVariantMap();
78−
79− QVariantMap result;
80− QModelIndex modelIndex(index(row));
81− QHashIterator<int, QByteArray> it(roleNames());
82− while (it.hasNext()) {
83− it.next();
84− QVariant val(data(modelIndex, it.key()));
85− if (val.isNull()) continue;
86− result[it.value()] = val;
87− }
88−
89− return result;
90−}
91−
92QVariant
54QVariant
93ResultsModel::data(const QModelIndex& index, int role) const
55ResultsModel::data(const QModelIndex& index, int role) const
94{
56{
@@ -106,11 +68,6 @@ ResultsModel::data(const QModelIndex& index, int role) const
106 return QString("Subtitle.%1.%2").arg(m_categoryId).arg(index.row());
68 return QString("Subtitle.%1.%2").arg(m_categoryId).arg(index.row());
107 case RoleMascot:
69 case RoleMascot:
108 case RoleEmblem:
70 case RoleEmblem:
109− case RoleOldPrice:
110− case RolePrice:
111− case RoleAltPrice:
112− case RoleRating:
113− case RoleAltRating:
114 case RoleSummary:
71 case RoleSummary:
115 default:
72 default:
116 return QVariant();
73 return QVariant();
tests/mocks/Unity/fake_resultsmodel.h+5−37
@@ -21,58 +21,26 @@
21#ifndef FAKE_RESULTS_MODEL_H
21#ifndef FAKE_RESULTS_MODEL_H
22#define FAKE_RESULTS_MODEL_H
22#define FAKE_RESULTS_MODEL_H
23
23
24−#include <QAbstractListModel>
24+#include <unity/shell/scopes/ResultsModelInterface.h>
25
25
26−class ResultsModel : public QAbstractListModel
26+class ResultsModel : public unity::shell::scopes::ResultsModelInterface
27{
27{
28 Q_OBJECT
28 Q_OBJECT
29
29
30− Q_ENUMS(Roles)
31−
32− Q_PROPERTY(QString categoryId READ categoryId WRITE setCategoryId NOTIFY categoryIdChanged)
33− Q_PROPERTY(int count READ count NOTIFY countChanged)
34−
35public:
30public:
36 explicit ResultsModel(int result_count, int categoryId, QObject* parent = 0);
31 explicit ResultsModel(int result_count, int categoryId, QObject* parent = 0);
37
32
38− enum Roles {
39− RoleUri,
40− RoleCategoryId,
41− RoleDndUri,
42− RoleResult,
43− // card components
44− RoleTitle,
45− RoleArt,
46− RoleSubtitle,
47− RoleMascot,
48− RoleEmblem,
49− RoleOldPrice,
50− RolePrice,
51− RoleAltPrice,
52− RoleRating,
53− RoleAltRating,
54− RoleSummary
55− };
56−
57 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
33 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
58− QHash<int, QByteArray> roleNames() const override;
59 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
34 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
60
35
61− Q_INVOKABLE QVariant get(int row) const;
62−
63 /* getters */
36 /* getters */
64− QString categoryId() const;
37+ QString categoryId() const override;
65− int count() const;
38+ int count() const override;
66
39
67 /* setters */
40 /* setters */
68− void setCategoryId(QString const& id);
41+ void setCategoryId(QString const& id) override;
69−
70−Q_SIGNALS:
71− void categoryIdChanged();
72− void countChanged();
73
42
74private:
43private:
75− QHash<int, QByteArray> m_roles;
76 int m_result_count;
44 int m_result_count;
77 int m_categoryId;
45 int m_categoryId;
78};
46};
tests/mocks/Unity/fake_scope.cpp+3−14
@@ -23,7 +23,7 @@ Scope::Scope(QObject* parent) : Scope(QString(), QString(), false, parent)
23}
23}
24
24
25Scope::Scope(QString const& id, QString const& name, bool visible, QObject* parent)
25Scope::Scope(QString const& id, QString const& name, bool visible, QObject* parent)
26− : QObject(parent)
26+ : unity::shell::scopes::ScopeInterface(parent)
27 , m_id(id)
27 , m_id(id)
28 , m_name(name)
28 , m_name(name)
29 , m_visible(visible)
29 , m_visible(visible)
@@ -63,15 +63,11 @@ QString Scope::shortcut() const {
63 return QString("");
63 return QString("");
64}
64}
65
65
66−bool Scope::connected() const {
67− return true;
68−}
69−
70bool Scope::searchInProgress() const {
66bool Scope::searchInProgress() const {
71 return m_searching;
67 return m_searching;
72}
68}
73
69
74−Categories* Scope::categories() const {
70+unity::shell::scopes::CategoriesInterface* Scope::categories() const {
75 return m_categories;
71 return m_categories;
76}
72}
77
73
@@ -91,13 +87,6 @@ bool Scope::isActive() const {
91 return m_isActive;
87 return m_isActive;
92}
88}
93
89
94−void Scope::setName(const QString &str) {
95− if (str != m_name) {
96− m_name = str;
97− Q_EMIT nameChanged(m_name);
98− }
99−}
100−
101void Scope::setSearchQuery(const QString &str) {
90void Scope::setSearchQuery(const QString &str) {
102 if (str != m_searchQuery) {
91 if (str != m_searchQuery) {
103 m_searchQuery = str;
92 m_searchQuery = str;
@@ -151,7 +140,7 @@ void Scope::cancelActivation()
151{
140{
152}
141}
153
142
154−void Scope::closeScope(Scope* /*scope*/)
143+void Scope::closeScope(unity::shell::scopes::ScopeInterface* /*scope*/)
155{
144{
156 qFatal("Scope::closeScope is not implemented");
145 qFatal("Scope::closeScope is not implemented");
157}
146}
tests/mocks/Unity/fake_scope.h+30−72
@@ -17,36 +17,21 @@
17#ifndef FAKE_SCOPE_H
17#ifndef FAKE_SCOPE_H
18#define FAKE_SCOPE_H
18#define FAKE_SCOPE_H
19
19
20+#include <unity/shell/scopes/ScopeInterface.h>
21+
20#include "fake_categories.h"
22#include "fake_categories.h"
21#include "fake_previewstack.h"
23#include "fake_previewstack.h"
22
24
23−#include <QObject>
24#include <QTimer>
25#include <QTimer>
25
26
26class Department;
27class Department;
27class Preview;
28class Preview;
28
29
29−class Scope : public QObject
30+class Scope : public unity::shell::scopes::ScopeInterface
30{
31{
32+// TODO
31 Q_OBJECT
33 Q_OBJECT
32
34
33− Q_PROPERTY(QString id READ id NOTIFY idChanged)
34− Q_PROPERTY(QString name READ name NOTIFY nameChanged)
35− Q_PROPERTY(QString iconHint READ iconHint NOTIFY iconHintChanged)
36− Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
37− Q_PROPERTY(QString searchHint READ searchHint NOTIFY searchHintChanged)
38− Q_PROPERTY(bool searchInProgress READ searchInProgress WRITE setSearchInProgress NOTIFY searchInProgressChanged)
39− Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
40− Q_PROPERTY(QString shortcut READ shortcut NOTIFY shortcutChanged)
41− Q_PROPERTY(Categories* categories READ categories NOTIFY categoriesChanged)
42− //Q_PROPERTY(Filters* filters READ filters NOTIFY filtersChanged)
43−
44− Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
45− Q_PROPERTY(QString noResultsHint READ noResultsHint WRITE setNoResultsHint NOTIFY noResultsHintChanged)
46− Q_PROPERTY(QString formFactor READ formFactor WRITE setFormFactor NOTIFY formFactorChanged)
47− Q_PROPERTY(bool isActive READ isActive WRITE setActive NOTIFY isActiveChanged)
48−
49−// TODO
50 Q_PROPERTY(QString currentDepartment READ currentDepartment NOTIFY currentDepartmentChanged)
35 Q_PROPERTY(QString currentDepartment READ currentDepartment NOTIFY currentDepartmentChanged)
51 Q_PROPERTY(bool hasDepartments READ hasDepartments NOTIFY hasDepartmentsChanged)
36 Q_PROPERTY(bool hasDepartments READ hasDepartments NOTIFY hasDepartmentsChanged)
52// END TODO
37// END TODO
@@ -56,35 +41,33 @@ public:
56 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
41 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
57
42
58 /* getters */
43 /* getters */
59− QString id() const;
44+ QString id() const override;
60− QString name() const;
45+ QString name() const override;
61− QString iconHint() const;
46+ QString iconHint() const override;
62− QString description() const;
47+ QString description() const override;
63− QString searchHint() const;
48+ QString searchHint() const override;
64− bool visible() const;
49+ bool visible() const override;
65− QString shortcut() const;
50+ QString shortcut() const override;
66− bool connected() const;
67− bool searchInProgress() const;
51+ bool searchInProgress() const override;
68− Categories* categories() const;
52+ unity::shell::scopes::CategoriesInterface* categories() const override;
69− QString searchQuery() const;
53+ QString searchQuery() const override;
70− QString noResultsHint() const;
54+ QString noResultsHint() const override;
71− QString formFactor() const;
55+ QString formFactor() const override;
72− bool isActive() const;
56+ bool isActive() const override;
73
57
74 /* setters */
58 /* setters */
75− void setName(const QString& name);
76− void setSearchQuery(const QString& search_query);
59+ void setSearchQuery(const QString& search_query) override;
77− void setNoResultsHint(const QString& hint);
60+ void setNoResultsHint(const QString& hint) override;
78− void setFormFactor(const QString& form_factor);
61+ void setFormFactor(const QString& form_factor) override;
79− void setActive(const bool);
62+ void setActive(const bool) override;
80− void setSearchInProgress(const bool inProg);
63+ Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
81−
64+
82− Q_INVOKABLE void activate(QVariant const& result);
65+ Q_INVOKABLE void activate(QVariant const& result) override;
83− Q_INVOKABLE PreviewStack* preview(QVariant const& result);
66+ Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
84− Q_INVOKABLE void cancelActivation();
67+ Q_INVOKABLE void cancelActivation() override;
85− Q_INVOKABLE void closeScope(Scope* scope);
68+ Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
86−
69+
87− // TODO
70+ // TODO this will go to unity-api eventually
88 QString currentDepartment() const;
71 QString currentDepartment() const;
89 bool hasDepartments() const;
72 bool hasDepartments() const;
90 Q_INVOKABLE Department *getDepartment(const QString& id); // returns a Department with lazy-loaded children
73 Q_INVOKABLE Department *getDepartment(const QString& id); // returns a Department with lazy-loaded children
@@ -92,35 +75,10 @@ public:
92 // END TODO
75 // END TODO
93
76
94Q_SIGNALS:
77Q_SIGNALS:
95− // TODO
78+ // TODO this will go to unity-api eventually
96 void currentDepartmentChanged(const QString&);
79 void currentDepartmentChanged(const QString&);
97 void hasDepartmentsChanged(bool);
80 void hasDepartmentsChanged(bool);
98 // END TODO
81 // END TODO
99− void idChanged();
100− void nameChanged(const QString&);
101− void iconHintChanged(const QString&);
102− void descriptionChanged(const QString&);
103− void searchHintChanged(const QString&);
104− void searchInProgressChanged();
105− void visibleChanged(bool);
106− void shortcutChanged(const QString&);
107− void categoriesChanged();
108− //void filtersChanged();
109− void searchQueryChanged();
110− void noResultsHintChanged();
111− void formFactorChanged();
112− void isActiveChanged(bool);
113−
114− // signals triggered by activate(..) or preview(..) requests.
115− void showDash();
116− void hideDash();
117− void gotoUri(const QString &uri);
118− void activated();
119− void previewRequested(QVariant const& result);
120− void gotoScope(QString const& scopeId);
121− void openScope(Scope* scope);
122−
123− void activateApplication(const QString &desktop);
124
82
125protected:
83protected:
126
84
tests/mocks/Unity/fake_scopes.cpp+11−22
@@ -25,15 +25,10 @@
25#include <QTimer>
25#include <QTimer>
26
26
27Scopes::Scopes(QObject *parent)
27Scopes::Scopes(QObject *parent)
28−: QAbstractListModel(parent)
28+ : unity::shell::scopes::ScopesInterface(parent)
29−, m_loaded(false)
29+ , m_loaded(false)
30−, timer(this)
30+ , timer(this)
31{
31{
32− m_roles[Scopes::RoleScope] = "scope";
33− m_roles[Scopes::RoleId] = "id";
34− m_roles[Scopes::RoleVisible] = "visible";
35− m_roles[Scopes::RoleTitle] = "title";
36−
37 QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
32 QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
38 QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
33 QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
39 QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
34 QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
@@ -83,11 +78,6 @@ void Scopes::load()
83 timer.start();
78 timer.start();
84}
79}
85
80
86−QHash<int, QByteArray> Scopes::roleNames() const
87−{
88− return m_roles;
89−}
90−
91int Scopes::rowCount(const QModelIndex&) const
81int Scopes::rowCount(const QModelIndex&) const
92{
82{
93 return m_scopes.count();
83 return m_scopes.count();
@@ -114,14 +104,18 @@ QVariant Scopes::data(const QModelIndex& index, int role) const
114 }
104 }
115}
105}
116
106
117−QVariant Scopes::get(int row) const
107+unity::shell::scopes::ScopeInterface* Scopes::getScope(int row) const
118{
108{
119− return data(QAbstractListModel::index(row), 0);
109+ if (row < 0 || row >= m_scopes.size()) {
110+ return nullptr;
111+ }
112+
113+ return m_scopes[row];
120}
114}
121
115
122−QVariant Scopes::get(QString const&) const
116+unity::shell::scopes::ScopeInterface* Scopes::getScope(QString const&) const
123{
117{
124− return QVariant();
118+ return nullptr;
125}
119}
126
120
127QModelIndex Scopes::parent(const QModelIndex&) const
121QModelIndex Scopes::parent(const QModelIndex&) const
@@ -134,11 +128,6 @@ bool Scopes::loaded() const
134 return m_loaded;
128 return m_loaded;
135}
129}
136
130
137−int Scopes::count() const
138−{
139− return rowCount();
140−}
141−
142void Scopes::addScope(Scope* scope)
131void Scopes::addScope(Scope* scope)
143{
132{
144 int index = rowCount();
133 int index = rowCount();
tests/mocks/Unity/fake_scopes.h+7−24
@@ -19,36 +19,27 @@
19#ifndef FAKE_SCOPES_H
19#ifndef FAKE_SCOPES_H
20#define FAKE_SCOPES_H
20#define FAKE_SCOPES_H
21
21
22+#include <unity/shell/scopes/ScopesInterface.h>
23+
22// Local
24// Local
23#include "fake_scope.h"
25#include "fake_scope.h"
24
26
25// Qt
27// Qt
26−#include <QAbstractListModel>
27#include <QList>
28#include <QList>
28#include <QTimer>
29#include <QTimer>
29
30
30−class Scopes : public QAbstractListModel
31+class Scopes : public unity::shell::scopes::ScopesInterface
31{
32{
32 Q_OBJECT
33 Q_OBJECT
33− Q_ENUMS(Roles)
34− Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35− Q_PROPERTY(int count READ count NOTIFY countChanged)
36
34
37public:
35public:
38 explicit Scopes(QObject *parent = 0);
36 explicit Scopes(QObject *parent = 0);
39 ~Scopes();
37 ~Scopes();
40
38
41− enum Roles {
42− RoleScope,
43− RoleId,
44− RoleVisible,
45− RoleTitle
46− };
47−
48− Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const;
39+ Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const override;
49
40
50− Q_INVOKABLE QVariant get(int row) const;
41+ Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(int row) const override;
51− Q_INVOKABLE QVariant get(const QString& scope_id) const;
42+ Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(const QString& scope_id) const override;
52
43
53 Q_INVOKABLE void addScope(Scope* scope);
44 Q_INVOKABLE void addScope(Scope* scope);
54
45
@@ -56,23 +47,15 @@ public:
56 Q_INVOKABLE void load();
47 Q_INVOKABLE void load();
57
48
58 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
49 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
59− QHash<int, QByteArray> roleNames() const;
60 QModelIndex parent ( const QModelIndex & index ) const;
50 QModelIndex parent ( const QModelIndex & index ) const;
61
51
62− bool loaded() const;
52+ bool loaded() const override;
63− int count() const;
64−
65−Q_SIGNALS:
66− void activateScopeRequested(const QString& scope_id);
67− void loadedChanged(bool);
68− void countChanged();
69
53
70private Q_SLOTS:
54private Q_SLOTS:
71 void updateScopes();
55 void updateScopes();
72
56
73private:
57private:
74 QList<Scope*> m_scopes;
58 QList<Scope*> m_scopes;
75− QHash<int, QByteArray> m_roles;
76 bool m_loaded;
59 bool m_loaded;
77 QTimer timer;
60 QTimer timer;
78};
61};
tests/mocks/Unity/fake_unity_plugin.cpp+3−2
@@ -41,9 +41,10 @@ void FakeUnityPlugin::registerTypes(const char *uri)
41 Q_ASSERT(uri == QLatin1String("Unity"));
41 Q_ASSERT(uri == QLatin1String("Unity"));
42
42
43 qmlRegisterType<Scopes>(uri, 0, 2, "Scopes");
43 qmlRegisterType<Scopes>(uri, 0, 2, "Scopes");
44− qmlRegisterType<Scope>(uri, 0, 2, "Scope");
44+ qmlRegisterType<Scope>(uri, 0, 2, "MockScope");
45+ qmlRegisterUncreatableType<unity::shell::scopes::ScopeInterface>(uri, 0, 2, "Scope", "Can't create Scope object in QML.");
45 qmlRegisterUncreatableType<Department>(uri, 0, 2, "Department", "Can't create Department object in QML.");
46 qmlRegisterUncreatableType<Department>(uri, 0, 2, "Department", "Can't create Department object in QML.");
46− qmlRegisterUncreatableType<Categories>(uri, 0, 2, "Categories", "Can't create Categories object in QML.");
47+ qmlRegisterUncreatableType<unity::shell::scopes::CategoriesInterface>(uri, 0, 2, "Categories", "Can't create Categories object in QML.");
47 qmlRegisterUncreatableType<ResultsModel>(uri, 0, 2, "ResultsModel", "Can't create ResultsModel object in QML.");
48 qmlRegisterUncreatableType<ResultsModel>(uri, 0, 2, "ResultsModel", "Can't create ResultsModel object in QML.");
48 qmlRegisterType<PreviewModel>(uri, 0, 2, "FakePreviewModel");
49 qmlRegisterType<PreviewModel>(uri, 0, 2, "FakePreviewModel");
49 qmlRegisterUncreatableType<PreviewWidgetModel>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");
50 qmlRegisterUncreatableType<PreviewWidgetModel>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");
tests/qmltests/Components/tst_PageHeaderLabel.qml+4−4
@@ -26,7 +26,7 @@ Item {
26 width: units.gu(110)
26 width: units.gu(110)
27 height: units.gu(30)
27 height: units.gu(30)
28
28
29− Scope {
29+ MockScope {
30 id: scopeMock
30 id: scopeMock
31 }
31 }
32
32
@@ -148,17 +148,17 @@ Item {
148
148
149 pageHeader.triggerSearch()
149 pageHeader.triggerSearch()
150
150
151− scopeMock.searchInProgress = false
151+ scopeMock.setSearchInProgress(false);
152 compare(searchIndicator.running, false, "Search indicator is running.")
152 compare(searchIndicator.running, false, "Search indicator is running.")
153 tryCompare(primaryImage, "visible", true)
153 tryCompare(primaryImage, "visible", true)
154
154
155− scopeMock.searchInProgress = true
155+ scopeMock.setSearchInProgress(true);
156 compare(searchIndicator.running, true, "Search indicator isn't running.")
156 compare(searchIndicator.running, true, "Search indicator isn't running.")
157 tryCompare(primaryImage, "visible", false)
157 tryCompare(primaryImage, "visible", false)
158 }
158 }
159
159
160 function cleanup() {
160 function cleanup() {
161− scopeMock.searchInProgress = false;
161+ scopeMock.setSearchInProgress(false);
162 pageHeader.resetSearch();
162 pageHeader.resetSearch();
163 }
163 }
164
164
tests/qmltests/Dash/tst_DashContent.qml+5−5
@@ -166,7 +166,7 @@ Item {
166
166
167 // test greater than scope count.
167 // test greater than scope count.
168 var currentScopeIndex = dashContent.currentIndex;
168 var currentScopeIndex = dashContent.currentIndex;
169− dashContent.setCurrentScopeAtIndex(scopesModel.count, true, false);
169+ dashContent.setCurrentScopeAtIndex(8, true, false);
170 compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count");
170 compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count");
171 }
171 }
172
172
@@ -195,7 +195,7 @@ Item {
195 dashContent.setCurrentScopeAtIndex(data.index, true, false);
195 dashContent.setCurrentScopeAtIndex(data.index, true, false);
196 tryCompareFunction(get_current_item_object_name, data.objectName)
196 tryCompareFunction(get_current_item_object_name, data.objectName)
197 var pageHeader = findChild(dashContent, "pageHeader");
197 var pageHeader = findChild(dashContent, "pageHeader");
198− compare(pageHeader.scope, scopesModel.get(data.index));
198+ compare(pageHeader.scope, scopesModel.getScope(data.index));
199 }
199 }
200
200
201 function test_is_active_data() {
201 function test_is_active_data() {
@@ -212,9 +212,9 @@ Item {
212 dashContent.setCurrentScopeAtIndex(data.select, true, false);
212 dashContent.setCurrentScopeAtIndex(data.select, true, false);
213 dashContent.visible = data.visible;
213 dashContent.visible = data.visible;
214
214
215− tryCompare(scopesModel.get(0), "isActive", data.active0);
215+ tryCompare(scopesModel.getScope(0), "isActive", data.active0);
216− tryCompare(scopesModel.get(1), "isActive", data.active1);
216+ tryCompare(scopesModel.getScope(1), "isActive", data.active1);
217− tryCompare(scopesModel.get(2), "isActive", data.active2);
217+ tryCompare(scopesModel.getScope(2), "isActive", data.active2);
218 }
218 }
219
219
220 function doFindMusicButton(parent) {
220 function doFindMusicButton(parent) {
tests/qmltests/Dash/tst_GenericScopeView.qml+10−10
@@ -39,7 +39,7 @@ Item {
39 id: scopes
39 id: scopes
40
40
41 onLoadedChanged: {
41 onLoadedChanged: {
42− genericScopeView.scope = scopes.get(2)
42+ genericScopeView.scope = scopes.getScope(2)
43 }
43 }
44 }
44 }
45
45
@@ -67,7 +67,7 @@ Item {
67 when: scopes.loaded && windowShown
67 when: scopes.loaded && windowShown
68
68
69 function init() {
69 function init() {
70− genericScopeView.scope = scopes.get(2)
70+ genericScopeView.scope = scopes.getScope(2)
71 shell.width = units.gu(120)
71 shell.width = units.gu(120)
72 genericScopeView.categoryView.positionAtBeginning();
72 genericScopeView.categoryView.positionAtBeginning();
73 tryCompare(genericScopeView.categoryView, "contentY", 0)
73 tryCompare(genericScopeView.categoryView, "contentY", 0)
@@ -96,31 +96,31 @@ Item {
96
96
97 function test_showDash() {
97 function test_showDash() {
98 previewListView.open = true;
98 previewListView.open = true;
99− scopes.get(2).showDash();
99+ scopes.getScope(2).showDash();
100 tryCompare(previewListView, "open", false);
100 tryCompare(previewListView, "open", false);
101 }
101 }
102
102
103 function test_hideDash() {
103 function test_hideDash() {
104 previewListView.open = true;
104 previewListView.open = true;
105− scopes.get(2).hideDash();
105+ scopes.getScope(2).hideDash();
106 tryCompare(previewListView, "open", false);
106 tryCompare(previewListView, "open", false);
107 }
107 }
108
108
109 function test_searchQuery() {
109 function test_searchQuery() {
110− genericScopeView.scope = scopes.get(0);
110+ genericScopeView.scope = scopes.getScope(0);
111 genericScopeView.scope.searchQuery = "test";
111 genericScopeView.scope.searchQuery = "test";
112− genericScopeView.scope = scopes.get(1);
112+ genericScopeView.scope = scopes.getScope(1);
113 genericScopeView.scope.searchQuery = "test2";
113 genericScopeView.scope.searchQuery = "test2";
114− genericScopeView.scope = scopes.get(0);
114+ genericScopeView.scope = scopes.getScope(0);
115 tryCompare(genericScopeView.scope, "searchQuery", "test");
115 tryCompare(genericScopeView.scope, "searchQuery", "test");
116− genericScopeView.scope = scopes.get(1);
116+ genericScopeView.scope = scopes.getScope(1);
117 tryCompare(genericScopeView.scope, "searchQuery", "test2");
117 tryCompare(genericScopeView.scope, "searchQuery", "test2");
118 }
118 }
119
119
120 function test_changeScope() {
120 function test_changeScope() {
121 genericScopeView.scope.searchQuery = "test"
121 genericScopeView.scope.searchQuery = "test"
122− genericScopeView.scope = scopes.get(1)
122+ genericScopeView.scope = scopes.getScope(1)
123− genericScopeView.scope = scopes.get(2)
123+ genericScopeView.scope = scopes.getScope(2)
124 tryCompare(genericScopeView.scope, "searchQuery", "test")
124 tryCompare(genericScopeView.scope, "searchQuery", "test")
125 }
125 }
126
126