summaryrefslogtreecommitdiff
path: root/libsowatch/notificationsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsowatch/notificationsmodel.cpp')
-rw-r--r--libsowatch/notificationsmodel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsowatch/notificationsmodel.cpp b/libsowatch/notificationsmodel.cpp
index ce0a2fb..86adabc 100644
--- a/libsowatch/notificationsmodel.cpp
+++ b/libsowatch/notificationsmodel.cpp
@@ -112,6 +112,7 @@ int NotificationsModel::fullCountByType(int type) const
Notification* NotificationsModel::getMostRecentByType(Notification::Type type) const
{
if (!_list[type].empty()) {
+ qDebug() << "Returning most recent" << _list[type].first();
// TODO Actually get the most recent (sort by date)
return _list[type].first();
} else {
@@ -119,10 +120,10 @@ Notification* NotificationsModel::getMostRecentByType(Notification::Type type) c
}
}
-Notification* NotificationsModel::getMostRecentByType(int type) const
+QObject* NotificationsModel::getMostRecentByType(int type) const
{
Q_ASSERT(type >= 0 && type < Notification::TypeCount);
- return getMostRecentByType(static_cast<Notification::Type>(type));
+ return static_cast<QObject*>(getMostRecentByType(static_cast<Notification::Type>(type)));
}
Notification::Type NotificationsModel::getTypeOfDeletedNotification(Notification *n) const