Commit dbc7bd3c authored by Bhushan Shah's avatar Bhushan Shah 📱

libnotificationmanager: fix the checkIndex after moving around functions

Fix in the f2e34dbb got partially reverted by introduction
of AbstractNotificationsModel in 2357e6f2.
parent 2357e6f2
......@@ -197,7 +197,7 @@ void AbstractNotificationsModel::setLastRead(const QDateTime &lastRead)
QVariant AbstractNotificationsModel::data(const QModelIndex &index, int role) const
{
if (!checkIndex(index)) {
if (!checkIndex(index, QAbstractItemModel::CheckIndexOption::IndexIsValid)) {
return QVariant();
}
......@@ -267,7 +267,7 @@ QVariant AbstractNotificationsModel::data(const QModelIndex &index, int role) co
bool AbstractNotificationsModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (!checkIndex(index)) {
if (!checkIndex(index, QAbstractItemModel::CheckIndexOption::IndexIsValid)) {
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment