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

List:       kde-commits
Subject:    playground/pim/krss
From:       Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date:       2009-04-08 22:05:52
Message-ID: 1239228352.043492.24166.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 951312 by osterfeld:

build with gcc 4.0.1, XCode 3.1.2

 M  +3 -0      libkrss/item.h  
 M  +28 -28    libkrss/itemjobs.cpp  
 M  +9 -7      libkrss/itemjobs.h  
 M  +2 -1      libkrss/persistentfeed.cpp  
 M  +2 -2      libkrss/tagprovider.h  
 M  +1 -1      resources/newsgatorresource/newsgatorrssresource.cpp  
 M  +1 -1      resources/opmlresource/opmlrssresource.cpp  


--- trunk/playground/pim/krss/libkrss/item.h #951311:951312
@@ -252,8 +252,11 @@
 
 private:
     friend class ItemFetchJob;
+    friend class ItemFetchJobPrivate;
     friend class ItemModifyJob;
+    friend class ItemModifyJobPrivate;
     friend class ItemDeleteJob;
+    friend class ItemDeleteJobPrivate;
     friend class PersistentFeed;
     friend class PersistentFeedItemListJobImpl;
 
--- trunk/playground/pim/krss/libkrss/itemjobs.cpp #951311:951312
@@ -30,10 +30,10 @@
 
 using namespace KRss;
 
-class ItemFetchJob::Private
+class KRss::ItemFetchJobPrivate
 {
 public:
-    explicit Private( ItemFetchJob *qq )
+    explicit ItemFetchJobPrivate( ItemFetchJob *qq )
         : q( qq ) {}
 
     void doStart();
@@ -44,15 +44,15 @@
     Akonadi::ItemFetchScope m_fetchScope;
 };
 
-void ItemFetchJob::Private::doStart()
+void ItemFetchJobPrivate::doStart()
 {
     Akonadi::ItemFetchJob * const job = new Akonadi::ItemFetchJob( m_item.d->akonadiItem );
-    connect( job, SIGNAL( result( KJob* ) ), q, SLOT( slotItemFetched( KJob* ) ) );
+    q->connect( job, SIGNAL( result( KJob* ) ), q, SLOT( slotItemFetched( KJob* ) ) );
     job->setFetchScope( m_fetchScope );
     job->start();
 }
 
-void ItemFetchJob::Private::slotItemFetched( KJob *job )
+void ItemFetchJobPrivate::slotItemFetched( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemFetchJob::CouldNotFetchItem );
@@ -69,7 +69,7 @@
 }
 
 ItemFetchJob::ItemFetchJob( QObject *parent )
-    : KJob( parent ), d ( new Private( this ) )
+    : KJob( parent ), d ( new ItemFetchJobPrivate( this ) )
 {
 }
 
@@ -120,10 +120,10 @@
     QMetaObject::invokeMethod( this, "doStart", Qt::QueuedConnection );
 }
 
-class ItemModifyJob::Private
+class KRss::ItemModifyJobPrivate
 {
 public:
-    explicit Private( ItemModifyJob *qq )
+    explicit ItemModifyJobPrivate( ItemModifyJob *qq )
         : q( qq ), m_ignorePayload( false ) {}
 
     void doStart();
@@ -138,17 +138,17 @@
     Item m_oldItem;
 };
 
-void ItemModifyJob::Private::doStart()
+void ItemModifyJobPrivate::doStart()
 {
     Akonadi::ItemFetchJob * const job = new Akonadi::ItemFetchJob( m_itemToModify.d->akonadiItem );
     job->fetchScope().fetchFullPayload( false );
     job->fetchScope().fetchAllAttributes( false );
     job->fetchScope().fetchAttribute<TagIdsAttribute>( true );
-    connect( job, SIGNAL( result( KJob* ) ), q, SLOT( slotOldItemFetched( KJob* ) ) );
+    q->connect( job, SIGNAL( result( KJob* ) ), q, SLOT( slotOldItemFetched( KJob* ) ) );
     job->start();
 }
 
-void ItemModifyJob::Private::slotOldItemFetched( KJob *job )
+void ItemModifyJobPrivate::slotOldItemFetched( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemModifyJob::CouldNotFetchOldItem );
@@ -166,11 +166,11 @@
 
     Akonadi::ItemModifyJob * const mjob = new Akonadi::ItemModifyJob( m_itemToModify.d->akonadiItem );
     mjob->setIgnorePayload( m_ignorePayload );
-    connect( mjob, SIGNAL( result( KJob* ) ), q, SLOT( slotItemModified( KJob* ) ) );
+    q->connect( mjob, SIGNAL( result( KJob* ) ), q, SLOT( slotItemModified( KJob* ) ) );
     job->start();
 }
 
-void ItemModifyJob::Private::slotItemModified( KJob *job )
+void ItemModifyJobPrivate::slotItemModified( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemModifyJob::CouldNotModifyItem );
@@ -185,11 +185,11 @@
     m_itemToModify.d->akonadiItem = mjob->item();
 
     TagProviderRetrieveJob * const tjob = new TagProviderRetrieveJob();
-    connect( tjob, SIGNAL( result( KJob* ) ), q, SLOT( slotTagProviderRetrieved( KJob* ) ) );
+    q->connect( tjob, SIGNAL( result( KJob* ) ), q, SLOT( slotTagProviderRetrieved( KJob* ) ) );
     tjob->start();
 }
 
-void ItemModifyJob::Private::slotTagProviderRetrieved( KJob *job )
+void ItemModifyJobPrivate::slotTagProviderRetrieved( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemModifyJob::CouldNotRetrieveTagProvider );
@@ -215,11 +215,11 @@
     cjob->setReferrer( m_itemToModify );
     cjob->setAddedTags( toAdd.toList() );
     cjob->setRemovedTags( toRemove.toList() );
-    connect( cjob, SIGNAL( result( KJob* ) ), q, SLOT( slotReferencesModified( KJob* ) ) );
+    q->connect( cjob, SIGNAL( result( KJob* ) ), q, SLOT( slotReferencesModified( KJob* ) ) );
     cjob->start();
 }
 
-void ItemModifyJob::Private::slotReferencesModified( KJob *job )
+void ItemModifyJobPrivate::slotReferencesModified( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemModifyJob::CouldNotModifyTagReferences );
@@ -233,7 +233,7 @@
 
 
 ItemModifyJob::ItemModifyJob( QObject *parent ) :
-    KJob( parent ), d( new Private( this ) )
+    KJob( parent ), d( new ItemModifyJobPrivate( this ) )
 {
 }
 
@@ -296,10 +296,10 @@
 }
 
 
-class ItemDeleteJob::Private
+class KRss::ItemDeleteJobPrivate
 {
 public:
-    explicit Private( ItemDeleteJob *qq )
+    explicit ItemDeleteJobPrivate( ItemDeleteJob *qq )
         : q( qq ) {}
 
     void doStart();
@@ -311,14 +311,14 @@
     Item m_item;
 };
 
-void ItemDeleteJob::Private::doStart()
+void ItemDeleteJobPrivate::doStart()
 {
     TagProviderRetrieveJob * const tjob = new TagProviderRetrieveJob();
-    connect( tjob, SIGNAL( result( KJob* ) ), q, SLOT( slotTagProviderRetrieved( KJob* ) ) );
+    q->connect( tjob, SIGNAL( result( KJob* ) ), q, SLOT( slotTagProviderRetrieved( KJob* ) ) );
     tjob->start();
 }
 
-void ItemDeleteJob::Private::slotTagProviderRetrieved( KJob *job )
+void ItemDeleteJobPrivate::slotTagProviderRetrieved( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemDeleteJob::CouldNotRetrieveTagProvider );
@@ -332,11 +332,11 @@
     const TagProvider * const tp = tjob->tagProvider();
     TagDeleteReferencesJob * const cjob = tp->tagDeleteReferencesJob();
     cjob->setReferrer( m_item );
-    connect( cjob, SIGNAL( result( KJob* ) ), q, SLOT( slotReferencesDeleted( KJob* ) ) );
+    q->connect( cjob, SIGNAL( result( KJob* ) ), q, SLOT( slotReferencesDeleted( KJob* ) ) );
     cjob->start();
 }
 
-void ItemDeleteJob::Private::slotReferencesDeleted( KJob* job )
+void ItemDeleteJobPrivate::slotReferencesDeleted( KJob* job )
 {
     if ( job->error() ) {
         q->setError( ItemDeleteJob::CouldNotDeleteTagReferences );
@@ -346,11 +346,11 @@
     }
 
     Akonadi::ItemDeleteJob * const djob = new Akonadi::ItemDeleteJob( m_item.d->akonadiItem );
-    connect( djob, SIGNAL( result( KJob* ) ), q, SLOT( slotItemDeleted( KJob* ) ) );
+    q->connect( djob, SIGNAL( result( KJob* ) ), q, SLOT( slotItemDeleted( KJob* ) ) );
     djob->start();
 }
 
-void ItemDeleteJob::Private::slotItemDeleted( KJob *job )
+void ItemDeleteJobPrivate::slotItemDeleted( KJob *job )
 {
     if ( job->error() ) {
         q->setError( ItemDeleteJob::CouldNotDeleteItem );
@@ -362,7 +362,7 @@
 
 
 ItemDeleteJob::ItemDeleteJob( QObject *parent )
-    : KJob( parent ), d( new Private( this ) )
+    : KJob( parent ), d( new ItemDeleteJobPrivate( this ) )
 {
 }
 
--- trunk/playground/pim/krss/libkrss/itemjobs.h #951311:951312
@@ -29,6 +29,7 @@
 
 namespace KRss {
 
+class ItemFetchJobPrivate;
 class KRSS_EXPORT ItemFetchJob : public KJob
 {
     Q_OBJECT
@@ -51,14 +52,14 @@
     };
 
 private:
-    class Private;
-    Private * const d;
+    friend class ::KRss::ItemFetchJobPrivate;
+    ItemFetchJobPrivate * const d;
     Q_DISABLE_COPY( ItemFetchJob )
     Q_PRIVATE_SLOT( d, void doStart() )
     Q_PRIVATE_SLOT( d, void slotItemFetched( KJob* ) )
 };
 
-
+class ItemModifyJobPrivate;
 class KRSS_EXPORT ItemModifyJob : public KJob
 {
     Q_OBJECT
@@ -83,8 +84,8 @@
     };
 
 private:
-    class Private;
-    Private * const d;
+    friend class ::KRss::ItemModifyJobPrivate;
+    ItemModifyJobPrivate * const d;
     Q_DISABLE_COPY( ItemModifyJob )
     Q_PRIVATE_SLOT( d, void doStart() )
     Q_PRIVATE_SLOT( d, void slotOldItemFetched( KJob* ) )
@@ -94,6 +95,7 @@
 };
 
 
+class ItemDeleteJobPrivate;
 class KRSS_EXPORT ItemDeleteJob : public KJob
 {
     Q_OBJECT
@@ -115,8 +117,8 @@
     };
 
 private:
-    class Private;
-    Private * const d;
+    friend class ::KRss::ItemDeleteJobPrivate;
+    ItemDeleteJobPrivate * const d;
     Q_DISABLE_COPY( ItemDeleteJob )
     Q_PRIVATE_SLOT( d, void doStart() )
     Q_PRIVATE_SLOT( d, void slotTagProviderRetrieved( KJob* ) )
--- trunk/playground/pim/krss/libkrss/persistentfeed.cpp #951311:951312
@@ -19,6 +19,7 @@
 #include "persistentfeed_p.h"
 #include "item_p.h"
 #include "resource.h"
+#include "itemjobs.h"
 
 #include <akonadi/itemfetchjob.h>
 #include <akonadi/collectionfetchjob.h>
@@ -226,7 +227,7 @@
 }
 
 void PersistentFeedItemListJobImpl::start() {
-    ItemFetchJob *job = new ItemFetchJob( m_feed->feedCollection(), this );
+    Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( m_feed->feedCollection(), this );
     if ( !m_fetchScope.isEmpty() )
         job->setFetchScope( m_fetchScope );
     connect(job, SIGNAL(finished(KJob*)), this, SLOT(jobDone(KJob*)) );
--- trunk/playground/pim/krss/libkrss/tagprovider.h #951311:951312
@@ -73,8 +73,8 @@
     // when creating/modifying/deleting feeds/articles
     friend class PersistentFeedModifyJobPrivate;
     friend class PersistentFeedDeleteJobPrivate;
-    friend class ItemModifyJob;
-    friend class ItemDeleteJob;
+    friend class ItemModifyJobPrivate;
+    friend class ItemDeleteJobPrivate;
     Q_DISABLE_COPY( TagProvider )
 };
 
--- trunk/playground/pim/krss/resources/newsgatorresource/newsgatorrssresource.cpp #951311:951312
@@ -120,7 +120,7 @@
     return job;
 }
 
-ItemModifyJob* NewsgatorRssResource::itemModifyJob() const
+KRssResource::ItemModifyJob* NewsgatorRssResource::itemModifyJob() const
 {
     NewsgatorItemModifyJob *job = new NewsgatorItemModifyJob();
     job->setUserName( m_userName );
--- trunk/playground/pim/krss/resources/opmlresource/opmlrssresource.cpp #951311:951312
@@ -107,7 +107,7 @@
     return job;
 }
 
-ItemModifyJob* OpmlRssResource::itemModifyJob() const
+KRssResource::ItemModifyJob* OpmlRssResource::itemModifyJob() const
 {
     OpmlItemModifyJob * const job = new OpmlItemModifyJob();
     job->setPath( m_path );
[prev in list] [next in list] [prev in thread] [next in thread] 

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