on xenial help sign in
Made sure progress is properly exposed in DBus-introspection and fixed other suggestions from MP-comments.
commit0b22f5519ca08cb29e5667cd152b7b24f8b28bf4 authorMirco Müller <mirco.mueller@ubuntu.com> dateWed 22 Jul 2015, 12:30 (11 years ago) parent89ce90a
3 files changed+10−9
debian/control+2−2 plugins/Greeter/Unity/Launcher/launchermodelas.cpp+7−7 plugins/Unity/Launcher/dbusinterface.cpp+1
debian/control+2−2
@@ -101,7 +101,7 @@ Depends: gsettings-desktop-schemas,
101101 qtdeclarative5-ubuntu-telephony0.1,
102102 qtdeclarative5-ubuntu-web-plugin,
103103 ubuntu-system-settings,
104− unity-launcher-impl-8,
104+ unity-launcher-impl-4,
105105 unity8-common (= ${source:Version}),
106106 unity8-private (= ${binary:Version}),
107107 unity8-private | unity-launcher-impl,
@@ -189,7 +189,7 @@ Depends: accountsservice-ubuntu-schemas (>= 0.0.3),
189189 ${misc:Depends},
190190 ${shlibs:Depends},
191191Provides: unity-launcher-impl,
192− unity-launcher-impl-8,
192+ unity-launcher-impl-4,
193193Description: Unity 8 private libs
194194 The Unity 8 shell is the primary user interface for Ubuntu devices.
195195 .
plugins/Greeter/Unity/Launcher/launchermodelas.cpp+7−7
@@ -200,7 +200,7 @@ void LauncherModel::refresh()
200200 Q_FOREACH (LauncherItem* item, m_list) {
201201 bool found = false;
202202 Q_FOREACH(const QVariant &asItem, items) {
203− QMap<QString, QVariant> cachedMap = asItem.toMap();
203+ QVariantMap cachedMap = asItem.toMap();
204204 if (cachedMap.value("id").toString() == item->appId()) {
205205 // Only keep and update it if we either show unpinned or it is pinned
206206 if (!m_onlyPinned || cachedMap.value("pinned").toBool()) {
@@ -213,11 +213,11 @@ void LauncherModel::refresh()
213213 int idx = m_list.indexOf(item);
214214 Q_EMIT dataChanged(index(idx),
215215 index(idx),
216− QVector<int>() << RoleName
217− << RoleIcon
218− << RoleCount
219− << RoleCountVisible
220− << RoleProgress);
216+ {RoleName,
217+ RoleIcon,
218+ RoleCount,
219+ RoleCountVisible,
220+ RoleProgress});
221221 }
222222 break;
223223 }
@@ -255,7 +255,7 @@ void LauncherModel::refresh()
255255 }
256256
257257 if (itemIndex == -1) {
258− QMap<QString, QVariant> chachedMap = entry.toMap();
258+ QVariantMap chachedMap = entry.toMap();
259259 // Need to add it. Just add it into the addedIndex to keep same ordering as the list in AS.
260260 LauncherItem *item = new LauncherItem(chachedMap.value("id").toString(),
261261 chachedMap.value("name").toString(),
plugins/Unity/Launcher/dbusinterface.cpp+1
@@ -66,6 +66,7 @@ QString DBusInterface::introspect(const QString &path) const
6666 "<interface name=\"com.canonical.Unity.Launcher.Item\">"
6767 "<property name=\"count\" type=\"i\" access=\"readwrite\" />"
6868 "<property name=\"countVisible\" type=\"b\" access=\"readwrite\" />"
69+ "<property name=\"progress\" type=\"i\" access=\"readwrite\" />"
6970 "</interface>";
7071 return nodeiface;
7172}