@@ -103,37 +103,22 @@ MockNotification* MockNotificationModel::getNotification(int id) const {
103103 return nullptr;
104104}
105105
106−MockNotification* MockNotificationModel::getNotification(const QString &summary) const {
107− for(int i=0; i < m_queue.size(); i++) {
108− if(m_queue[i]->getSummary() == summary) {
109− return m_queue[i];
110− }
111− }
112−
113− return nullptr;
114−}
115−
116−bool MockNotificationModel::hasNotification(int id) const {
117− return !(getNotification(id) != nullptr);
118−}
119−
120106void MockNotificationModel::remove(const int id) {
121107 for(int i = 0; i < m_queue.size(); i++) {
122108 if(m_queue[i]->getID() == id) {
123− deleteFromVisible(i);
109+ removeInternal(i);
124110 return;
125111 }
126112 }
127− // The ID was not found in any queue. Should it be an error case or not?
128113}
129114
130115void MockNotificationModel::removeSecond() {
131116 if(m_queue.size() < 2)
132117 return;
133− deleteFromVisible(1);
118+ removeInternal(1);
134119}
135120
136−void MockNotificationModel::deleteFromVisible(int loc) {
121+void MockNotificationModel::removeInternal(int loc) {
137122 QModelIndex deletePoint = QModelIndex();
138123 beginRemoveRows(deletePoint, loc, loc);
139124 m_queue.erase(m_queue.begin() + loc);