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

List:       kde-commits
Subject:    playground/pim/krss/resource
From:       Dmitry Ivanov <vonami () gmail ! com>
Date:       2008-06-22 19:41:25
Message-ID: 1214163685.411711.17873.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 823192 by divanov:

User xmlUrl + remoteId as a collection name to allow the user
to have duplicate feeds.


 M  +5 -5      rssresource.cpp  


--- trunk/playground/pim/krss/resource/rssresource.cpp #823191:823192
@@ -61,10 +61,10 @@
 QString RssResource::addFeed( const QString &xmlUrl, const QString \
&subscriptionLabel )  {
         Akonadi::Collection col;
-        col.setName( xmlUrl );
         col.setParent( m_rootCollection );
         col.setContentMimeTypes( QStringList( "application/rss+xml" ) );
         col.setRemoteId( KRandom::randomString( 10 ) );
+        col.setName( xmlUrl + '_' + col.remoteId() );
         col.attribute<FeedPropertiesCollectionAttribute>( \
                Akonadi::Collection::AddIfMissing )->setXmlUrl( xmlUrl );
         col.attribute<SubscriptionLabelsCollectionAttribute>( \
Akonadi::Collection::AddIfMissing )->addSubscriptionLabel( subscriptionLabel );  
@@ -474,7 +474,7 @@
         if ( ( status == Syndication::InvalidXml ) && (m_fetchTries < 3 ) && ( \
loader->discoveredFeedURL().isValid() ) ) {  kDebug() << "Refetching by discovered \
feed url";  QString newUrl = loader->discoveredFeedURL().url();
-                m_currentCollection.setName( newUrl );
+                m_currentCollection.setName( newUrl + '_' + \
                m_currentCollection.remoteId() );
                 m_currentCollection.attribute<FeedPropertiesCollectionAttribute>()->setXmlUrl( \
newUrl );  m_fetchTries++;
                 fetchFeedProperties( newUrl );
@@ -606,8 +606,8 @@
                 // start with creating the root collection
                 Collection root;
                 root.setParent( Collection::root() );
-                root.setRemoteId( path );
-                root.setName( "RSS subscriptions" );
+                root.setRemoteId( KRandom::randomString( 10 ) );
+                root.setName( "RSS subscriptions_" + root.remoteId() );
                 root.setContentMimeTypes( QStringList( Collection::mimeType() ) );
 
                 Akonadi::CollectionCreateJob *job = new \
Akonadi::CollectionCreateJob( root ); @@ -753,8 +753,8 @@
                 kDebug() << "Feed:" << xmlUrl;
                 isFolder = false;
                 Collection col;
-                col.setName( xmlUrl );
                 col.setRemoteId( KRandom::randomString( 10 ) );
+                col.setName( xmlUrl + '_' + col.remoteId() );
                 col.setParent( m_rootCollection );
                 col.setContentMimeTypes( QStringList( "application/rss+xml" ) );
 


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

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