From 32aece82b1c6b7b4e31bba8a23515aa894cfcc69 Mon Sep 17 00:00:00 2001 From: Adenilson Cavalcanti Date: Sun, 1 Feb 2009 19:09:29 -0400 Subject: [PATCH] Adjusting class name plus member functions to akonadi coding style Patch by Igor. --- googledataresource.cpp | 32 +++++++++++++++++++++----------- googledataresource.h | 6 +++--- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/googledataresource.cpp b/googledataresource.cpp index 14a681c..f2501f7 100644 --- a/googledataresource.cpp +++ b/googledataresource.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include extern "C" { @@ -17,7 +18,7 @@ extern "C" { using namespace Akonadi; -googledataResource::googledataResource( const QString &id ) +GoogleDataResource::GoogleDataResource( const QString &id ) : ResourceBase( id ) { new SettingsAdaptor( Settings::self() ); @@ -30,14 +31,23 @@ googledataResource::googledataResource( const QString &id ) gcal_set_store_xml(gcal, 1); } -googledataResource::~googledataResource() +GoogleDataResource::~GoogleDataResource() { gcal_delete(gcal); gcal_cleanup_contacts(&all_contacts); } -void googledataResource::retrieveCollections() +void GoogleDataResource::retrieveCollections() { +// if ( mBaseResource == 0 ) { +// kError() << "No Google Contacts resource"; +// const QString message = i18nc( "@info:status", "No Google Contact configured yet" ); +// emit error( message ); + +// emit status( Broken, message ); +// return; +// } + Collection c; c.setParent(Collection::root()); c.setRemoteId("google-contacts"); @@ -53,7 +63,7 @@ void googledataResource::retrieveCollections() } -void googledataResource::retrieveItems( const Akonadi::Collection &collection ) +void GoogleDataResource::retrieveItems( const Akonadi::Collection &collection ) { Q_UNUSED( collection ); @@ -79,7 +89,7 @@ void googledataResource::retrieveItems( const Akonadi::Collection &collection ) itemsRetrieved(items); } -bool googledataResource::retrieveItem( const Akonadi::Item &item, const QSet &parts ) +bool GoogleDataResource::retrieveItem( const Akonadi::Item &item, const QSet &parts ) { Q_UNUSED( parts ); const QString entry_id = item.remoteId(); @@ -125,13 +135,13 @@ bool googledataResource::retrieveItem( const Akonadi::Item &item, const QSet &parts ) +void GoogleDataResource::itemChanged( const Akonadi::Item &item, const QSet &parts ) { KABC::Addressee addressee; @@ -219,7 +229,7 @@ void googledataResource::itemChanged( const Akonadi::Item &item, const QSet } -class googledataResource : public Akonadi::ResourceBase, +class GoogleDataResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::Observer { Q_OBJECT public: - googledataResource( const QString &id ); - ~googledataResource(); + GoogleDataResource( const QString &id ); + ~GoogleDataResource(); public Q_SLOTS: virtual void configure( WId windowId ); -- 2.11.4.GIT