on xenial help sign in
Add override to override functions
commite6583ac40ac6bff73dc5880d3579143c9e683957 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 30 Apr 2015, 11:31 (11 years ago) parent8c98a7a
82 files changed+187−187
plugins/AccountsService/plugin.h+1−1 plugins/Dash/plugin.h+1−1 plugins/Greeter/Unity/Launcher/launchermodelas.h+9−9 plugins/Greeter/Unity/Launcher/plugin.h+1−1 plugins/Greeter/Unity/Launcher/quicklistmodel.h+2−2 plugins/LightDM/UsersModel.cpp+1−1 plugins/LightDM/liblightdm/UsersModel.h+2−2 plugins/LightDM/plugin.h+1−1 plugins/Lights/plugin.h+1−1 plugins/Powerd/plugin.h+1−1 plugins/ScreenGrabber/plugin.h+1−1 plugins/SessionBroadcast/plugin.h+1−1 plugins/Ubuntu/DownloadDaemonListener/plugin.h+2−2 plugins/Ubuntu/Gestures/DirectionalDragArea.h+1−1 plugins/Ubuntu/Gestures/plugin.h+1−1 plugins/Ubuntu/Payments/plugin.h+1−1 plugins/Ubuntu/SystemImage/plugin.h+1−1 plugins/Unity/Connectivity/plugin.h+1−1 plugins/Unity/DashCommunicator/plugin.h+1−1 plugins/Unity/Indicators/indicatorsmodel.h+5−5 plugins/Unity/Indicators/menucontentactivator.cpp+4−4 plugins/Unity/Indicators/plugin.h+1−1 plugins/Unity/Launcher/launchermodel.h+10−10 plugins/Unity/Launcher/plugin.h+1−1 plugins/Unity/Launcher/quicklistmodel.h+2−2 plugins/Unity/Session/plugin.h+1−1 plugins/Utils/HomeKeyWatcher.h+1−1 plugins/Utils/plugin.h+2−2 plugins/Utils/qlimitproxymodelqml.h+2−2 plugins/Utils/qvariantlistmodel.h+6−6 plugins/Utils/timeformatter.h+1−1 plugins/Utils/unitysortfilterproxymodelqml.h+2−2 plugins/Utils/windowkeysfilter.h+1−1 plugins/Wizard/plugin.h+1−1 tests/mocks/AccountsService/plugin.h+1−1 tests/mocks/GSettings.1.0/plugin.h+1−1 tests/mocks/LightDM/liblightdm/UsersModel.h+2−2 tests/mocks/LightDM/plugin.h+1−1 tests/mocks/Lights/plugin.h+1−1 tests/mocks/MeeGo/QOfono/plugin.h+1−1 tests/mocks/Powerd/plugin.h+1−1 tests/mocks/QMenuModel/plugin.h+1−1 tests/mocks/QMenuModel/unitymenumodel.h+6−6 tests/mocks/QtMultimedia/plugin.h+1−1 tests/mocks/Ubuntu/Connectivity/plugin.h+2−2 tests/mocks/Ubuntu/DownloadDaemonListener/plugin.h+1−1 tests/mocks/Ubuntu/Payments/plugin.h+1−1 tests/mocks/Ubuntu/SystemImage/plugin.h+1−1 tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.h+1−1 tests/mocks/Ubuntu/Telephony/MockCallEntry.h+1−1 tests/mocks/Ubuntu/Telephony/plugin.h+2−2 tests/mocks/Unity/Application/ObjectListModel.h+1−1 tests/mocks/Unity/Application/plugin.h+2−2 tests/mocks/Unity/Connectivity/plugin.h+1−1 tests/mocks/Unity/DashCommunicator/plugin.h+1−1 tests/mocks/Unity/Indicators/fakeindicatorsmodel.h+5−5 tests/mocks/Unity/Indicators/fakeplugin.h+1−1 tests/mocks/Unity/Launcher/MockLauncherItem.h+2−2 tests/mocks/Unity/Launcher/MockLauncherModel.h+10−10 tests/mocks/Unity/Launcher/MockQuickListModel.h+2−2 tests/mocks/Unity/Launcher/plugin.h+1−1 tests/mocks/Unity/Notifications/MockActionModel.h+3−3 tests/mocks/Unity/Notifications/MockNotificationModel.h+3−3 tests/mocks/Unity/Notifications/plugin.h+1−1 tests/mocks/Unity/fake_scopes.h+2−2 tests/mocks/Unity/fake_unity_plugin.h+1−1 tests/mocks/Wizard/mockplugin.h+1−1 tests/plugins/Dash/horizontaljournaltest.cpp+3−3 tests/plugins/Dash/horizontaljournaltry.cpp+1−1 tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp+3−3 tests/plugins/Dash/organicgridtest.cpp+2−2 tests/plugins/Dash/organicgridtry.cpp+2−2 tests/plugins/Dash/verticaljournaltest.cpp+3−3 tests/plugins/Dash/verticaljournaltry.cpp+1−1 tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+1−1 tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+4−4 tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+1−1 tests/plugins/Unity/Indicators/menucontentactivatortest.cpp+2−2 tests/plugins/Unity/Launcher/launchermodeltest.cpp+21−21 tests/plugins/Utils/qlimitproxymodeltest.cpp+5−5 tests/plugins/Utils/unitysortfilterproxymodeltest.cpp+5−5 tests/utils/modules/Unity/Test/plugin.h+1−1
plugins/AccountsService/plugin.h+1−1
@@ -28,7 +28,7 @@ class AccountsServicePlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
plugins/Dash/plugin.h+1−1
@@ -27,7 +27,7 @@ class DashPlugin : public QQmlExtensionPlugin
2727 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2828
2929public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
3131};
3232
3333#endif
plugins/Greeter/Unity/Launcher/launchermodelas.h+9−9
@@ -37,19 +37,19 @@ public:
3737 LauncherModel(QObject *parent = 0);
3838 ~LauncherModel();
3939
40− int rowCount(const QModelIndex &parent = QModelIndex()) const;
40+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
4141
42− QVariant data(const QModelIndex &index, int role) const;
42+ QVariant data(const QModelIndex &index, int role) const override;
4343
44− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const;
45− Q_INVOKABLE void move(int oldIndex, int newIndex);
46− Q_INVOKABLE void pin(const QString &appId, int index = -1);
47− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
48− Q_INVOKABLE void setUser(const QString &username);
44+ 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 pin(const QString &appId, int index = -1) override;
47+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
48+ Q_INVOKABLE void setUser(const QString &username) override;
4949 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
5050
51− unity::shell::application::ApplicationManagerInterface* applicationManager() const;
52− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager);
51+ unity::shell::application::ApplicationManagerInterface* applicationManager() const override;
52+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager) override;
5353
5454 bool onlyPinned() const override;
5555 void setOnlyPinned(bool onlyPinned) override;
plugins/Greeter/Unity/Launcher/plugin.h+1−1
@@ -26,7 +26,7 @@ class UnityLauncherPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif
plugins/Greeter/Unity/Launcher/quicklistmodel.h+2−2
@@ -45,8 +45,8 @@ public:
4545
4646 QuickListEntry get(int index) const;
4747
48− int rowCount(const QModelIndex &parent = QModelIndex()) const;
49− QVariant data(const QModelIndex &index, int role) const;
48+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
49+ QVariant data(const QModelIndex &index, int role) const override;
5050
5151private:
5252 QList<QuickListEntry> m_list;
plugins/LightDM/UsersModel.cpp+1−1
@@ -32,7 +32,7 @@ class MangleModel : public QSortFilterProxyModel
3232public:
3333 explicit MangleModel(QObject* parent=0);
3434
35− virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
35+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
3636};
3737
3838MangleModel::MangleModel(QObject* parent)
plugins/LightDM/liblightdm/UsersModel.h+2−2
@@ -53,8 +53,8 @@ public:
5353 BackgroundPathRole
5454 };
5555
56− int rowCount(const QModelIndex &parent) const;
57− QVariant data(const QModelIndex &index, int role) const;
56+ int rowCount(const QModelIndex &parent) const override;
57+ QVariant data(const QModelIndex &index, int role) const override;
5858
5959private:
6060 UsersModelPrivate * const d_ptr;
plugins/LightDM/plugin.h+1−1
@@ -29,7 +29,7 @@ class LightDMPlugin : public QQmlExtensionPlugin
2929 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3030
3131public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
3333};
3434
3535#endif
plugins/Lights/plugin.h+1−1
@@ -28,7 +28,7 @@ class LightsPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
plugins/Powerd/plugin.h+1−1
@@ -29,7 +29,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
2929 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3030
3131public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
3333};
3434
3535#endif
plugins/ScreenGrabber/plugin.h+1−1
@@ -27,7 +27,7 @@ class ScreenGrabberPlugin : public QQmlExtensionPlugin
2727 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2828
2929public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
3131};
3232
3333#endif // SCREENGRABBER_PLUGIN_H
plugins/SessionBroadcast/plugin.h+1−1
@@ -27,7 +27,7 @@ class SessionBroadcastPlugin : public QQmlExtensionPlugin
2727 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2828
2929public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
3131};
3232
3333#endif
plugins/Ubuntu/DownloadDaemonListener/plugin.h+2−2
@@ -31,7 +31,7 @@ class BackendPlugin : public QQmlExtensionPlugin
3131 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3232
3333public:
34− void registerTypes(const char *uri);
35− void initializeEngine(QQmlEngine *engine, const char *uri);
34+ void registerTypes(const char *uri) override;
35+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
3636};
3737#endif // BACKEND_PLUGIN_H
plugins/Ubuntu/Gestures/DirectionalDragArea.h+1−1
@@ -214,7 +214,7 @@ Q_SIGNALS:
214214 void tapped();
215215
216216protected:
217− virtual void touchEvent(QTouchEvent *event);
217+ void touchEvent(QTouchEvent *event) override;
218218
219219private Q_SLOTS:
220220 void checkSpeed();
plugins/Ubuntu/Gestures/plugin.h+1−1
@@ -24,7 +24,7 @@ class UbuntuGesturesQmlPlugin : public QQmlExtensionPlugin
2424 Q_OBJECT
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626public:
27− void registerTypes(const char *uri);
27+ void registerTypes(const char *uri) override;
2828};
2929
3030
plugins/Ubuntu/Payments/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // PAYMENTS_PLUGIN_H
plugins/Ubuntu/SystemImage/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // SYSTEMIMAGE_PLUGIN_H
plugins/Unity/Connectivity/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // CONNECTIVITY_PLUGIN_H
plugins/Unity/DashCommunicator/plugin.h+1−1
@@ -28,7 +28,7 @@ class DashCommunicatorPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
plugins/Unity/Indicators/indicatorsmodel.h+5−5
@@ -50,11 +50,11 @@ public:
5050 void setProfile(const QString& profile);
5151
5252 /* QAbstractItemModel */
53− QHash<int, QByteArray> roleNames() const;
54− int columnCount(const QModelIndex &parent = QModelIndex()) const;
55− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
56− QModelIndex parent (const QModelIndex &index) const;
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
53+ QHash<int, QByteArray> roleNames() const override;
54+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
55+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
56+ QModelIndex parent (const QModelIndex &index) const override;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
5858
5959
6060Q_SIGNALS:
plugins/Unity/Indicators/menucontentactivator.cpp+4−4
@@ -28,10 +28,10 @@ public:
2828 connect(&m_timer, &QTimer::timeout,
2929 this, &UnityIndicators::AbstractTimer::timeout);
3030 }
31− virtual int interval() const { return m_timer.interval(); }
32− virtual void setInterval(int msecs) { m_timer.setInterval(msecs); }
33− virtual void start() { m_timer.start(); UnityIndicators::AbstractTimer::start(); }
34− virtual void stop() { m_timer.stop(); UnityIndicators::AbstractTimer::stop(); }
31+ int interval() const override { return m_timer.interval(); }
32+ void setInterval(int msecs) override { m_timer.setInterval(msecs); }
33+ void start() override { m_timer.start(); UnityIndicators::AbstractTimer::start(); }
34+ void stop() override { m_timer.stop(); UnityIndicators::AbstractTimer::stop(); }
3535private:
3636 QTimer m_timer;
3737};
plugins/Unity/Indicators/plugin.h+1−1
@@ -27,7 +27,7 @@ class IndicatorsPlugin : public QQmlExtensionPlugin
2727 Q_OBJECT
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929public:
30− void registerTypes(const char *uri);
30+ void registerTypes(const char *uri) override;
3131};
3232
3333#endif // INDICATORS2_PLUGIN_H
plugins/Unity/Launcher/launchermodel.h+10−10
@@ -41,19 +41,19 @@ public:
4141 LauncherModel(QObject *parent = 0);
4242 ~LauncherModel();
4343
44− int rowCount(const QModelIndex &parent = QModelIndex()) const;
44+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
4545
46− QVariant data(const QModelIndex &index, int role) const;
46+ QVariant data(const QModelIndex &index, int role) const override;
4747
48− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const;
49− Q_INVOKABLE void move(int oldIndex, int newIndex);
50− Q_INVOKABLE void pin(const QString &appId, int index = -1);
51− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
52− Q_INVOKABLE void setUser(const QString &username);
48+ Q_INVOKABLE unity::shell::launcher::LauncherItemInterface* get(int index) const override;
49+ Q_INVOKABLE void move(int oldIndex, int newIndex) override;
50+ Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
51+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
52+ Q_INVOKABLE void setUser(const QString &username) override;
5353 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
5454
55− unity::shell::application::ApplicationManagerInterface* applicationManager() const;
56− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager);
55+ unity::shell::application::ApplicationManagerInterface* applicationManager() const override;
56+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager) override;
5757
5858 bool onlyPinned() const override;
5959 void setOnlyPinned(bool onlyPinned) override;
@@ -61,7 +61,7 @@ public:
6161 int findApplication(const QString &appId);
6262
6363public Q_SLOTS:
64− void requestRemove(const QString &appId);
64+ void requestRemove(const QString &appId) override;
6565 Q_INVOKABLE void refresh();
6666
6767private:
plugins/Unity/Launcher/plugin.h+1−1
@@ -28,7 +28,7 @@ class UnityLauncherPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
plugins/Unity/Launcher/quicklistmodel.h+2−2
@@ -48,8 +48,8 @@ public:
4848
4949 QuickListEntry get(int index) const;
5050
51− int rowCount(const QModelIndex &parent = QModelIndex()) const;
52− QVariant data(const QModelIndex &index, int role) const;
51+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
52+ QVariant data(const QModelIndex &index, int role) const override;
5353
5454private:
5555 QList<QuickListEntry> m_list;
plugins/Unity/Session/plugin.h+1−1
@@ -28,7 +28,7 @@ class SessionPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
plugins/Utils/HomeKeyWatcher.h+1−1
@@ -49,7 +49,7 @@ public:
4949
5050 virtual ~HomeKeyWatcher();
5151
52− bool eventFilter(QObject *watched, QEvent *event);
52+ bool eventFilter(QObject *watched, QEvent *event) override;
5353
5454 void update(QEvent *event);
5555
plugins/Utils/plugin.h+2−2
@@ -28,8 +28,8 @@ class UtilsPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
32− void initializeEngine(QQmlEngine *engine, const char *uri);
31+ void registerTypes(const char *uri) override;
32+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
3333};
3434
3535#endif
plugins/Utils/qlimitproxymodelqml.h+2−2
@@ -32,8 +32,8 @@ public:
3232
3333 /* getters */
3434 int limit() const;
35− int rowCount(const QModelIndex &parent = QModelIndex()) const;
36− QHash<int, QByteArray> roleNames() const;
35+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
36+ QHash<int, QByteArray> roleNames() const override;
3737
3838 /* setters */
3939 void setModel(QAbstractItemModel *model);
plugins/Utils/qvariantlistmodel.h+6−6
@@ -54,14 +54,14 @@ public:
5454
5555 ~QVariantListModel();
5656
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
58− QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
58+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
5959
60− QVariant data(const QModelIndex &index, int role) const;
61− bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
60+ QVariant data(const QModelIndex &index, int role) const override;
61+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
6262
63− bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
64− bool removeRows(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()) override;
6565
6666 QVariantList variantList() const;
6767 void setVariantList(const QVariantList &list);
plugins/Utils/timeformatter.h+1−1
@@ -62,7 +62,7 @@ public:
6262 GDateTimeFormatter(QObject *parent = 0);
6363
6464protected:
65− virtual QString formatTime() const;
65+ QString formatTime() const override;
6666};
6767
6868#endif
plugins/Utils/unitysortfilterproxymodelqml.h+2−2
@@ -36,12 +36,12 @@ public:
3636 Q_INVOKABLE int count();
3737 Q_INVOKABLE int findFirst(int role, const QVariant& value) const;
3838 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;
4040
4141 /* getters */
4242 int totalCount() const;
4343 bool invertMatch() const;
44− QHash<int, QByteArray> roleNames() const;
44+ QHash<int, QByteArray> roleNames() const override;
4545
4646 /* setters */
4747 void setModel(QAbstractItemModel *model);
plugins/Utils/windowkeysfilter.h+1−1
@@ -39,7 +39,7 @@ class WindowKeysFilter : public QQuickItem
3939public:
4040 WindowKeysFilter(QQuickItem *parent = 0);
4141
42− bool eventFilter(QObject *watched, QEvent *event);
42+ bool eventFilter(QObject *watched, QEvent *event) override;
4343
4444private Q_SLOTS:
4545 void setupFilterOnWindow(QQuickWindow *window);
plugins/Wizard/plugin.h+1−1
@@ -26,7 +26,7 @@ class WizardPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif
tests/mocks/AccountsService/plugin.h+1−1
@@ -29,7 +29,7 @@ class AccountsServicePlugin : public QQmlExtensionPlugin
2929 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3030
3131public:
32− void registerTypes(const char *uri);
32+ void registerTypes(const char *uri) override;
3333};
3434
3535#endif
tests/mocks/GSettings.1.0/plugin.h+1−1
@@ -25,7 +25,7 @@ class FakeGSettingsQmlPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // PLUGIN_H
tests/mocks/LightDM/liblightdm/UsersModel.h+2−2
@@ -53,8 +53,8 @@ public:
5353 BackgroundPathRole
5454 };
5555
56− int rowCount(const QModelIndex &parent) const;
57− QVariant data(const QModelIndex &index, int role) const;
56+ int rowCount(const QModelIndex &parent) const override;
57+ QVariant data(const QModelIndex &index, int role) const override;
5858
5959 QString mockMode() const;
6060 void setMockMode(QString mockMode);
tests/mocks/LightDM/plugin.h+1−1
@@ -26,7 +26,7 @@ class LightDMPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif
tests/mocks/Lights/plugin.h+1−1
@@ -26,7 +26,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif
tests/mocks/MeeGo/QOfono/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // MOCK_QOFONO_PLUGIN_H
tests/mocks/Powerd/plugin.h+1−1
@@ -28,7 +28,7 @@ class PowerdPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
tests/mocks/QMenuModel/plugin.h+1−1
@@ -28,7 +28,7 @@ class QMenuModelPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
tests/mocks/QMenuModel/unitymenumodel.h+6−6
@@ -61,12 +61,12 @@ public:
6161
6262 QString nameOwner() const;
6363
64− int rowCount(const QModelIndex &parent = QModelIndex()) const;
65− int columnCount(const QModelIndex &parent = QModelIndex()) const;
66− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
67− QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
68− QModelIndex parent(const QModelIndex &index) const;
69− QHash<int, QByteArray> roleNames() const;
64+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
65+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
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 override;
68+ QModelIndex parent(const QModelIndex &index) const override;
69+ QHash<int, QByteArray> roleNames() const override;
7070
7171 Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = nullptr);
7272 Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema);
tests/mocks/QtMultimedia/plugin.h+1−1
@@ -28,7 +28,7 @@ class MockQtMultimediaPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
tests/mocks/Ubuntu/Connectivity/plugin.h+2−2
@@ -28,8 +28,8 @@ class QmlConnectivityNetworkingPlugin : public QQmlExtensionPlugin {
2828 Q_INTERFACES(QQmlExtensionInterface)
2929
3030public:
31− void registerTypes(const char *uri);
32− void initializeEngine(QQmlEngine *engine, const char *uri);
31+ void registerTypes(const char *uri) override;
32+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
3333};
3434
3535#endif // QML_CONNECTIVITY_PLUGIN_H
tests/mocks/Ubuntu/DownloadDaemonListener/plugin.h+1−1
@@ -24,7 +24,7 @@ class FakeUbuntuDownloadDaemonListenerQmlPlugin : public QQmlExtensionPlugin
2424 Q_OBJECT
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626public:
27− void registerTypes(const char *uri);
27+ void registerTypes(const char *uri) override;
2828};
2929
3030#endif
tests/mocks/Ubuntu/Payments/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // PAYMENTS_PLUGIN_H
tests/mocks/Ubuntu/SystemImage/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // MOCK_SYSTEMIMAGE_PLUGIN_H
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // MOCK_SECURITYPRIVACY_PLUGIN_H
tests/mocks/Ubuntu/Telephony/MockCallEntry.h+1−1
@@ -53,7 +53,7 @@ Q_SIGNALS:
5353 void elapsedTimerRunningChanged();
5454
5555protected:
56− void timerEvent(QTimerEvent * event);
56+ void timerEvent(QTimerEvent * event) override;
5757
5858private:
5959 QString m_phoneNumber;
tests/mocks/Ubuntu/Telephony/plugin.h+2−2
@@ -27,8 +27,8 @@ class FakeUbuntuTelephonyQmlPlugin : public QQmlExtensionPlugin
2727 Q_OBJECT
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929public:
30− void initializeEngine(QQmlEngine *engine, const char *uri);
31− void registerTypes(const char *uri);
30+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
31+ void registerTypes(const char *uri) override;
3232
3333private:
3434 QQmlContext *mRootContext;
tests/mocks/Unity/Application/ObjectListModel.h+1−1
@@ -76,7 +76,7 @@ public:
7676 return QVariant();
7777 }
7878
79− QHash<int, QByteArray> roleNames() const
79+ QHash<int, QByteArray> roleNames() const override
8080 {
8181 QHash<int, QByteArray> roleNames;
8282 roleNames.insert(RoleModelData, "modelData");
tests/mocks/Unity/Application/plugin.h+2−2
@@ -24,8 +24,8 @@ class FakeUnityApplicationQmlPlugin : public QQmlExtensionPlugin
2424 Q_OBJECT
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626public:
27− void registerTypes(const char *uri);
28− void initializeEngine(QQmlEngine *engine, const char *uri);
27+ void registerTypes(const char *uri) override;
28+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
2929};
3030
3131#endif
tests/mocks/Unity/Connectivity/plugin.h+1−1
@@ -25,7 +25,7 @@ class BackendPlugin : public QQmlExtensionPlugin
2525 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2626
2727public:
28− void registerTypes(const char *uri);
28+ void registerTypes(const char *uri) override;
2929};
3030
3131#endif // MOCK_CONNECTIVITY_PLUGIN_H
tests/mocks/Unity/DashCommunicator/plugin.h+1−1
@@ -28,7 +28,7 @@ class DashCommunicatorPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
tests/mocks/Unity/Indicators/fakeindicatorsmodel.h+5−5
@@ -50,11 +50,11 @@ public:
5050 QVariant modelData() const { return m_modelData; }
5151
5252 /* QAbstractItemModel */
53− QHash<int, QByteArray> roleNames() const;
54− int columnCount(const QModelIndex &parent = QModelIndex()) const;
55− QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
56− QModelIndex parent (const QModelIndex &index) const;
57− int rowCount(const QModelIndex &parent = QModelIndex()) const;
53+ QHash<int, QByteArray> roleNames() const override;
54+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
55+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
56+ QModelIndex parent (const QModelIndex &index) const override;
57+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
5858
5959Q_SIGNALS:
6060 void countChanged();
tests/mocks/Unity/Indicators/fakeplugin.h+1−1
@@ -26,7 +26,7 @@ class IndicatorsFakePlugin : public QQmlExtensionPlugin
2626 Q_OBJECT
2727 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif // INDICATORS_FAKE_PLUGIN_H
tests/mocks/Unity/Launcher/MockLauncherItem.h+2−2
@@ -43,9 +43,9 @@ public:
4343 int progress() const override;
4444 int count() const override;
4545 bool countVisible() const override;
46− bool focused() const;
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 setPinned(bool pinned);
tests/mocks/Unity/Launcher/MockLauncherModel.h+10−10
@@ -34,20 +34,20 @@ public:
3434 MockLauncherModel(QObject* parent = 0);
3535 ~MockLauncherModel();
3636
37− int rowCount(const QModelIndex& parent) const;
37+ int rowCount(const QModelIndex& parent) const override;
3838
39− QVariant data(const QModelIndex& index, int role) const;
39+ QVariant data(const QModelIndex& index, int role) const override;
4040
41− Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const;
42− Q_INVOKABLE void move(int oldIndex, int newIndex);
43− Q_INVOKABLE void pin(const QString &appId, int index = -1);
44− Q_INVOKABLE void requestRemove(const QString &appId);
45− Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
46− Q_INVOKABLE void setUser(const QString &username);
41+ Q_INVOKABLE unity::shell::launcher::LauncherItemInterface *get(int index) const override;
42+ Q_INVOKABLE void move(int oldIndex, int newIndex) override;
43+ Q_INVOKABLE void pin(const QString &appId, int index = -1) override;
44+ Q_INVOKABLE void requestRemove(const QString &appId) override;
45+ Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex) override;
46+ Q_INVOKABLE void setUser(const QString &username) override;
4747 Q_INVOKABLE QString getUrlForAppId(const QString &appId) const;
4848
49− unity::shell::application::ApplicationManagerInterface *applicationManager() const;
50− void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager);
49+ unity::shell::application::ApplicationManagerInterface *applicationManager() const override;
50+ void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager) override;
5151
5252 bool onlyPinned() const override;
5353 void setOnlyPinned(bool onlyPinned) override;
tests/mocks/Unity/Launcher/MockQuickListModel.h+2−2
@@ -30,9 +30,9 @@ class MockQuickListModel: public QuickListModelInterface
3030public:
3131 MockQuickListModel(QObject *parent = 0);
3232
33− QVariant data(const QModelIndex &index, int role) const;
33+ QVariant data(const QModelIndex &index, int role) const override;
3434
35− int rowCount(const QModelIndex &parent = QModelIndex()) const;
35+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
3636};
3737
3838#endif // MOCKQUICKLISTMODEL_H
tests/mocks/Unity/Launcher/plugin.h+1−1
@@ -29,7 +29,7 @@ class TestLauncherPlugin : public QQmlExtensionPlugin
2929 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3030
3131public:
32− void registerTypes(const char* uri);
32+ void registerTypes(const char* uri) override;
3333};
3434
3535#endif // TESTLAUNCHER_PLUGIN_H
tests/mocks/Unity/Notifications/MockActionModel.h+3−3
@@ -32,9 +32,9 @@ public:
3232 ActionModel(QObject *parent=nullptr);
3333 virtual ~ActionModel();
3434
35− virtual int rowCount(const QModelIndex &index) const;
36− virtual QVariant data(const QModelIndex &index, int role) const;
37− virtual QHash<int, QByteArray> roleNames() const;
35+ int rowCount(const QModelIndex &index) const override;
36+ QVariant data(const QModelIndex &index, int role) const override;
37+ QHash<int, QByteArray> roleNames() const override;
3838
3939 Q_ENUMS(ActionsRoles)
4040 enum ActionsRoles {
tests/mocks/Unity/Notifications/MockNotificationModel.h+3−3
@@ -35,9 +35,9 @@ public:
3535 MockNotificationModel(QObject *parent=nullptr);
3636 virtual ~MockNotificationModel();
3737
38− virtual int rowCount(const QModelIndex &parent) const;
39− virtual QVariant data(const QModelIndex &index, int role) const;
40− virtual QHash<int, QByteArray> roleNames() const;
38+ int rowCount(const QModelIndex &parent) const override;
39+ QVariant data(const QModelIndex &index, int role) const override;
40+ QHash<int, QByteArray> roleNames() const override;
4141
4242 Q_INVOKABLE void append(MockNotification* n);
4343 MockNotification* getNotification(int id) const;
tests/mocks/Unity/Notifications/plugin.h+1−1
@@ -28,7 +28,7 @@ class TestNotificationPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char* uri);
31+ void registerTypes(const char* uri) override;
3232};
3333
3434#endif // TESTNOTIFICATION_PLUGIN_H
tests/mocks/Unity/fake_scopes.h+2−2
@@ -50,8 +50,8 @@ public:
5050 Q_INVOKABLE void clearFavorites();
5151 Q_INVOKABLE void load();
5252
53− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
54− QModelIndex parent ( const QModelIndex & index ) const;
53+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
54+ QModelIndex parent ( const QModelIndex & index ) const override;
5555
5656 bool loaded() const override;
5757 int count() const override;
tests/mocks/Unity/fake_unity_plugin.h+1−1
@@ -28,7 +28,7 @@ class FakeUnityPlugin : public QQmlExtensionPlugin
2828 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2929
3030public:
31− void registerTypes(const char *uri);
31+ void registerTypes(const char *uri) override;
3232};
3333
3434#endif
tests/mocks/Wizard/mockplugin.h+1−1
@@ -26,7 +26,7 @@ class MockWizardPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif
tests/plugins/Dash/horizontaljournaltest.cpp+3−3
@@ -32,19 +32,19 @@
3232
3333class WidthModel : public QAbstractListModel {
3434public:
35− QHash<int, QByteArray> roleNames() const
35+ QHash<int, QByteArray> roleNames() const override
3636 {
3737 QHash<int, QByteArray> roles;
3838 roles.insert(Qt::DisplayRole, "modelWidth");
3939 return roles;
4040 }
4141
42− int rowCount(const QModelIndex & /*parent*/) const
42+ int rowCount(const QModelIndex & /*parent*/) const override
4343 {
4444 return m_list.count();
4545 }
4646
47− QVariant data(const QModelIndex &index, int /*role*/) const
47+ QVariant data(const QModelIndex &index, int /*role*/) const override
4848 {
4949 return m_list[index.row()];
5050 }
tests/plugins/Dash/horizontaljournaltry.cpp+1−1
@@ -29,7 +29,7 @@
2929class QWidthModela : public QStringListModel {
3030 Q_OBJECT
3131public:
32− QHash<int, QByteArray> roleNames() const
32+ QHash<int, QByteArray> roleNames() const override
3333 {
3434 QHash<int, QByteArray> roles;
3535 roles.insert(Qt::DisplayRole, "modelWidth");
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp+3−3
@@ -37,7 +37,7 @@ public:
3737 list << "A" << "B" << "C" << "D" << "E" << "F" << "G" << "H";
3838 }
3939
40− int rowCount(const QModelIndex &parent) const
40+ int rowCount(const QModelIndex &parent) const override
4141 {
4242 if (parent.isValid())
4343 return 0;
@@ -45,14 +45,14 @@ public:
4545 return list.count();
4646 }
4747
48− QVariant data(const QModelIndex &index, int role) const
48+ QVariant data(const QModelIndex &index, int role) const override
4949 {
5050 if (role == Qt::SizeHintRole) return 50;
5151 else if (role == Qt::DisplayRole) return list[index.row()];
5252 return QVariant();
5353 }
5454
55− QHash<int, QByteArray> roleNames() const
55+ QHash<int, QByteArray> roleNames() const override
5656 {
5757 QHash<int, QByteArray> hash;
5858 hash.insert(Qt::DisplayRole, "type");
tests/plugins/Dash/organicgridtest.cpp+2−2
@@ -34,12 +34,12 @@ class DummyModel : public QAbstractListModel {
3434public:
3535 DummyModel() : m_count(0) {}
3636
37− int rowCount(const QModelIndex & /*parent*/) const
37+ int rowCount(const QModelIndex & /*parent*/) const override
3838 {
3939 return m_count;
4040 }
4141
42− QVariant data(const QModelIndex & /*index*/, int /*role*/) const
42+ QVariant data(const QModelIndex & /*index*/, int /*role*/) const override
4343 {
4444 return QVariant();
4545 }
tests/plugins/Dash/organicgridtry.cpp+2−2
@@ -31,12 +31,12 @@ class DummyModel : public QAbstractListModel {
3131public:
3232 DummyModel() : m_count(0) {}
3333
34− int rowCount(const QModelIndex & /*parent*/) const
34+ int rowCount(const QModelIndex & /*parent*/) const override
3535 {
3636 return m_count;
3737 }
3838
39− QVariant data(const QModelIndex & /*index*/, int /*role*/) const
39+ QVariant data(const QModelIndex & /*index*/, int /*role*/) const override
4040 {
4141 return QVariant();
4242 }
tests/plugins/Dash/verticaljournaltest.cpp+3−3
@@ -32,19 +32,19 @@
3232
3333class HeightModel : public QAbstractListModel {
3434public:
35− QHash<int, QByteArray> roleNames() const
35+ QHash<int, QByteArray> roleNames() const override
3636 {
3737 QHash<int, QByteArray> roles;
3838 roles.insert(Qt::DisplayRole, "modelHeight");
3939 return roles;
4040 }
4141
42− int rowCount(const QModelIndex & /*parent*/) const
42+ int rowCount(const QModelIndex & /*parent*/) const override
4343 {
4444 return m_list.count();
4545 }
4646
47− QVariant data(const QModelIndex &index, int /*role*/) const
47+ QVariant data(const QModelIndex &index, int /*role*/) const override
4848 {
4949 return m_list[index.row()];
5050 }
tests/plugins/Dash/verticaljournaltry.cpp+1−1
@@ -29,7 +29,7 @@
2929class QHeightModel : public QStringListModel {
3030 Q_OBJECT
3131public:
32− QHash<int, QByteArray> roleNames() const
32+ QHash<int, QByteArray> roleNames() const override
3333 {
3434 QHash<int, QByteArray> roles;
3535 roles.insert(Qt::DisplayRole, "modelHeight");
tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+1−1
@@ -24,7 +24,7 @@ class FakeTimeSource : public UbuntuGestures::TimeSource {
2424public:
2525 FakeTimeSource() : m_value(0) {}
2626
27− virtual qint64 msecsSinceReference() {
27+ qint64 msecsSinceReference() override {
2828 return m_value;
2929 }
3030
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+4−4
@@ -47,7 +47,7 @@ public:
4747 m_nextTimeoutTime = m_timeSource->msecsSinceReference() + (qint64)interval();
4848 }
4949
50− void emitTimeout() {
50+ void emitTimeout() override {
5151 m_nextTimeoutTime += interval();
5252 Q_EMIT timeout();
5353 }
@@ -63,7 +63,7 @@ class FakeTimeSource : public UbuntuGestures::TimeSource
6363{
6464public:
6565 FakeTimeSource() { m_msecsSinceReference = 0; }
66− virtual qint64 msecsSinceReference() {return m_msecsSinceReference;}
66+ qint64 msecsSinceReference() override {return m_msecsSinceReference;}
6767 qint64 m_msecsSinceReference;
6868};
6969
@@ -97,8 +97,8 @@ class tst_DirectionalDragArea: public GestureTest
9797public:
9898 tst_DirectionalDragArea();
9999private Q_SLOTS:
100− void init(); // called right before each and every test function is executed
101− void cleanup(); // called right after each and every test function is executed
100+ void init() override; // called right before each and every test function is executed
101+ void cleanup() override; // called right after each and every test function is executed
102102
103103 void edgeDrag();
104104 void edgeDrag_data();
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+1−1
@@ -28,7 +28,7 @@ class tst_PressedOutsideNotifier: public GestureTest
2828public:
2929 tst_PressedOutsideNotifier();
3030private 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
3232
3333 void touchOutsideAreaTriggersSignal();
3434 void touchInsideAreaHasNoEffect();
tests/plugins/Unity/Indicators/menucontentactivatortest.cpp+2−2
@@ -30,8 +30,8 @@ public:
3030 : UnityIndicators::AbstractTimer(parent)
3131 {}
3232
33− virtual int interval() const { return m_duration; }
34− virtual void setInterval(int msecs) { m_duration = msecs; }
33+ int interval() const override { return m_duration; }
34+ void setInterval(int msecs) override { m_duration = msecs; }
3535
3636 void emitTimeout() {
3737 if (isRunning()) {
tests/plugins/Unity/Launcher/launchermodeltest.cpp+21−21
@@ -39,13 +39,13 @@ class MockApp: public unity::shell::application::ApplicationInfoInterface
3939 Q_OBJECT
4040public:
4141 MockApp(const QString &appId, QObject *parent = 0): ApplicationInfoInterface(appId, parent), m_appId(appId), m_focused(false) { }
42− QString appId() const { return m_appId; }
43− QString name() const { return "mock"; }
44− QString comment() const { return "this is a mock"; }
45− QUrl icon() const { return QUrl(); }
46− ApplicationInfoInterface::Stage stage() const { return ApplicationInfoInterface::MainStage; }
47− ApplicationInfoInterface::State state() const { return ApplicationInfoInterface::Running; }
48− bool focused() const { return m_focused; }
42+ QString appId() const override { return m_appId; }
43+ QString name() const override { return "mock"; }
44+ QString comment() const override { return "this is a mock"; }
45+ QUrl icon() const override { return QUrl(); }
46+ ApplicationInfoInterface::Stage stage() const override { return ApplicationInfoInterface::MainStage; }
47+ ApplicationInfoInterface::State state() const override { return ApplicationInfoInterface::Running; }
48+ bool focused() const override { return m_focused; }
4949 QString splashTitle() const override { return QString(); }
5050 QUrl splashImage() const override { return QUrl(); }
5151 bool splashShowHeader() const override { return true; }
@@ -66,16 +66,16 @@ class MockAppManager: public unity::shell::application::ApplicationManagerInterf
6666 Q_OBJECT
6767public:
6868 MockAppManager(QObject *parent = 0): ApplicationManagerInterface(parent) {}
69− int rowCount(const QModelIndex &) const { return m_list.count(); }
70− QVariant data(const QModelIndex &, int ) const { return QVariant(); }
71− QString focusedApplicationId() const {
69+ int rowCount(const QModelIndex &) const override { return m_list.count(); }
70+ QVariant data(const QModelIndex &, int ) const override { return QVariant(); }
71+ QString focusedApplicationId() const override {
7272 Q_FOREACH(MockApp *app, m_list) {
7373 if (app->focused()) return app->appId();
7474 }
7575 return QString();
7676 }
77− unity::shell::application::ApplicationInfoInterface *get(int index) const { return m_list.at(index); }
78− unity::shell::application::ApplicationInfoInterface *findApplication(const QString &appId) const {
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 override {
7979 Q_FOREACH(MockApp* app, m_list) {
8080 if (app->appId() == appId) {
8181 return app;
@@ -83,8 +83,8 @@ public:
8383 }
8484 return nullptr;
8585 }
86− unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) { return nullptr; }
87− bool stopApplication(const QString &appId) {
86+ unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }
87+ bool stopApplication(const QString &appId) override {
8888 Q_FOREACH(MockApp* app, m_list) {
8989 if (app->appId() == appId) {
9090 removeApplication(m_list.indexOf(app));
@@ -93,7 +93,7 @@ public:
9393 }
9494 return false;
9595 }
96− bool focusApplication(const QString &appId) {
96+ bool focusApplication(const QString &appId) override {
9797 Q_FOREACH(MockApp* app, m_list) {
9898 app->setFocused(app->appId() == appId);
9999 }
@@ -101,7 +101,7 @@ public:
101101 return true;
102102 }
103103
104− void unfocusCurrentApplication() { }
104+ void unfocusCurrentApplication() override { }
105105
106106 void addApplication(MockApp *app) {
107107 beginInsertRows(QModelIndex(), count(), count());
@@ -113,11 +113,11 @@ public:
113113 m_list.takeAt(index)->deleteLater();
114114 endRemoveRows();
115115 }
116− bool requestFocusApplication(const QString &appId) { Q_UNUSED(appId); return true; }
117− bool suspended() const { return false; }
118− void setSuspended(bool) {}
119− bool forceDashActive() const { return false; }
120− void setForceDashActive(bool) {}
116+ bool requestFocusApplication(const QString &appId) override { Q_UNUSED(appId); return true; }
117+ bool suspended() const override { return false; }
118+ void setSuspended(bool) override {}
119+ bool forceDashActive() const override { return false; }
120+ void setForceDashActive(bool) override {}
121121
122122private:
123123 QList<MockApp*> m_list;
tests/plugins/Utils/qlimitproxymodeltest.cpp+5−5
@@ -36,12 +36,12 @@ public:
3636 {
3737 }
3838
39− int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const
39+ int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const override
4040 {
4141 return m_list.size();
4242 }
4343
44− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const
44+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
4545 {
4646 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
4747 return QVariant();
@@ -49,7 +49,7 @@ public:
4949 return QVariant(m_list[index.row()]);
5050 }
5151
52− QHash<int, QByteArray> roleNames() const
52+ QHash<int, QByteArray> roleNames() const override
5353 {
5454 return m_roles;
5555 }
@@ -65,7 +65,7 @@ public:
6565 endRemoveRows();
6666 }
6767
68− bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
68+ bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
6969 beginInsertRows(parent, row, row+count-1);
7070 for (int i=0; i<count; i++) {
7171 m_list.insert(i+row, QString::number(i));
@@ -81,7 +81,7 @@ public:
8181 return true;
8282 }
8383
84− bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
84+ bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
8585 beginRemoveRows(parent, row, row+count-1);
8686 for (int i=0; i<count; i++) {
8787 m_list.removeAt(row);
tests/plugins/Utils/unitysortfilterproxymodeltest.cpp+5−5
@@ -39,12 +39,12 @@ public:
3939 {
4040 }
4141
42− int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const
42+ int rowCount(const QModelIndex& /* parent */ = QModelIndex()) const override
4343 {
4444 return m_list.size();
4545 }
4646
47− QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const
47+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
4848 {
4949 if (!index.isValid() || index.row() < 0 || index.row() >= m_list.size() || role != Qt::DisplayRole) {
5050 return QVariant();
@@ -52,7 +52,7 @@ public:
5252 return QVariant(m_list[index.row()]);
5353 }
5454
55− QHash<int, QByteArray> roleNames() const
55+ QHash<int, QByteArray> roleNames() const override
5656 {
5757 return m_roles;
5858 }
@@ -61,7 +61,7 @@ public:
6161 m_roles = roles;
6262 }
6363
64− bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
64+ bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
6565 beginInsertRows(parent, row, row+count-1);
6666 for (int i=0; i<count; i++) {
6767 m_list.insert(i+row, QString("test%1").arg(i));
@@ -77,7 +77,7 @@ public:
7777 return true;
7878 }
7979
80− bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) {
80+ bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override {
8181 beginRemoveRows(parent, row, row+count-1);
8282 for (int i=0; i<count; i++) {
8383 m_list.removeAt(row);
tests/utils/modules/Unity/Test/plugin.h+1−1
@@ -26,7 +26,7 @@ class UnityTestPlugin : public QQmlExtensionPlugin
2626 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
2727
2828public:
29− void registerTypes(const char *uri);
29+ void registerTypes(const char *uri) override;
3030};
3131
3232#endif // UNITY_TEST_PLUGIN_H