@@ -42,8 +42,11 @@ int MockNotificationModel::rowCount(const QModelIndex &parent) const {
42 return m_queue.size();
42 return m_queue.size();
45+int MockNotificationModel::getCount() const {
46+ return m_queue.size();
45QVariant MockNotificationModel::data(const QModelIndex &index, int role) const {
49QVariant MockNotificationModel::data(const QModelIndex &index, int role) const {
46− qDebug() << "::data()";
47 if (!index.isValid())
50 if (!index.isValid())
48 return QVariant();
51 return QVariant();
@@ -89,7 +92,6 @@ void MockNotificationModel::append(MockNotification* n) {
89 beginInsertRows(insertionPoint, location, location);
92 beginInsertRows(insertionPoint, location, location);
90 m_queue.insert(location, n);
93 m_queue.insert(location, n);
91 endInsertRows();
94 endInsertRows();
92− qDebug() << "queue-size:" << m_queue.size();
95MockNotification* MockNotificationModel::getNotification(unsigned int id) const {
97MockNotification* MockNotificationModel::getNotification(unsigned int id) const {
@@ -116,7 +118,7 @@ bool MockNotificationModel::hasNotification(unsigned int id) const {
116 return !(getNotification(id) != nullptr);
118 return !(getNotification(id) != nullptr);
119−void MockNotificationModel::removeNotification(const unsigned int id) {
121+void MockNotificationModel::remove(const unsigned int id) {
120 for(int i = 0; i < m_queue.size(); i++) {
122 for(int i = 0; i < m_queue.size(); i++) {
121 if(m_queue[i]->getID() == id) {
123 if(m_queue[i]->getID() == id) {
122 deleteFromVisible(i);
124 deleteFromVisible(i);
@@ -140,7 +142,6 @@ void MockNotificationModel::deleteFromVisible(int loc) {
142MockNotification* MockNotificationModel::getRaw(const unsigned int notificationId) const {
144MockNotification* MockNotificationModel::getRaw(const unsigned int notificationId) const {
143− qDebug() << "::getRaw()";
144 for(int i = 0; i < m_queue.size(); i++) {
145 for(int i = 0; i < m_queue.size(); i++) {
145 if(m_queue[i]->getID() == notificationId) {
146 if(m_queue[i]->getID() == notificationId) {
146 MockNotification* n = m_queue[i];
147 MockNotification* n = m_queue[i];