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

List:       kde-commits
Subject:    [kdepim-runtime/akregator_port] plugins: These fields are part of the headers part, so clear them be
From:       Frank Osterfeld <osterfeld () kde ! org>
Date:       2012-04-03 18:04:57
Message-ID: 20120403180457.3AD3EA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 8d55c0ab2693a25fca87d0a3661b2e0beff04927 by Frank Osterfeld.
Committed on 03/04/2012 at 20:02.
Pushed by osterfeld into branch 'akregator_port'.

These fields are part of the headers part, so clear them before reading the headers, \
not before reading the content.

M  +6    -4    plugins/rssitemserializer_xml.cpp

http://commits.kde.org/kdepim-runtime/8d55c0ab2693a25fca87d0a3661b2e0beff04927

diff --git a/plugins/rssitemserializer_xml.cpp b/plugins/rssitemserializer_xml.cpp
index ec961ba..038f936 100644
--- a/plugins/rssitemserializer_xml.cpp
+++ b/plugins/rssitemserializer_xml.cpp
@@ -390,15 +390,17 @@ bool KRss::RssItemSerializer::deserialize( KRss::RssItem& item, \
const QByteArray  const bool readHeaders = ( part & Headers ) != 0;
     const bool readContent = ( part & Content ) != 0;
 
-    if ( readHeaders )
+    if ( readHeaders ) {
         item.setHeadersLoaded( true );
+        item.setAuthors(QList<Person>());
+        item.setCategories(QList<Category>());
+        item.setEnclosures(QList<Enclosure>());
+    }
 
     if ( readContent ) {
         item.setContentLoaded( true );
-        item.setEnclosures(QList<Enclosure>());
-        item.setCategories(QList<Category>());
-        item.setAuthors(QList<Person>());
     }
+
     while ( !reader.atEnd() )
     {
         reader.readNext();


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

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