From kde-commits Mon Apr 30 23:28:40 2012 From: Allen Winter Date: Mon, 30 Apr 2012 23:28:40 +0000 To: kde-commits Subject: [kdepim-runtime] resources/google: last bit of minor style changes Message-Id: <20120430232840.02430A60D8 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133582866911324 Git commit 89a681b8bd1549181a4417cd95a4ed68925f6666 by Allen Winter. Committed on 01/05/2012 at 01:25. Pushed by winterz into branch 'master'. last bit of minor style changes M +8 -9 resources/google/calendar/calendarresource.h M +2 -2 resources/google/calendar/defaultreminderattribute.h M +7 -6 resources/google/calendar/resource_tasks.cpp M +4 -7 resources/google/calendar/tasklisteditor.cpp M +5 -6 resources/google/contacts/contactsresource.h M +2 -3 resources/google/contacts/settings.h http://commits.kde.org/kdepim-runtime/89a681b8bd1549181a4417cd95a4ed68925f6= 666 diff --git a/resources/google/calendar/calendarresource.h b/resources/googl= e/calendar/calendarresource.h index 11e7c3d..1571b2d 100644 --- a/resources/google/calendar/calendarresource.h +++ b/resources/google/calendar/calendarresource.h @@ -15,7 +15,6 @@ along with this program. If not, see . */ = - #ifndef GOOGLE_CALENDAR_CALENDARRESOURCE_H #define GOOGLE_CALENDAR_CALENDARRESOURCE_H = @@ -28,25 +27,23 @@ #include = namespace KGoogle { -class AccessManager; -class Account; -class Reply; -class Request; + class AccessManager; + class Account; + class Reply; + class Request; } = using namespace KGoogle; = class CalendarResource : public Akonadi::ResourceBase, public Akonadi::Age= ntBase::ObserverV2 { - - Q_OBJECT + Q_OBJECT public: CalendarResource( const QString &id ); ~CalendarResource(); = void configure( WId windowId ); = - public Q_SLOTS: void reloadConfig(); void retrieveCollections(); @@ -56,7 +53,9 @@ class CalendarResource : public Akonadi::ResourceBase, pu= blic Akonadi::AgentBase void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &= collection ); void itemChanged( const Akonadi::Item &item, const QSet< QByteArray >&= partIdentifiers ); void itemRemoved( const Akonadi::Item &item ); - void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &= collectionSource, const Akonadi::Collection &collectionDestination ); + void itemMoved( const Akonadi::Item &item, + const Akonadi::Collection &collectionSource, + const Akonadi::Collection &collectionDestination ); = protected: void aboutToQuit(); diff --git a/resources/google/calendar/defaultreminderattribute.h b/resourc= es/google/calendar/defaultreminderattribute.h index c35b82d..bce3735 100644 --- a/resources/google/calendar/defaultreminderattribute.h +++ b/resources/google/calendar/defaultreminderattribute.h @@ -16,7 +16,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1= 301 USA */ = - #ifndef GOOGLE_CALENDAR_DEFAULTREMINDERATTRIBUTE_H #define GOOGLE_CALENDAR_DEFAULTREMINDERATTRIBUTE_H = @@ -32,7 +31,8 @@ using namespace KGoogle; class DefaultReminderAttribute : public Akonadi::Attribute { public: - DefaultReminderAttribute( const Objects::Reminder::List &reminders =3D= Objects::Reminder::List() ); + DefaultReminderAttribute( + const Objects::Reminder::List &reminders =3D Objects::Reminder::List= () ); = Attribute *clone() const; void deserialize( const QByteArray &data ); diff --git a/resources/google/calendar/resource_tasks.cpp b/resources/googl= e/calendar/resource_tasks.cpp index 9a94dd9..e8fa1da 100644 --- a/resources/google/calendar/resource_tasks.cpp +++ b/resources/google/calendar/resource_tasks.cpp @@ -35,7 +35,6 @@ #include #include = - using namespace Akonadi; using namespace KGoogle; using namespace KCalCore; @@ -63,7 +62,6 @@ void CalendarResource::taskDoUpdate( Reply *reply ) m_gam->sendRequest( request ); } = - void CalendarResource::taskListReceived( KJob *job ) { if ( job->error() ) { @@ -81,8 +79,9 @@ void CalendarResource::taskListReceived( KJob *job ) = Objects::TaskList *taskList =3D static_cast< Objects::TaskList * >( re= plyData ); = - if ( !taskLists.contains( taskList->uid() ) ) + if ( !taskLists.contains( taskList->uid() ) ) { continue; + } = Collection collection; collection.setRemoteId( taskList->uid() ); @@ -191,7 +190,7 @@ void CalendarResource::taskCreated( KGoogle::Reply *rep= ly ) QList< Object * > data =3D reply->replyData(); if ( data.length() !=3D 1 ) { kWarning() << "Server send " << data.length() << "items, which is not = OK"; - cancelTask( i18n( "Expected a single item, server sent %1 items.", da= ta.length() ) ); + cancelTask( i18n( "Expected a single item, server sent %1 items.", dat= a.length() ) ); return; } = @@ -288,8 +287,10 @@ void CalendarResource::doRemoveTask( KJob *job ) Item item =3D job->property( "Item" ).value< Item >(); = /* Now finally we can safely remove the task we wanted to */ - Request *request =3D new Request( Services::Tasks::removeTaskUrl( item.p= arentCollection().remoteId(), item.remoteId() ), - KGoogle::Request::Remove, "Tasks", accou= nt ); + Request *request =3D + new Request( + Services::Tasks::removeTaskUrl( item.parentCollection().remoteId(), = item.remoteId() ), + KGoogle::Request::Remove, "Tasks", account ); request->setProperty( "Item", qVariantFromValue( item ) ); m_gam->sendRequest( request ); } diff --git a/resources/google/calendar/tasklisteditor.cpp b/resources/googl= e/calendar/tasklisteditor.cpp index 633bcd4..5599128 100644 --- a/resources/google/calendar/tasklisteditor.cpp +++ b/resources/google/calendar/tasklisteditor.cpp @@ -15,7 +15,6 @@ along with this program. If not, see . */ = - #include "tasklisteditor.h" #include "ui_tasklist_editor.h" = @@ -28,8 +27,9 @@ TasklistEditor::TasklistEditor( TaskList *taskList ): m_ui =3D new ::Ui::TaskListEditor(); m_ui->setupUi( this ); = - if ( m_taskList ) + if ( m_taskList ) { m_ui->nameEdit->setText( m_taskList->title() ); + } = connect( m_ui->buttons, SIGNAL(accepted()), this, SLOT(accepted()) ); @@ -42,14 +42,11 @@ TasklistEditor::~TasklistEditor() = void TasklistEditor::accepted() { - if ( !m_taskList ) + if ( !m_taskList ) { m_taskList =3D new KGoogle::Objects::TaskList; + } = m_taskList->setTitle( m_ui->nameEdit->text() ); = Q_EMIT accepted( m_taskList ); } - - - - diff --git a/resources/google/contacts/contactsresource.h b/resources/googl= e/contacts/contactsresource.h index 2d4f8ea..6e9be3c 100644 --- a/resources/google/contacts/contactsresource.h +++ b/resources/google/contacts/contactsresource.h @@ -15,7 +15,6 @@ along with this program. If not, see . */ = - #ifndef GOOGLE_CONTACTS_CONTACTSRESOURCE_H #define GOOGLE_CONTACTS_CONTACTSRESOURCE_H = @@ -29,9 +28,9 @@ #include = namespace KGoogle { -class AccessManager; -class Reply; -class Request; + class AccessManager; + class Reply; + class Request; }; = class QNetworkAccessManager; @@ -40,9 +39,9 @@ class QNetworkReply; using namespace KGoogle; = class ContactsResource: public Akonadi::ResourceBase, - public Akonadi::AgentBase::ObserverV2 + public Akonadi::AgentBase::ObserverV2 { - Q_OBJECT + Q_OBJECT = public: ContactsResource( const QString &id ); diff --git a/resources/google/contacts/settings.h b/resources/google/contac= ts/settings.h index 778246e..63429b7 100644 --- a/resources/google/contacts/settings.h +++ b/resources/google/contacts/settings.h @@ -15,7 +15,6 @@ along with this program. If not, see . */ = - #ifndef GOOGLE_CONTACTS_SETTINGS_H #define GOOGLE_CONTACTS_SETTINGS_H = @@ -32,8 +31,8 @@ */ class Settings: public SettingsBase { - Q_OBJECT - Q_CLASSINFO( "D-Bus Interface", "org.kde.Akonadi.GoogleContacts.Extend= edSettings" ) + Q_OBJECT + Q_CLASSINFO( "D-Bus Interface", "org.kde.Akonadi.GoogleContacts.Extended= Settings" ) public: Settings(); void setWindowId( WId id );