diff --git a/src/core/messagesmodel.h b/src/core/messagesmodel.h index fea678e2d..fa65596a3 100755 --- a/src/core/messagesmodel.h +++ b/src/core/messagesmodel.h @@ -28,9 +28,10 @@ #include +// Represents single enclosure struct Enclosure { - QString m_mimeType; QString m_url; + QString m_mimeType; explicit Enclosure(const QString &url = QString(), const QString &mime = QString()) : m_url(url), m_mimeType(mime) { } diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index e8d8c9f37..1993bb026 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -200,65 +200,4 @@ class FeedsView : public QTreeView { int m_globalAutoUpdateRemainingInterval; }; -/* -class Delegate : public QStyledItemDelegate { - public: - explicit Delegate(FeedsView *view, QObject *parent = 0) : QStyledItemDelegate(parent) { - this->view = view; - } - - // QAbstractItemDelegate interface - public: - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const - { - //QStyledItemDelegate::paint(painter, option, index); - - QSize size = sizeHint(option, index); - - int width = qMin(size.width(), option.rect.width()) - 4; - int height = qMin(size.height(), option.rect.height()) - 4; - int left = option.rect.left() + ((option.rect.width() - width) / 2.0); - int top = option.rect.top() + ((option.rect.height() - height) / 2.0); - - QRect target_rect = QRect(left, top, width, height); - - painter->save(); - - //if ((option.state & QStyle::State_MouseOver) == 0 && (option.state & QStyle::State_Selected) == 0) { - painter->setPen(QPen(QColor(Qt::black))); - painter->setRenderHint(QPainter::Antialiasing, false); - painter->setBrush(QBrush(Qt::lightGray)); - //} - - - - QString str = view->sourceModel()->data(view->model()->mapToSource(index), Qt::DisplayRole).toString(); - - painter->drawRect(target_rect); - painter->drawText(target_rect, str, QTextOption(Qt::AlignCenter)); - - painter->restore(); - } - - // QStyledItemDelegate interface - public: - QString displayText(const QVariant &value, const QLocale &locale) const - { - return value.toString(); - } - - // QAbstractItemDelegate interface - public: - QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const - { - QSize base_size = QStyledItemDelegate::sizeHint(option, index); - - return base_size; - } - - private: - FeedsView *view; -}; -*/ - #endif // FEEDSVIEW_H