on xenial help sign in
properly mark overrides
5689754Michael Zanetti
plugins/Unity/Launcher/launcheritem.h+11−15
@@ -34,18 +34,18 @@ class LauncherItem: public LauncherItemInterface
34public:
34public:
35 LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
35 LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
36
36
37− QString appId() const;
37+ QString appId() const override;
38− QString name() const;
38+ QString name() const override;
39− QString icon() const;
39+ QString icon() const override;
40− bool pinned() const;
40+ bool pinned() const override;
41− bool running() const;
41+ bool running() const override;
42− bool recent() const;
42+ bool recent() const override;
43− int progress() const;
43+ int progress() const override;
44− int count() const;
44+ int count() const override;
45− bool countVisible() const;
45+ bool countVisible() const override;
46− bool focused() const;
46+ bool focused() const override;
47
47
48− unity::shell::launcher::QuickListModelInterface *quickList() const;
48+ unity::shell::launcher::QuickListModelInterface *quickList() const override;
49
49
50private:
50private:
51 void setName(const QString &name);
51 void setName(const QString &name);
@@ -58,10 +58,6 @@ private:
58 void setCountVisible(bool countVisible);
58 void setCountVisible(bool countVisible);
59 void setFocused(bool focused);
59 void setFocused(bool focused);
60
60
61−Q_SIGNALS:
62− void favoriteChanged(bool favorite);
63− void runningChanged(bool running);
64−
65private:
61private:
66 QString m_appId;
62 QString m_appId;
67 QString m_name;
63 QString m_name;
tests/mocks/Unity/Launcher/MockLauncherItem.h+16−19
@@ -32,35 +32,30 @@ class MockLauncherItem: public LauncherItemInterface
32public:
32public:
33 MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent = 0);
33 MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent = 0);
34
34
35− QString appId() const;
35+ QString appId() const override;
36 QString desktopFile() const;
36 QString desktopFile() const;
37− QString name() const;
37+ QString name() const override;
38− QString icon() const;
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;
39
47
40− bool pinned() const;
48+ unity::shell::launcher::QuickListModelInterface *quickList() const;
41− void setPinned(bool pinned);
42
49
43− bool running() const;
50+private:
51+ void setPinned(bool pinned);
44 void setRunning(bool running);
52 void setRunning(bool running);
45−
46− bool recent() const;
47 void setRecent(bool recent);
53 void setRecent(bool recent);
48−
49− int progress() const;
50 void setProgress(int progress);
54 void setProgress(int progress);
51−
52− int count() const;
53 void setCount(int count);
55 void setCount(int count);
54−
55− bool countVisible() const;
56 void setCountVisible(bool countVisible);
56 void setCountVisible(bool countVisible);
57−
58− bool focused() const;
59 void setFocused(bool focused);
57 void setFocused(bool focused);
60
58
61− unity::shell::launcher::QuickListModelInterface *quickList() const;
62−
63−private:
64 QString m_appId;
59 QString m_appId;
65 QString m_desktopFile;
60 QString m_desktopFile;
66 QString m_name;
61 QString m_name;
@@ -73,6 +68,8 @@ private:
73 bool m_countVisible;
68 bool m_countVisible;
74 bool m_focused;
69 bool m_focused;
75 MockQuickListModel *m_quickList;
70 MockQuickListModel *m_quickList;
71+
72+ friend class MockLauncherModel;
76};
73};
77
74
78#endif // MOCKLAUNCHERITEM_H
75#endif // MOCKLAUNCHERITEM_H