on xenial help sign in
properly mark overrides
commit56897546e90fa48e0b520e58b5e630353289745c authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 2 Sep 2014, 20:22 (12 years ago) parent5b1d936
2 files changed+27−34
plugins/Unity/Launcher/launcheritem.h+11−15 tests/mocks/Unity/Launcher/MockLauncherItem.h+16−19
plugins/Unity/Launcher/launcheritem.h+11−15
@@ -34,18 +34,18 @@ class LauncherItem: public LauncherItemInterface
3434public:
3535 LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
3636
37− QString appId() const;
38− QString name() const;
39− QString icon() const;
40− bool pinned() const;
41− bool running() const;
42− bool recent() const;
43− int progress() const;
44− int count() const;
45− bool countVisible() const;
46− bool focused() const;
37+ QString appId() const override;
38+ QString name() const override;
39+ QString icon() const override;
40+ bool pinned() const override;
41+ bool running() const override;
42+ bool recent() const override;
43+ int progress() const override;
44+ int count() const override;
45+ bool countVisible() const override;
46+ bool focused() const override;
4747
48− unity::shell::launcher::QuickListModelInterface *quickList() const;
48+ unity::shell::launcher::QuickListModelInterface *quickList() const override;
4949
5050private:
5151 void setName(const QString &name);
@@ -58,10 +58,6 @@ private:
5858 void setCountVisible(bool countVisible);
5959 void setFocused(bool focused);
6060
61−Q_SIGNALS:
62− void favoriteChanged(bool favorite);
63− void runningChanged(bool running);
64−
6561private:
6662 QString m_appId;
6763 QString m_name;
tests/mocks/Unity/Launcher/MockLauncherItem.h+16−19
@@ -32,35 +32,30 @@ class MockLauncherItem: public LauncherItemInterface
3232public:
3333 MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent = 0);
3434
35− QString appId() const;
35+ QString appId() const override;
3636 QString desktopFile() const;
37− QString name() const;
38− QString icon() const;
37+ QString name() const override;
38+ QString icon() const override;
39+
40+ bool pinned() const override;
41+ bool running() const override;
42+ bool recent() const override;
43+ int progress() const override;
44+ int count() const override;
45+ bool countVisible() const override;
46+ bool focused() const;
3947
40− bool pinned() const;
41− void setPinned(bool pinned);
48+ unity::shell::launcher::QuickListModelInterface *quickList() const;
4249
43− bool running() const;
50+private:
51+ void setPinned(bool pinned);
4452 void setRunning(bool running);
45−
46− bool recent() const;
4753 void setRecent(bool recent);
48−
49− int progress() const;
5054 void setProgress(int progress);
51−
52− int count() const;
5355 void setCount(int count);
54−
55− bool countVisible() const;
5656 void setCountVisible(bool countVisible);
57−
58− bool focused() const;
5957 void setFocused(bool focused);
6058
61− unity::shell::launcher::QuickListModelInterface *quickList() const;
62−
63−private:
6459 QString m_appId;
6560 QString m_desktopFile;
6661 QString m_name;
@@ -73,6 +68,8 @@ private:
7368 bool m_countVisible;
7469 bool m_focused;
7570 MockQuickListModel *m_quickList;
71+
72+ friend class MockLauncherModel;
7673};
7774
7875#endif // MOCKLAUNCHERITEM_H