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

List:       kde-commits
Subject:    [kdepim/akregator_port] krss: display the feed title if available
From:       Frank Osterfeld <frank.osterfeld () kdab ! com>
Date:       2011-07-27 12:12:13
Message-ID: 20110727121213.19BCDA6133 () git ! kde ! org
[Download RAW message or body]

Git commit 45ac2ff4ddcd307ed9c3446afaee66c3bd35e874 by Frank Osterfeld.
Committed on 12/07/2011 at 23:10.
Pushed by cgiboudeaux into branch 'akregator_port'.

display the feed title if available instead of the mangled collection
name.

M  +6    -1    krss/feeditemmodel.cpp

http://commits.kde.org/kdepim/45ac2ff4ddcd307ed9c3446afaee66c3bd35e874

diff --git a/krss/feeditemmodel.cpp b/krss/feeditemmodel.cpp
index 1c10784..1023ca0 100644
--- a/krss/feeditemmodel.cpp
+++ b/krss/feeditemmodel.cpp
@@ -15,7 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
+#include "feedcollection.h"
 #include "feeditemmodel.h"
 #include "rssitem.h"
 #include "person.h"
@@ -129,6 +129,11 @@ QVariant FeedItemModel::entityData( const Akonadi::Item &akonadiItem, int column
 }
 
 QVariant FeedItemModel::entityData( const Collection &collection, int column, int role ) const {
+    if ( role == Qt::DisplayRole && column == FeedTitleColumn ) {
+        const QString title = FeedCollection( collection ).title();
+        if ( !title.isEmpty() )
+            return title;
+    }
     return EntityTreeModel::entityData( collection, column, role );
 }
 


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

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