on xenial help sign in
Add override to override functions
e6583acAlbert Astals Cid
plugins/AccountsService/plugin.h+1−1
@@ -28,7 +28,7 @@ class AccountsServicePlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
plugins/Dash/plugin.h+1−1
@@ -27,7 +27,7 @@ class DashPlugin : public QQmlExtensionPlugin
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28
28
29public:
29public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
31};
31};
32
32
33#endif
33#endif
plugins/Greeter/Unity/Launcher/launchermodelas.h+9−9
@@ -37,19 +37,19 @@ public:
37 LauncherModel(QObject *parent = 0);
37 LauncherModel(QObject *parent = 0);
38 ~LauncherModel();
38 ~LauncherModel();
39
39
40− int rowCount(const QModelIndex &parent = QModelIndex()) const;
40+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
41
41
42− QVariant data(const QModelIndex &index, int role) const;
42+ QVariant data(const QModelIndex &index, int role) const override;
43
43
44− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const;
44+ Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
45− Q_INVOKABLE void move(int oldIndex, int newIndex);
45+ Q_INVOKABLE void move(int oldIndex, int newIndex) override;
46− Q_INVOKABLE void pin(const QString &appId, int index = -1);
46+ Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
47− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
47+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
48− Q_INVOKABLE void setUser(const QString &username);
48+ Q_INVOKABLE void setUser(const QString &username) override;
49 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
49 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
50
50
51− unity::shell::application::ApplicationManagerInterface* applicationManager() const;
51+ unity::shell::application::ApplicationManagerInterface* applicationManager() const override;
52− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager);
52+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager) override;
53
53
54 bool onlyPinned() const override;
54 bool onlyPinned() const override;
55 void setOnlyPinned(bool onlyPinned) override;
55 void setOnlyPinned(bool onlyPinned) override;
plugins/Greeter/Unity/Launcher/plugin.h+1−1
@@ -26,7 +26,7 @@ class UnityLauncherPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif
32#endif
plugins/Greeter/Unity/Launcher/quicklistmodel.h+2−2
@@ -45,8 +45,8 @@ public:
45
45
46 QuickListEntry get(int index) const;
46 QuickListEntry get(int index) const;
47
47
48− int rowCount(const QModelIndex &parent = QModelIndex()) const;
48+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
49− QVariant data(const QModelIndex &index, int role) const;
49+ QVariant data(const QModelIndex &index, int role) const override;
50
50
51private:
51private:
52 QList<QuickListEntry> m_list;
52 QList<QuickListEntry> m_list;
plugins/LightDM/UsersModel.cpp+1−1
@@ -32,7 +32,7 @@ class MangleModel : public QSortFilterProxyModel
32public:
32public:
33 explicit MangleModel(QObject* parent=0);
33 explicit MangleModel(QObject* parent=0);
34
34
35− virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
35+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
36};
36};
37
37
38MangleModel::MangleModel(QObject* parent)
38MangleModel::MangleModel(QObject* parent)
plugins/LightDM/liblightdm/UsersModel.h+2−2
@@ -53,8 +53,8 @@ public:
53 BackgroundPathRole
53 BackgroundPathRole
54 };
54 };
55
55
56− int rowCount(const QModelIndex &parent) const;
56+ int rowCount(const QModelIndex &parent) const override;
57− QVariant data(const QModelIndex &index, int role) const;
57+ QVariant data(const QModelIndex &index, int role) const override;
58
58
59private:
59private:
60 UsersModelPrivate * const d_ptr;
60 UsersModelPrivate * const d_ptr;
plugins/LightDM/plugin.h+1−1
@@ -29,7 +29,7 @@ class LightDMPlugin : public QQmlExtensionPlugin
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
30
30
31public:
31public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
33};
33};
34
34
35#endif
35#endif
plugins/Lights/plugin.h+1−1
@@ -28,7 +28,7 @@ class LightsPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
plugins/Powerd/plugin.h+1−1
@@ -29,7 +29,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
30
30
31public:
31public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
33};
33};
34
34
35#endif
35#endif
plugins/ScreenGrabber/plugin.h+1−1
@@ -27,7 +27,7 @@ class ScreenGrabberPlugin : public QQmlExtensionPlugin
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28
28
29public:
29public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
31};
31};
32
32
33#endif // SCREENGRABBER_PLUGIN_H
33#endif // SCREENGRABBER_PLUGIN_H
plugins/SessionBroadcast/plugin.h+1−1
@@ -27,7 +27,7 @@ class SessionBroadcastPlugin : public QQmlExtensionPlugin
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28
28
29public:
29public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
31};
31};
32
32
33#endif
33#endif
plugins/Ubuntu/DownloadDaemonListener/plugin.h+2−2
@@ -31,7 +31,7 @@ class BackendPlugin : public QQmlExtensionPlugin
31 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
31 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
32
32
33public:
33public:
34− void registerTypes(const char *uri);
34+ void registerTypes(const char *uri) override;
35− void initializeEngine(QQmlEngine *engine, const char *uri);
35+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
36};
36};
37#endif // BACKEND_PLUGIN_H
37#endif // BACKEND_PLUGIN_H
plugins/Ubuntu/Gestures/DirectionalDragArea.h+1−1
@@ -214,7 +214,7 @@ Q_SIGNALS:
214 void tapped();
214 void tapped();
215
215
216protected:
216protected:
217− virtual void touchEvent(QTouchEvent *event);
217+ void touchEvent(QTouchEvent *event) override;
218
218
219private Q_SLOTS:
219private Q_SLOTS:
220 void checkSpeed();
220 void checkSpeed();
plugins/Ubuntu/Gestures/plugin.h+1−1
@@ -24,7 +24,7 @@ class UbuntuGesturesQmlPlugin : public QQmlExtensionPlugin
24 Q_OBJECT
24 Q_OBJECT
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26public:
26public:
27− void registerTypes(const char *uri);
27+ void registerTypes(const char *uri) override;
28};
28};
29
29
30
30
plugins/Ubuntu/Payments/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // PAYMENTS_PLUGIN_H
31#endif // PAYMENTS_PLUGIN_H
plugins/Ubuntu/SystemImage/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // SYSTEMIMAGE_PLUGIN_H
31#endif // SYSTEMIMAGE_PLUGIN_H
plugins/Unity/Connectivity/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // CONNECTIVITY_PLUGIN_H
31#endif // CONNECTIVITY_PLUGIN_H
plugins/Unity/DashCommunicator/plugin.h+1−1
@@ -28,7 +28,7 @@ class DashCommunicatorPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
plugins/Unity/Indicators/indicatorsmodel.h+5−5
@@ -50,11 +50,11 @@ public:
50 void setProfile(const QString& profile);
50 void setProfile(const QString& profile);
51
51
52 /* QAbstractItemModel */
52 /* QAbstractItemModel */
53− QHash<int, QByteArray> roleNames() const;
53+ QHash<int, QByteArray> roleNames() const override;
54− int columnCount(const QModelIndex &parent = QModelIndex()) const;
54+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
55− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
55+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
56− QModelIndex parent (const QModelIndex &index) const;
56+ QModelIndex parent (const QModelIndex &index) const override;
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
58
58
59
59
60Q_SIGNALS:
60Q_SIGNALS:
plugins/Unity/Indicators/menucontentactivator.cpp+4−4
@@ -28,10 +28,10 @@ public:
28 connect(&m_timer, &QTimer::timeout,
28 connect(&m_timer, &QTimer::timeout,
29 this, &UnityIndicators::AbstractTimer::timeout);
29 this, &UnityIndicators::AbstractTimer::timeout);
30 }
30 }
31− virtual int interval() const { return m_timer.interval(); }
31+ int interval() const override { return m_timer.interval(); }
32− virtual void setInterval(int msecs) { m_timer.setInterval(msecs); }
32+ void setInterval(int msecs) override { m_timer.setInterval(msecs); }
33− virtual void start() { m_timer.start(); UnityIndicators::AbstractTimer::start(); }
33+ void start() override { m_timer.start(); UnityIndicators::AbstractTimer::start(); }
34− virtual void stop() { m_timer.stop(); UnityIndicators::AbstractTimer::stop(); }
34+ void stop() override { m_timer.stop(); UnityIndicators::AbstractTimer::stop(); }
35private:
35private:
36 QTimer m_timer;
36 QTimer m_timer;
37};
37};
plugins/Unity/Indicators/plugin.h+1−1
@@ -27,7 +27,7 @@ class IndicatorsPlugin : public QQmlExtensionPlugin
27 Q_OBJECT
27 Q_OBJECT
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29public:
29public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
31};
31};
32
32
33#endif // INDICATORS2_PLUGIN_H
33#endif // INDICATORS2_PLUGIN_H
plugins/Unity/Launcher/launchermodel.h+10−10
@@ -41,19 +41,19 @@ public:
41 LauncherModel(QObject *parent = 0);
41 LauncherModel(QObject *parent = 0);
42 ~LauncherModel();
42 ~LauncherModel();
43
43
44− int rowCount(const QModelIndex &parent = QModelIndex()) const;
44+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
45
45
46− QVariant data(const QModelIndex &index, int role) const;
46+ QVariant data(const QModelIndex &index, int role) const override;
47
47
48− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const;
48+ Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
49− Q_INVOKABLE void move(int oldIndex, int newIndex);
49+ Q_INVOKABLE void move(int oldIndex, int newIndex) override;
50− Q_INVOKABLE void pin(const QString &appId, int index = -1);
50+ Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
51− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
51+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
52− Q_INVOKABLE void setUser(const QString &username);
52+ Q_INVOKABLE void setUser(const QString &username) override;
53 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
53 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
54
54
55− unity::shell::application::ApplicationManagerInterface* applicationManager() const;
55+ unity::shell::application::ApplicationManagerInterface* applicationManager() const override;
56− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager);
56+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager) override;
57
57
58 bool onlyPinned() const override;
58 bool onlyPinned() const override;
59 void setOnlyPinned(bool onlyPinned) override;
59 void setOnlyPinned(bool onlyPinned) override;
@@ -61,7 +61,7 @@ public:
61 int findApplication(const QString &appId);
61 int findApplication(const QString &appId);
62
62
63public Q_SLOTS:
63public Q_SLOTS:
64− void requestRemove(const QString &appId);
64+ void requestRemove(const QString &appId) override;
65 Q_INVOKABLE void refresh();
65 Q_INVOKABLE void refresh();
66
66
67private:
67private:
plugins/Unity/Launcher/plugin.h+1−1
@@ -28,7 +28,7 @@ class UnityLauncherPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
plugins/Unity/Launcher/quicklistmodel.h+2−2
@@ -48,8 +48,8 @@ public:
48
48
49 QuickListEntry get(int index) const;
49 QuickListEntry get(int index) const;
50
50
51− int rowCount(const QModelIndex &parent = QModelIndex()) const;
51+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
52− QVariant data(const QModelIndex &index, int role) const;
52+ QVariant data(const QModelIndex &index, int role) const override;
53
53
54private:
54private:
55 QList<QuickListEntry> m_list;
55 QList<QuickListEntry> m_list;
plugins/Unity/Session/plugin.h+1−1
@@ -28,7 +28,7 @@ class SessionPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
plugins/Utils/HomeKeyWatcher.h+1−1
@@ -49,7 +49,7 @@ public:
49
49
50 virtual ~HomeKeyWatcher();
50 virtual ~HomeKeyWatcher();
51
51
52− bool eventFilter(QObject *watched, QEvent *event);
52+ bool eventFilter(QObject *watched, QEvent *event) override;
53
53
54 void update(QEvent *event);
54 void update(QEvent *event);
55
55
plugins/Utils/plugin.h+2−2
@@ -28,8 +28,8 @@ class UtilsPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32− void initializeEngine(QQmlEngine *engine, const char *uri);
32+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
33};
33};
34
34
35#endif
35#endif
plugins/Utils/qlimitproxymodelqml.h+2−2
@@ -32,8 +32,8 @@ public:
32
32
33 /* getters */
33 /* getters */
34 int limit() const;
34 int limit() const;
35− int rowCount(const QModelIndex &parent = QModelIndex()) const;
35+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
36− QHash<int, QByteArray> roleNames() const;
36+ QHash<int, QByteArray> roleNames() const override;
37
37
38 /* setters */
38 /* setters */
39 void setModel(QAbstractItemModel *model);
39 void setModel(QAbstractItemModel *model);
plugins/Utils/qvariantlistmodel.h+6−6
@@ -54,14 +54,14 @@ public:
54
54
55 ~QVariantListModel();
55 ~QVariantListModel();
56
56
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
58− QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
58+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
59
59
60− QVariant data(const QModelIndex &index, int role) const;
60+ QVariant data(const QModelIndex &index, int role) const override;
61− bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
61+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
62
62
63− bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
63+ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
64− bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
64+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
65
65
66 QVariantList variantList() const;
66 QVariantList variantList() const;
67 void setVariantList(const QVariantList &list);
67 void setVariantList(const QVariantList &list);
plugins/Utils/timeformatter.h+1−1
@@ -62,7 +62,7 @@ public:
62 GDateTimeFormatter(QObject *parent = 0);
62 GDateTimeFormatter(QObject *parent = 0);
63
63
64protected:
64protected:
65− virtual QString formatTime() const;
65+ QString formatTime() const override;
66};
66};
67
67
68#endif
68#endif
plugins/Utils/unitysortfilterproxymodelqml.h+2−2
@@ -36,12 +36,12 @@ public:
36 Q_INVOKABLE int count();
36 Q_INVOKABLE int count();
37 Q_INVOKABLE int findFirst(int role, const QVariant& value) const;
37 Q_INVOKABLE int findFirst(int role, const QVariant& value) const;
38 Q_INVOKABLE int mapRowToSource(int row);
38 Q_INVOKABLE int mapRowToSource(int row);
39− virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
39+ bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
40
40
41 /* getters */
41 /* getters */
42 int totalCount() const;
42 int totalCount() const;
43 bool invertMatch() const;
43 bool invertMatch() const;
44− QHash<int, QByteArray> roleNames() const;
44+ QHash<int, QByteArray> roleNames() const override;
45
45
46 /* setters */
46 /* setters */
47 void setModel(QAbstractItemModel *model);
47 void setModel(QAbstractItemModel *model);
plugins/Utils/windowkeysfilter.h+1−1
@@ -39,7 +39,7 @@ class WindowKeysFilter : public QQuickItem
39public:
39public:
40 WindowKeysFilter(QQuickItem *parent = 0);
40 WindowKeysFilter(QQuickItem *parent = 0);
41
41
42− bool eventFilter(QObject *watched, QEvent *event);
42+ bool eventFilter(QObject *watched, QEvent *event) override;
43
43
44private Q_SLOTS:
44private Q_SLOTS:
45 void setupFilterOnWindow(QQuickWindow *window);
45 void setupFilterOnWindow(QQuickWindow *window);
plugins/Wizard/plugin.h+1−1
@@ -26,7 +26,7 @@ class WizardPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif
32#endif
tests/mocks/AccountsService/plugin.h+1−1
@@ -29,7 +29,7 @@ class AccountsServicePlugin : public QQmlExtensionPlugin
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
30
30
31public:
31public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
33};
33};
34
34
35#endif
35#endif
tests/mocks/GSettings.1.0/plugin.h+1−1
@@ -25,7 +25,7 @@ class FakeGSettingsQmlPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // PLUGIN_H
31#endif // PLUGIN_H
tests/mocks/LightDM/liblightdm/UsersModel.h+2−2
@@ -53,8 +53,8 @@ public:
53 BackgroundPathRole
53 BackgroundPathRole
54 };
54 };
55
55
56− int rowCount(const QModelIndex &parent) const;
56+ int rowCount(const QModelIndex &parent) const override;
57− QVariant data(const QModelIndex &index, int role) const;
57+ QVariant data(const QModelIndex &index, int role) const override;
58
58
59 QString mockMode() const;
59 QString mockMode() const;
60 void setMockMode(QString mockMode);
60 void setMockMode(QString mockMode);
tests/mocks/LightDM/plugin.h+1−1
@@ -26,7 +26,7 @@ class LightDMPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif
32#endif
tests/mocks/Lights/plugin.h+1−1
@@ -26,7 +26,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif
32#endif
tests/mocks/MeeGo/QOfono/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // MOCK_QOFONO_PLUGIN_H
31#endif // MOCK_QOFONO_PLUGIN_H
tests/mocks/Powerd/plugin.h+1−1
@@ -28,7 +28,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
tests/mocks/QMenuModel/plugin.h+1−1
@@ -28,7 +28,7 @@ class QMenuModelPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
tests/mocks/QMenuModel/unitymenumodel.h+6−6
@@ -61,12 +61,12 @@ public:
61
61
62 QString nameOwner() const;
62 QString nameOwner() const;
63
63
64− int rowCount(const QModelIndex &parent = QModelIndex()) const;
64+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
65− int columnCount(const QModelIndex &parent = QModelIndex()) const;
65+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
66− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
66+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
67− QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
67+ QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const override;
68− QModelIndex parent(const QModelIndex &index) const;
68+ QModelIndex parent(const QModelIndex &index) const override;
69− QHash<int, QByteArray> roleNames() const;
69+ QHash<int, QByteArray> roleNames() const override;
70
70
71 Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = nullptr);
71 Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = nullptr);
72 Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema);
72 Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema);
tests/mocks/QtMultimedia/plugin.h+1−1
@@ -28,7 +28,7 @@ class MockQtMultimediaPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
tests/mocks/Ubuntu/Connectivity/plugin.h+2−2
@@ -28,8 +28,8 @@ class QmlConnectivityNetworkingPlugin : public QQmlExtensionPlugin {
28 Q_INTERFACES(QQmlExtensionInterface)
28 Q_INTERFACES(QQmlExtensionInterface)
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32− void initializeEngine(QQmlEngine *engine, const char *uri);
32+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
33};
33};
34
34
35#endif // QML_CONNECTIVITY_PLUGIN_H
35#endif // QML_CONNECTIVITY_PLUGIN_H
tests/mocks/Ubuntu/DownloadDaemonListener/plugin.h+1−1
@@ -24,7 +24,7 @@ class FakeUbuntuDownloadDaemonListenerQmlPlugin : public QQmlExtensionPlugin
24 Q_OBJECT
24 Q_OBJECT
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26public:
26public:
27− void registerTypes(const char *uri);
27+ void registerTypes(const char *uri) override;
28};
28};
29
29
30#endif
30#endif
tests/mocks/Ubuntu/Payments/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // PAYMENTS_PLUGIN_H
31#endif // PAYMENTS_PLUGIN_H
tests/mocks/Ubuntu/SystemImage/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // MOCK_SYSTEMIMAGE_PLUGIN_H
31#endif // MOCK_SYSTEMIMAGE_PLUGIN_H
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // MOCK_SECURITYPRIVACY_PLUGIN_H
31#endif // MOCK_SECURITYPRIVACY_PLUGIN_H
tests/mocks/Ubuntu/Telephony/MockCallEntry.h+1−1
@@ -53,7 +53,7 @@ Q_SIGNALS:
53 void elapsedTimerRunningChanged();
53 void elapsedTimerRunningChanged();
54
54
55protected:
55protected:
56− void timerEvent(QTimerEvent * event);
56+ void timerEvent(QTimerEvent * event) override;
57
57
58private:
58private:
59 QString m_phoneNumber;
59 QString m_phoneNumber;
tests/mocks/Ubuntu/Telephony/plugin.h+2−2
@@ -27,8 +27,8 @@ class FakeUbuntuTelephonyQmlPlugin : public QQmlExtensionPlugin
27 Q_OBJECT
27 Q_OBJECT
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29public:
29public:
30− void initializeEngine(QQmlEngine *engine, const char *uri);
30+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32
32
33private:
33private:
34 QQmlContext *mRootContext;
34 QQmlContext *mRootContext;
tests/mocks/Unity/Application/ObjectListModel.h+1−1
@@ -76,7 +76,7 @@ public:
76 return QVariant();
76 return QVariant();
77 }
77 }
78
78
79− QHash<int, QByteArray> roleNames() const
79+ QHash<int, QByteArray> roleNames() const override
80 {
80 {
81 QHash<int, QByteArray> roleNames;
81 QHash<int, QByteArray> roleNames;
82 roleNames.insert(RoleModelData, "modelData");
82 roleNames.insert(RoleModelData, "modelData");
tests/mocks/Unity/Application/plugin.h+2−2
@@ -24,8 +24,8 @@ class FakeUnityApplicationQmlPlugin : public QQmlExtensionPlugin
24 Q_OBJECT
24 Q_OBJECT
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26public:
26public:
27− void registerTypes(const char *uri);
27+ void registerTypes(const char *uri) override;
28− void initializeEngine(QQmlEngine *engine, const char *uri);
28+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
29};
29};
30
30
31#endif
31#endif
tests/mocks/Unity/Connectivity/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
25 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26
26
27public:
27public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
29};
29};
30
30
31#endif // MOCK_CONNECTIVITY_PLUGIN_H
31#endif // MOCK_CONNECTIVITY_PLUGIN_H
tests/mocks/Unity/DashCommunicator/plugin.h+1−1
@@ -28,7 +28,7 @@ class DashCommunicatorPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
tests/mocks/Unity/Indicators/fakeindicatorsmodel.h+5−5
@@ -50,11 +50,11 @@ public:
50 QVariant modelData() const { return m_modelData; }
50 QVariant modelData() const { return m_modelData; }
51
51
52 /* QAbstractItemModel */
52 /* QAbstractItemModel */
53− QHash<int, QByteArray> roleNames() const;
53+ QHash<int, QByteArray> roleNames() const override;
54− int columnCount(const QModelIndex &parent = QModelIndex()) const;
54+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
55− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
55+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
56− QModelIndex parent (const QModelIndex &index) const;
56+ QModelIndex parent (const QModelIndex &index) const override;
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
58
58
59Q_SIGNALS:
59Q_SIGNALS:
60 void countChanged();
60 void countChanged();
tests/mocks/Unity/Indicators/fakeplugin.h+1−1
@@ -26,7 +26,7 @@ class IndicatorsFakePlugin : public QQmlExtensionPlugin
26 Q_OBJECT
26 Q_OBJECT
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif // INDICATORS_FAKE_PLUGIN_H
32#endif // INDICATORS_FAKE_PLUGIN_H
tests/mocks/Unity/Launcher/MockLauncherItem.h+2−2
@@ -43,9 +43,9 @@ public:
43 int progress() const override;
43 int progress() const override;
44 int count() const override;
44 int count() const override;
45 bool countVisible() const override;
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 setPinned(bool pinned);
51 void setPinned(bool pinned);
tests/mocks/Unity/Launcher/MockLauncherModel.h+10−10
@@ -34,20 +34,20 @@ public:
34 MockLauncherModel(QObject* parent = 0);
34 MockLauncherModel(QObject* parent = 0);
35 ~MockLauncherModel();
35 ~MockLauncherModel();
36
36
37− int rowCount(const QModelIndex& parent) const;
37+ int rowCount(const QModelIndex& parent) const override;
38
38
39− QVariant data(const QModelIndex& index, int role) const;
39+ QVariant data(const QModelIndex& index, int role) const override;
40
40
41− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const;
41+ Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const override;
42− Q_INVOKABLE void move(int oldIndex, int newIndex);
42+ Q_INVOKABLE void move(int oldIndex, int newIndex) override;
43− Q_INVOKABLE void pin(const QString &appId, int index = -1);
43+ Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
44− Q_INVOKABLE void requestRemove(const QString &appId);
44+ Q_INVOKABLE void requestRemove(const QString &appId) override;
45− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
45+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
46− Q_INVOKABLE void setUser(const QString &username);
46+ Q_INVOKABLE void setUser(const QString &username) override;
47 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
47 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
48
48
49− unity::shell::application::ApplicationManagerInterface *applicationManager() const;
49+ unity::shell::application::ApplicationManagerInterface *applicationManager() const override;
50− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager);
50+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager) override;
51
51
52 bool onlyPinned() const override;
52 bool onlyPinned() const override;
53 void setOnlyPinned(bool onlyPinned) override;
53 void setOnlyPinned(bool onlyPinned) override;
tests/mocks/Unity/Launcher/MockQuickListModel.h+2−2
@@ -30,9 +30,9 @@ class MockQuickListModel: public QuickListModelInterface
30public:
30public:
31 MockQuickListModel(QObject *parent = 0);
31 MockQuickListModel(QObject *parent = 0);
32
32
33− QVariant data(const QModelIndex &index, int role) const;
33+ QVariant data(const QModelIndex &index, int role) const override;
34
34
35− int rowCount(const QModelIndex &parent = QModelIndex()) const;
35+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
36};
36};
37
37
38#endif // MOCKQUICKLISTMODEL_H
38#endif // MOCKQUICKLISTMODEL_H
tests/mocks/Unity/Launcher/plugin.h+1−1
@@ -29,7 +29,7 @@ class TestLauncherPlugin : public QQmlExtensionPlugin
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
30
30
31public:
31public:
32− void registerTypes(const char* uri);
32+ void registerTypes(const char* uri) override;
33};
33};
34
34
35#endif // TESTLAUNCHER_PLUGIN_H
35#endif // TESTLAUNCHER_PLUGIN_H
tests/mocks/Unity/Notifications/MockActionModel.h+3−3
@@ -32,9 +32,9 @@ public:
32 ActionModel(QObject *parent=nullptr);
32 ActionModel(QObject *parent=nullptr);
33 virtual ~ActionModel();
33 virtual ~ActionModel();
34
34
35− virtual int rowCount(const QModelIndex &index) const;
35+ int rowCount(const QModelIndex &index) const override;
36− virtual QVariant data(const QModelIndex &index, int role) const;
36+ QVariant data(const QModelIndex &index, int role) const override;
37− virtual QHash<int, QByteArray> roleNames() const;
37+ QHash<int, QByteArray> roleNames() const override;
38
38
39 Q_ENUMS(ActionsRoles)
39 Q_ENUMS(ActionsRoles)
40 enum ActionsRoles {
40 enum ActionsRoles {
tests/mocks/Unity/Notifications/MockNotificationModel.h+3−3
@@ -35,9 +35,9 @@ public:
35 MockNotificationModel(QObject *parent=nullptr);
35 MockNotificationModel(QObject *parent=nullptr);
36 virtual ~MockNotificationModel();
36 virtual ~MockNotificationModel();
37
37
38− virtual int rowCount(const QModelIndex &parent) const;
38+ int rowCount(const QModelIndex &parent) const override;
39− virtual QVariant data(const QModelIndex &index, int role) const;
39+ QVariant data(const QModelIndex &index, int role) const override;
40− virtual QHash<int, QByteArray> roleNames() const;
40+ QHash<int, QByteArray> roleNames() const override;
41
41
42 Q_INVOKABLE void append(MockNotification* n);
42 Q_INVOKABLE void append(MockNotification* n);
43 MockNotification* getNotification(int id) const;
43 MockNotification* getNotification(int id) const;
tests/mocks/Unity/Notifications/plugin.h+1−1
@@ -28,7 +28,7 @@ class TestNotificationPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char* uri);
31+ void registerTypes(const char* uri) override;
32};
32};
33
33
34#endif // TESTNOTIFICATION_PLUGIN_H
34#endif // TESTNOTIFICATION_PLUGIN_H
tests/mocks/Unity/fake_scopes.h+2−2
@@ -50,8 +50,8 @@ public:
50 Q_INVOKABLE void clearFavorites();
50 Q_INVOKABLE void clearFavorites();
51 Q_INVOKABLE void load();
51 Q_INVOKABLE void load();
52
52
53− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
53+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
54− QModelIndex parent ( const QModelIndex & index ) const;
54+ QModelIndex parent ( const QModelIndex & index ) const override;
55
55
56 bool loaded() const override;
56 bool loaded() const override;
57 int count() const override;
57 int count() const override;
tests/mocks/Unity/fake_unity_plugin.h+1−1
@@ -28,7 +28,7 @@ class FakeUnityPlugin : public QQmlExtensionPlugin
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
29
30public:
30public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
32};
32};
33
33
34#endif
34#endif
tests/mocks/Wizard/mockplugin.h+1−1
@@ -26,7 +26,7 @@ class MockWizardPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif
32#endif
tests/plugins/Dash/horizontaljournaltest.cpp+3−3
@@ -32,19 +32,19 @@
32
32
33class WidthModel : public QAbstractListModel {
33class WidthModel : public QAbstractListModel {
34public:
34public:
35− QHash<int, QByteArray> roleNames() const
35+ QHash<int, QByteArray> roleNames() const override
36 {
36 {
37 QHash<int, QByteArray> roles;
37 QHash<int, QByteArray> roles;
38 roles.insert(Qt::DisplayRole, "modelWidth");
38 roles.insert(Qt::DisplayRole, "modelWidth");
39 return roles;
39 return roles;
40 }
40 }
41
41
42− int rowCount(const QModelIndex & /*parent*/) const
42+ int rowCount(const QModelIndex & /*parent*/) const override
43 {
43 {
44 return m_list.count();
44 return m_list.count();
45 }
45 }
46
46
47− QVariant data(const QModelIndex &index, int /*role*/) const
47+ QVariant data(const QModelIndex &index, int /*role*/) const override
48 {
48 {
49 return m_list[index.row()];
49 return m_list[index.row()];
50 }
50 }
tests/plugins/Dash/horizontaljournaltry.cpp+1−1
@@ -29,7 +29,7 @@
29class QWidthModela : public QStringListModel {
29class QWidthModela : public QStringListModel {
30 Q_OBJECT
30 Q_OBJECT
31public:
31public:
32− QHash<int, QByteArray> roleNames() const
32+ QHash<int, QByteArray> roleNames() const override
33 {
33 {
34 QHash<int, QByteArray> roles;
34 QHash<int, QByteArray> roles;
35 roles.insert(Qt::DisplayRole, "modelWidth");
35 roles.insert(Qt::DisplayRole, "modelWidth");
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp+3−3
@@ -37,7 +37,7 @@ public:
37 list << "A" << "B" << "C" << "D" << "E" << "F" << "G" << "H";
37 list << "A" << "B" << "C" << "D" << "E" << "F" << "G" << "H";
38 }
38 }
39
39
40− int rowCount(const QModelIndex &parent) const
40+ int rowCount(const QModelIndex &parent) const override
41 {
41 {
42 if (parent.isValid())
42 if (parent.isValid())
43 return 0;
43 return 0;
@@ -45,14 +45,14 @@ public:
45 return list.count();
45 return list.count();
46 }
46 }
47
47
48− QVariant data(const QModelIndex &index, int role) const
48+ QVariant data(const QModelIndex &index, int role) const override
49 {
49 {
50 if (role == Qt::SizeHintRole) return 50;
50 if (role == Qt::SizeHintRole) return 50;
51 else if (role == Qt::DisplayRole) return list[index.row()];
51 else if (role == Qt::DisplayRole) return list[index.row()];
52 return QVariant();
52 return QVariant();
53 }
53 }
54
54
55− QHash<int, QByteArray> roleNames() const
55+ QHash<int, QByteArray> roleNames() const override
56 {
56 {
57 QHash<int, QByteArray> hash;
57 QHash<int, QByteArray> hash;
58 hash.insert(Qt::DisplayRole, "type");
58 hash.insert(Qt::DisplayRole, "type");
tests/plugins/Dash/organicgridtest.cpp+2−2
@@ -34,12 +34,12 @@ class DummyModel : public QAbstractListModel {
34public:
34public:
35 DummyModel() : m_count(0) {}
35 DummyModel() : m_count(0) {}
36
36
37− int rowCount(const QModelIndex & /*parent*/) const
37+ int rowCount(const QModelIndex & /*parent*/) const override
38 {
38 {
39 return m_count;
39 return m_count;
40 }
40 }
41
41
42− QVariant data(const QModelIndex & /*index*/, int /*role*/) const
42+ QVariant data(const QModelIndex & /*index*/, int /*role*/) const override
43 {
43 {
44 return QVariant();
44 return QVariant();
45 }
45 }
tests/plugins/Dash/organicgridtry.cpp+2−2
@@ -31,12 +31,12 @@ class DummyModel : public QAbstractListModel {
31public:
31public:
32 DummyModel() : m_count(0) {}
32 DummyModel() : m_count(0) {}
33
33
34− int rowCount(const QModelIndex & /*parent*/) const
34+ int rowCount(const QModelIndex & /*parent*/) const override
35 {
35 {
36 return m_count;
36 return m_count;
37 }
37 }
38
38
39− QVariant data(const QModelIndex & /*index*/, int /*role*/) const
39+ QVariant data(const QModelIndex & /*index*/, int /*role*/) const override
40 {
40 {
41 return QVariant();
41 return QVariant();
42 }
42 }
tests/plugins/Dash/verticaljournaltest.cpp+3−3
@@ -32,19 +32,19 @@
32
32
33class HeightModel : public QAbstractListModel {
33class HeightModel : public QAbstractListModel {
34public:
34public:
35− QHash<int, QByteArray> roleNames() const
35+ QHash<int, QByteArray> roleNames() const override
36 {
36 {
37 QHash<int, QByteArray> roles;
37 QHash<int, QByteArray> roles;
38 roles.insert(Qt::DisplayRole, "modelHeight");
38 roles.insert(Qt::DisplayRole, "modelHeight");
39 return roles;
39 return roles;
40 }
40 }
41
41
42− int rowCount(const QModelIndex & /*parent*/) const
42+ int rowCount(const QModelIndex & /*parent*/) const override
43 {
43 {
44 return m_list.count();
44 return m_list.count();
45 }
45 }
46
46
47− QVariant data(const QModelIndex &index, int /*role*/) const
47+ QVariant data(const QModelIndex &index, int /*role*/) const override
48 {
48 {
49 return m_list[index.row()];
49 return m_list[index.row()];
50 }
50 }
tests/plugins/Dash/verticaljournaltry.cpp+1−1
@@ -29,7 +29,7 @@
29class QHeightModel : public QStringListModel {
29class QHeightModel : public QStringListModel {
30 Q_OBJECT
30 Q_OBJECT
31public:
31public:
32− QHash<int, QByteArray> roleNames() const
32+ QHash<int, QByteArray> roleNames() const override
33 {
33 {
34 QHash<int, QByteArray> roles;
34 QHash<int, QByteArray> roles;
35 roles.insert(Qt::DisplayRole, "modelHeight");
35 roles.insert(Qt::DisplayRole, "modelHeight");
tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+1−1
@@ -24,7 +24,7 @@ class FakeTimeSource : public UbuntuGestures::TimeSource {
24public:
24public:
25 FakeTimeSource() : m_value(0) {}
25 FakeTimeSource() : m_value(0) {}
26
26
27− virtual qint64 msecsSinceReference() {
27+ qint64 msecsSinceReference() override {
28 return m_value;
28 return m_value;
29 }
29 }
30
30
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+4−4
@@ -47,7 +47,7 @@ public:
47 m_nextTimeoutTime = m_timeSource->msecsSinceReference() + (qint64)interval();
47 m_nextTimeoutTime = m_timeSource->msecsSinceReference() + (qint64)interval();
48 }
48 }
49
49
50− void emitTimeout() {
50+ void emitTimeout() override {
51 m_nextTimeoutTime += interval();
51 m_nextTimeoutTime += interval();
52 Q_EMIT timeout();
52 Q_EMIT timeout();
53 }
53 }
@@ -63,7 +63,7 @@ class FakeTimeSource : public UbuntuGestures::TimeSource
63{
63{
64public:
64public:
65 FakeTimeSource() { m_msecsSinceReference = 0; }
65 FakeTimeSource() { m_msecsSinceReference = 0; }
66− virtual qint64 msecsSinceReference() {return m_msecsSinceReference;}
66+ qint64 msecsSinceReference() override {return m_msecsSinceReference;}
67 qint64 m_msecsSinceReference;
67 qint64 m_msecsSinceReference;
68};
68};
69
69
@@ -97,8 +97,8 @@ class tst_DirectionalDragArea: public GestureTest
97public:
97public:
98 tst_DirectionalDragArea();
98 tst_DirectionalDragArea();
99private Q_SLOTS:
99private Q_SLOTS:
100− void init(); // called right before each and every test function is executed
100+ void init() override; // called right before each and every test function is executed
101− void cleanup(); // called right after each and every test function is executed
101+ void cleanup() override; // called right after each and every test function is executed
102
102
103 void edgeDrag();
103 void edgeDrag();
104 void edgeDrag_data();
104 void edgeDrag_data();
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+1−1
@@ -28,7 +28,7 @@ class tst_PressedOutsideNotifier: public GestureTest
28public:
28public:
29 tst_PressedOutsideNotifier();
29 tst_PressedOutsideNotifier();
30private Q_SLOTS:
30private Q_SLOTS:
31− void init(); // called right before each and every test function is executed
31+ void init() override; // called right before each and every test function is executed
32
32
33 void touchOutsideAreaTriggersSignal();
33 void touchOutsideAreaTriggersSignal();
34 void touchInsideAreaHasNoEffect();
34 void touchInsideAreaHasNoEffect();
tests/plugins/Unity/Indicators/menucontentactivatortest.cpp+2−2
@@ -30,8 +30,8 @@ public:
30 : UnityIndicators::AbstractTimer(parent)
30 : UnityIndicators::AbstractTimer(parent)
31 {}
31 {}
32
32
33− virtual int interval() const { return m_duration; }
33+ int interval() const override { return m_duration; }
34− virtual void setInterval(int msecs) { m_duration = msecs; }
34+ void setInterval(int msecs) override { m_duration = msecs; }
35
35
36 void emitTimeout() {
36 void emitTimeout() {
37 if (isRunning()) {
37 if (isRunning()) {
tests/plugins/Unity/Launcher/launchermodeltest.cpp+21−21
@@ -39,13 +39,13 @@ class MockApp: public unity::shell::application::ApplicationInfoInterface
39 Q_OBJECT
39 Q_OBJECT
40public:
40public:
41 MockApp(const QString &appId, QObject *parent = 0): ApplicationInfoInterface(appId, parent), m_appId(appId), m_focused(false) { }
41 MockApp(const QString &appId, QObject *parent = 0): ApplicationInfoInterface(appId, parent), m_appId(appId), m_focused(false) { }
42− QString appId() const { return m_appId; }
42+ QString appId() const override { return m_appId; }
43− QString name() const { return "mock"; }
43+ QString name() const override { return "mock"; }
44− QString comment() const { return "this is a mock"; }
44+ QString comment() const override { return "this is a mock"; }
45− QUrl icon() const { return QUrl(); }
45+ QUrl icon() const override { return QUrl(); }
46− ApplicationInfoInterface::Stage stage() const { return ApplicationInfoInterface::MainStage; }
46+ ApplicationInfoInterface::Stage stage() const override { return ApplicationInfoInterface::MainStage; }
47− ApplicationInfoInterface::State state() const { return ApplicationInfoInterface::Running; }
47+ ApplicationInfoInterface::State state() const override { return ApplicationInfoInterface::Running; }
48− bool focused() const { return m_focused; }
48+ bool focused() const override { return m_focused; }
49 QString splashTitle() const override { return QString(); }
49 QString splashTitle() const override { return QString(); }
50 QUrl splashImage() const override { return QUrl(); }
50 QUrl splashImage() const override { return QUrl(); }
51 bool splashShowHeader() const override { return true; }
51 bool splashShowHeader() const override { return true; }
@@ -66,16 +66,16 @@ class MockAppManager: public unity::shell::application::ApplicationManagerInterf
66 Q_OBJECT
66 Q_OBJECT
67public:
67public:
68 MockAppManager(QObject *parent = 0): ApplicationManagerInterface(parent) {}
68 MockAppManager(QObject *parent = 0): ApplicationManagerInterface(parent) {}
69− int rowCount(const QModelIndex &) const { return m_list.count(); }
69+ int rowCount(const QModelIndex &) const override { return m_list.count(); }
70− QVariant data(const QModelIndex &, int ) const { return QVariant(); }
70+ QVariant data(const QModelIndex &, int ) const override { return QVariant(); }
71− QString focusedApplicationId() const {
71+ QString focusedApplicationId() const override {
72 Q_FOREACH(MockApp *app, m_list) {
72 Q_FOREACH(MockApp *app, m_list) {
73 if (app->focused()) return app->appId();
73 if (app->focused()) return app->appId();
74 }
74 }
75 return QString();
75 return QString();
76 }
76 }
77− unity::shell::application::ApplicationInfoInterface *get(int index) const { return m_list.at(index); }
77+ unity::shell::application::ApplicationInfoInterface *get(int index) const override { return m_list.at(index); }
78− unity::shell::application::ApplicationInfoInterface *findApplication(const QString &appId) const {
78+ unity::shell::application::ApplicationInfoInterface *findApplication(const QString &appId) const override {
79 Q_FOREACH(MockApp* app, m_list) {
79 Q_FOREACH(MockApp* app, m_list) {
80 if (app->appId() == appId) {
80 if (app->appId() == appId) {
81 return app;
81 return app;
@@ -83,8 +83,8 @@ public:
83 }
83 }
84 return nullptr;
84 return nullptr;
85 }
85 }
86− unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) { return nullptr; }
86+ unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }
87− bool stopApplication(const QString &appId) {
87+ bool stopApplication(const QString &appId) override {
88 Q_FOREACH(MockApp* app, m_list) {
88 Q_FOREACH(MockApp* app, m_list) {
89 if (app->appId() == appId) {
89 if (app->appId() == appId) {
90 removeApplication(m_list.indexOf(app));
90 removeApplication(m_list.indexOf(app));
@@ -93,7 +93,7 @@ public:
93 }
93 }
94 return false;
94 return false;
95 }
95 }
96− bool focusApplication(const QString &appId) {
96+ bool focusApplication(const QString &appId) override {
97 Q_FOREACH(MockApp* app, m_list) {
97 Q_FOREACH(MockApp* app, m_list) {
98 app->setFocused(app->appId() == appId);
98 app->setFocused(app->appId() == appId);
99 }
99 }
@@ -101,7 +101,7 @@ public:
101 return true;
101 return true;
102 }
102 }
103
103
104− void unfocusCurrentApplication() { }
104+ void unfocusCurrentApplication() override { }
105
105
106 void addApplication(MockApp *app) {
106 void addApplication(MockApp *app) {
107 beginInsertRows(QModelIndex(), count(), count());
107 beginInsertRows(QModelIndex(), count(), count());
@@ -113,11 +113,11 @@ public:
113 m_list.takeAt(index)->deleteLater();
113 m_list.takeAt(index)->deleteLater();
114 endRemoveRows();
114 endRemoveRows();
115 }
115 }
116− bool requestFocusApplication(const QString &appId) { Q_UNUSED(appId); return true; }
116+ bool requestFocusApplication(const QString &appId) override { Q_UNUSED(appId); return true; }
117− bool suspended() const { return false; }
117+ bool suspended() const override { return false; }
118− void setSuspended(bool) {}
118+ void setSuspended(bool) override {}
119− bool forceDashActive() const { return false; }
119+ bool forceDashActive() const override { return false; }
120− void setForceDashActive(bool) {}
120+ void setForceDashActive(bool) override {}
121
121
122private:
122private:
123 QList<MockApp*> m_list;
123 QList<MockApp*> m_list;
tests/plugins/Utils/qlimitproxymodeltest.cpp+5−5
@@ -36,12 +36,12 @@ public:
36 {
36 {
37 }
37 }
38
38
39− int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const
39+ int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const override
40 {
40 {
41 return m_list.size();
41 return m_list.size();
42 }
42 }
43
43
44− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const
44+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
45 {
45 {
46 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
46 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
47 return QVariant();
47 return QVariant();
@@ -49,7 +49,7 @@ public:
49 return QVariant(m_list[index.row()]);
49 return QVariant(m_list[index.row()]);
50 }
50 }
51
51
52− QHash<int, QByteArray> roleNames() const
52+ QHash<int, QByteArray> roleNames() const override
53 {
53 {
54 return m_roles;
54 return m_roles;
55 }
55 }
@@ -65,7 +65,7 @@ public:
65 endRemoveRows();
65 endRemoveRows();
66 }
66 }
67
67
68− bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
68+ bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
69 beginInsertRows(parent, row, row+count-1);
69 beginInsertRows(parent, row, row+count-1);
70 for (int i=0; i<count; i++) {
70 for (int i=0; i<count; i++) {
71 m_list.insert(i+row, QString::number(i));
71 m_list.insert(i+row, QString::number(i));
@@ -81,7 +81,7 @@ public:
81 return true;
81 return true;
82 }
82 }
83
83
84− bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
84+ bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
85 beginRemoveRows(parent, row, row+count-1);
85 beginRemoveRows(parent, row, row+count-1);
86 for (int i=0; i<count; i++) {
86 for (int i=0; i<count; i++) {
87 m_list.removeAt(row);
87 m_list.removeAt(row);
tests/plugins/Utils/unitysortfilterproxymodeltest.cpp+5−5
@@ -39,12 +39,12 @@ public:
39 {
39 {
40 }
40 }
41
41
42− int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const
42+ int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const override
43 {
43 {
44 return m_list.size();
44 return m_list.size();
45 }
45 }
46
46
47− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const
47+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
48 {
48 {
49 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
49 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
50 return QVariant();
50 return QVariant();
@@ -52,7 +52,7 @@ public:
52 return QVariant(m_list[index.row()]);
52 return QVariant(m_list[index.row()]);
53 }
53 }
54
54
55− QHash<int, QByteArray> roleNames() const
55+ QHash<int, QByteArray> roleNames() const override
56 {
56 {
57 return m_roles;
57 return m_roles;
58 }
58 }
@@ -61,7 +61,7 @@ public:
61 m_roles = roles;
61 m_roles = roles;
62 }
62 }
63
63
64− bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
64+ bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
65 beginInsertRows(parent, row, row+count-1);
65 beginInsertRows(parent, row, row+count-1);
66 for (int i=0; i<count; i++) {
66 for (int i=0; i<count; i++) {
67 m_list.insert(i+row, QString("test%1").arg(i));
67 m_list.insert(i+row, QString("test%1").arg(i));
@@ -77,7 +77,7 @@ public:
77 return true;
77 return true;
78 }
78 }
79
79
80− bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
80+ bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
81 beginRemoveRows(parent, row, row+count-1);
81 beginRemoveRows(parent, row, row+count-1);
82 for (int i=0; i<count; i++) {
82 for (int i=0; i<count; i++) {
83 m_list.removeAt(row);
83 m_list.removeAt(row);
tests/utils/modules/Unity/Test/plugin.h+1−1
@@ -26,7 +26,7 @@ class UnityTestPlugin : public QQmlExtensionPlugin
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
26 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27
27
28public:
28public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
30};
30};
31
31
32#endif // UNITY_TEST_PLUGIN_H
32#endif // UNITY_TEST_PLUGIN_H