mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Return Qt::NoItemFlags instead of nullptr
This commit is contained in:
parent
509b33e991
commit
fdd98fc012
@ -57,7 +57,7 @@ QVariant LocalComicListModel::data(const QModelIndex &index, int role) const
|
||||
Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return nullptr;
|
||||
return Qt::NoItemFlags;
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ void LocalComicListModel::moveSelectionUp(const QList<QModelIndex> &selectedInde
|
||||
beginMoveRows(mi.parent(), sourceRow, sourceLastRow, mi.parent(), destRow);
|
||||
|
||||
for (int i = sourceRow; i <= sourceLastRow; i++)
|
||||
_data.swap(i, i - 1);
|
||||
_data.swapItemsAt(i, i - 1);
|
||||
|
||||
endMoveRows();
|
||||
}
|
||||
@ -163,7 +163,7 @@ void LocalComicListModel::moveSelectionDown(const QList<QModelIndex> &selectedIn
|
||||
beginMoveRows(mi.parent(), sourceRow, sourceLastRow, mi.parent(), destRow + 1);
|
||||
|
||||
for (int i = sourceLastRow; i >= sourceRow; i--)
|
||||
_data.swap(i, i + 1);
|
||||
_data.swapItemsAt(i, i + 1);
|
||||
|
||||
endMoveRows();
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ QVariant VolumeComicsModel::data(const QModelIndex &index, int role) const
|
||||
Qt::ItemFlags VolumeComicsModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return nullptr;
|
||||
return Qt::NoItemFlags;
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ QVariant VolumesModel::data(const QModelIndex &index, int role) const
|
||||
Qt::ItemFlags VolumesModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return nullptr;
|
||||
return Qt::NoItemFlags;
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user