From 4eb76509a8359f54e6e97002aceea01ec10943c6 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 30 Oct 2015 11:01:35 +0100 Subject: [PATCH] Remove flags method. --- src/core/feedsmodel.cpp | 20 -------------------- src/core/feedsmodel.h | 1 - 2 files changed, 21 deletions(-) diff --git a/src/core/feedsmodel.cpp b/src/core/feedsmodel.cpp index 183ce17dd..7eab47079 100755 --- a/src/core/feedsmodel.cpp +++ b/src/core/feedsmodel.cpp @@ -138,26 +138,6 @@ void FeedsModel::updateAutoUpdateStatus() { } } -Qt::ItemFlags FeedsModel::flags(const QModelIndex &index) const { - Qt::ItemFlags base_flags = QAbstractItemModel::flags(index); - RootItem *item_for_index = itemForIndex(index); - - switch (item_for_index->kind()) { - case RootItem::Bin: - return base_flags; - - case RootItem::Cattegory: - return base_flags | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; - - case RootItem::Feeed: - return base_flags | Qt::ItemIsDragEnabled; - - case RootItem::Root: - default: - return base_flags | Qt::ItemIsDropEnabled; - } -} - QVariant FeedsModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation != Qt::Horizontal) { return QVariant(); diff --git a/src/core/feedsmodel.h b/src/core/feedsmodel.h index c0b8114d7..215bb9057 100755 --- a/src/core/feedsmodel.h +++ b/src/core/feedsmodel.h @@ -55,7 +55,6 @@ class FeedsModel : public QAbstractItemModel { return itemForIndex(index)->data(index.column(), role); } - Qt::ItemFlags flags(const QModelIndex &index) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; QModelIndex index(int row, int column, const QModelIndex &parent) const; QModelIndex parent(const QModelIndex &child) const;