mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Port away from deprecated QFlags(Zero) constructor
This change gets rid of a few GCC's -Wdeprecated-declarations warnings.
This commit is contained in:
committed by
Felix Kauselmann
parent
4dcbb958dc
commit
8af4c01a03
@ -101,11 +101,11 @@ QVariant ReadingListModel::data(const QModelIndex &index, int role) const
|
||||
Qt::ItemFlags ReadingListModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return 0;
|
||||
return {};
|
||||
|
||||
auto item = static_cast<ListItem *>(index.internalPointer());
|
||||
if (typeid(*item) == typeid(ReadingListSeparatorItem))
|
||||
return 0;
|
||||
return {};
|
||||
|
||||
if (typeid(*item) == typeid(ReadingListItem) && static_cast<ReadingListItem *>(item)->parent->getId() != 0)
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDropEnabled | Qt::ItemIsDragEnabled; //only sublists are dragable
|
||||
|
Reference in New Issue
Block a user