[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim/work/akonadi-ports] krss/krss: use correct case,
From:       Frank Osterfeld <frank.osterfeld () kdab ! com>
Date:       2011-09-26 21:50:19
Message-ID: 20110926215019.17EF2A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 775daf07c32d9f4e024fa3f200d5ceb957e68601 by Frank Osterfeld.
Committed on 26/09/2011 at 23:48.
Pushed by osterfeld into branch 'work/akonadi-ports'.

use correct case, make unread counts work

M  +1    -1    krss/krss/rssitem.cpp
D  +0    -83   krss/krss/ui/feedlistdelegate.cpp
D  +0    -59   krss/krss/ui/feedlistdelegate.h

http://commits.kde.org/kdepim/775daf07c32d9f4e024fa3f200d5ceb957e68601

diff --git a/krss/krss/rssitem.cpp b/krss/krss/rssitem.cpp
index 15add2a..d438492 100644
--- a/krss/krss/rssitem.cpp
+++ b/krss/krss/rssitem.cpp
@@ -126,7 +126,7 @@ RssItem::Private::Private( const Private& other )
 
 QByteArray RssItem::flagRead()
 {
-    return "\\Seen";
+    return "\\SEEN";
 }
 
 QByteArray RssItem::flagImportant()
diff --git a/krss/krss/ui/feedlistdelegate.cpp b/krss/krss/ui/feedlistdelegate.cpp
deleted file mode 100644
index e095ba9..0000000
--- a/krss/krss/ui/feedlistdelegate.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-    This file is part of Akregator.
-
-    Copyright (C) 2007 Frank Osterfeld <frank.osterfeld@kdemail.net>
-    Copyright (C) 2009 Jonathan Marten <jjm@keelhaul.me.uk>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-    As a special exception, permission is given to link this program
-    with any edition of Qt, and distribute the resulting executable,
-    without including the source code for Qt in the source distribution.
-*/
-
-#include "feedlistdelegate.h"
-#include <Akonadi/EntityTreeModel>
-
-#include <KDebug>
-#include <KGlobalSettings>
-#include <KIconTheme>
-
-using namespace KRss;
-
-
-FeedListDelegate::FeedListDelegate( QWidget *parent )
-    : QStyledItemDelegate( parent )
-{
-    connect( KGlobalSettings::self(), SIGNAL( appearanceChanged() ),
-             SLOT( recalculateRowHeight() ) );
-    recalculateRowHeight();
-}
-
-
-FeedListDelegate::~FeedListDelegate()
-{
-}
-
-
-QSize FeedListDelegate::sizeHint( const QStyleOptionViewItem &option,
-                                  const QModelIndex &index ) const
-{
-    QSize size = QStyledItemDelegate::sizeHint( option, index );
-    size.setHeight( qMax( size.height(), ( m_viewIconHeight + 2 ) ) );
-    // +2 for row top/bottom margin
-    return ( size );
-}
-
-
-void FeedListDelegate::paint( QPainter *painter,
-                              const QStyleOptionViewItem &option,
-                              const QModelIndex &index ) const
-{
-    QStyleOptionViewItem newOption = option;
-    if ( index.data( Akonadi::EntityTreeModel::UnreadCountRole ).toInt() > 0 )
-    { // feed has unread articles
-        newOption.font.setBold(true);
-    }
-
-    // No need to translate the painter here - the item is vertically centered
-    // within its sizeHint rectangle.
-    QStyledItemDelegate::paint( painter, newOption, index );
-}
-
-
-void FeedListDelegate::recalculateRowHeight()
-{
-    const KIconTheme* iconTheme = KIconLoader::global()->theme();
-    m_viewIconHeight = iconTheme ? iconTheme->defaultSize( KIconLoader::Small ) : 0;
-}
-
-
-#include "feedlistdelegate.moc"
diff --git a/krss/krss/ui/feedlistdelegate.h b/krss/krss/ui/feedlistdelegate.h
deleted file mode 100644
index bc02443..0000000
--- a/krss/krss/ui/feedlistdelegate.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-    This file is part of Akregator.
-
-    Copyright (C) 2007 Frank Osterfeld <osterfeld@kde.org>
-    Copyright (C) 2009 Jonathan Marten <jjm@keelhaul.me.uk>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-    As a special exception, permission is given to link this program
-    with any edition of Qt, and distribute the resulting executable,
-    without including the source code for Qt in the source distribution.
-*/
-
-#ifndef KRSS_FeedListDELEGATE_H
-#define KRSS_FeedListDELEGATE_H
-
-#include <QStyledItemDelegate>
-
-namespace KRss {
-
-class FeedListDelegate : public QStyledItemDelegate
-{
-    Q_OBJECT
-
-public:
-    explicit FeedListDelegate(QWidget *parent = 0);
-    ~FeedListDelegate();
-
-protected:
-    QSize sizeHint( const QStyleOptionViewItem &option,
-                    const QModelIndex &index ) const;
-
-    void paint( QPainter *painter,
-                const QStyleOptionViewItem &option,
-                const QModelIndex &index ) const;
-
-private slots:
-    void recalculateRowHeight();
-
-private:
-    int m_viewIconHeight;
-};
-
-
-}
-
-#endif // AKREGATOR_FeedListDELEGATE_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic