on xenial help sign in
Needed to update the greeter-related plugin to reflect the tweak to LauncherModel::alert()
b3b0c24Mirco Müller
plugins/Greeter/Unity/Launcher/launchermodelas.cpp+7
@@ -72,6 +72,13 @@ QVariant LauncherModel::data(const QModelIndex &index, int role) const
72 return QVariant();
72 return QVariant();
73}
73}
74
74
75+void LauncherModel::alert(const QString &appId, bool alerting)
76+{
77+ Q_UNUSED(appId)
78+ Q_UNUSED(alerting)
79+ qWarning() << "This is a read only implementation. Cannot set alert-state of items.";
80+}
81+
75unity::shell::launcher::LauncherItemInterface *LauncherModel::get(int index) const
82unity::shell::launcher::LauncherItemInterface *LauncherModel::get(int index) const
76{
83{
77 if (index < 0 || index >= m_list.count()) {
84 if (index < 0 || index >= m_list.count()) {
plugins/Greeter/Unity/Launcher/launchermodelas.h+1
@@ -41,6 +41,7 @@ public:
41
41
42 QVariant data(const QModelIndex &index, int role) const override;
42 QVariant data(const QModelIndex &index, int role) const override;
43
43
44+ Q_INVOKABLE void alert(const QString &appId, bool alerting) override;
44 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
45 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
45 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
46 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
46 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
47 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
plugins/Unity/Launcher/launchermodel.h+1−1
@@ -45,7 +45,7 @@ public:
45
45
46 QVariant data(const QModelIndex &index, int role) const override;
46 QVariant data(const QModelIndex &index, int role) const override;
47
47
48− Q_INVOKABLE void alert(const QString &appId, bool alerting);
48+ Q_INVOKABLE void alert(const QString &appId, bool alerting) override;
49 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
49 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
50 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
50 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
51 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
51 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1
@@ -38,7 +38,7 @@ public:
38
38
39 QVariant data(const QModelIndex& index, int role) const override;
39 QVariant data(const QModelIndex& index, int role) const override;
40
40
41− Q_INVOKABLE void alert(const QString &appId, bool alerting);
41+ Q_INVOKABLE void alert(const QString &appId, bool alerting) override;
42 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const override;
42 Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const override;
43 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
43 Q_INVOKABLE void move(int oldIndex, int newIndex) override;
44 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
44 Q_INVOKABLE void pin(const QString &appId, int index = -1) override;