libnotificationmanager: fix the checkIndex after moving around functions

Fix in the f2e34dbbd3 got partially reverted by introduction
of AbstractNotificationsModel in 2357e6f2e1.
wilder-portage-prov
Bhushan Shah 6 years ago
parent 2357e6f2e1
commit dbc7bd3c30
  1. 4
      libnotificationmanager/abstractnotificationsmodel.cpp

@ -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;
}

Loading…
Cancel
Save