on xenial help sign in
Fix some warnings in Mock Notifications
commit014a6cf3435a05926d39b9fbbe4d192c42b10d05 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 20 Feb 2015, 17:52 (12 years ago) parent1e7da17
4 files changed+8−3
tests/mocks/Unity/Notifications/MockActionModel.cpp+1−1 tests/mocks/Unity/Notifications/MockNotification.cpp+4 tests/mocks/Unity/Notifications/MockNotification.h+2−1 tests/mocks/Unity/Notifications/MockNotificationModel.cpp+1−1
tests/mocks/Unity/Notifications/MockActionModel.cpp+1−1
@@ -30,7 +30,7 @@ ActionModel::ActionModel(QObject *parent) : QStringListModel(parent), p(new Acti
3030ActionModel::~ActionModel() {
3131}
3232
33−int ActionModel::rowCount(const QModelIndex &index) const {
33+int ActionModel::rowCount(const QModelIndex &) const {
3434 return p->labels.size();
3535}
3636
tests/mocks/Unity/Notifications/MockNotification.cpp+4
@@ -140,6 +140,10 @@ ActionModel* MockNotification::getActions() const {
140140 return p->actionsModel;
141141}
142142
143+QStringList MockNotification::rawActions() const {
144+ return p->actions;
145+}
146+
143147void MockNotification::setActions(const QStringList &actions) {
144148 if(p->actions != actions) {
145149 p->actions = actions;
tests/mocks/Unity/Notifications/MockNotification.h+2−1
@@ -38,7 +38,7 @@ class MockNotification : public QObject {
3838 Q_PROPERTY(QString icon READ getIcon WRITE setIcon NOTIFY iconChanged)
3939 Q_PROPERTY(QString secondaryIcon READ getSecondaryIcon WRITE setSecondaryIcon NOTIFY secondaryIconChanged)
4040 Q_PROPERTY(Type type READ getType WRITE setType NOTIFY typeChanged)
41− Q_PROPERTY(QStringList rawActions WRITE setActions)
41+ Q_PROPERTY(QStringList rawActions READ rawActions WRITE setActions)
4242 Q_PROPERTY(ActionModel* actions READ getActions NOTIFY actionsChanged)
4343 Q_PROPERTY(QVariantMap hints READ getHints WRITE setHints NOTIFY hintsChanged)
4444
@@ -83,6 +83,7 @@ public:
8383 Type getType() const;
8484 void setType(Type type);
8585 ActionModel* getActions() const;
86+ QStringList rawActions() const;
8687 void setActions(const QStringList &actions);
8788 QVariantMap getHints() const;
8889 void setHints(const QVariantMap& hints);
tests/mocks/Unity/Notifications/MockNotificationModel.cpp+1−1
@@ -37,7 +37,7 @@ MockNotificationModel::MockNotificationModel(QObject *parent) : QAbstractListMod
3737MockNotificationModel::~MockNotificationModel() {
3838}
3939
40−int MockNotificationModel::rowCount(const QModelIndex &parent) const {
40+int MockNotificationModel::rowCount(const QModelIndex &) const {
4141 return m_queue.size();
4242}
4343