[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kblog
From: Mehrdad Momeny <mehrdad.momeny () gmail ! com>
Date: 2009-02-26 11:35:03
Message-ID: 1235648103.179563.23363.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 932331 by momeny:
Fix missing support for tags/labels on GData::listRecentPosts() output!
M +12 -0 gdata.cpp
--- trunk/KDE/kdepimlibs/kblog/gdata.cpp #932330:932331
@@ -26,6 +26,7 @@
#include <syndication/loader.h>
#include <syndication/item.h>
+#include <syndication/category.h>
#include <kio/netaccess.h>
#include <kio/http.h>
@@ -724,6 +725,17 @@
post.setTitle( ( *it )->title() );
post.setContent( ( *it )->content() );
post.setLink( ( *it )->link() );
+ QStringList labels;
+ int catCount = ( *it )->categories().count();
+ QList< Syndication::CategoryPtr > cats = ( *it )->categories();
+ for(int i=0; i < catCount; ++i) {
+ if(cats[i].get()->label().isEmpty()){
+ labels.append(cats[i].get()->term());
+ } else {
+ labels.append(cats[i].get()->label());
+ }
+ }
+ post.setTags(labels);
// FIXME: assuming UTC for now
post.setCreationDateTime(
KDateTime( QDateTime::fromTime_t( ( *it )->datePublished() ),
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic