Commit 879c0cf9 authored by Tobias Koenig's avatar Tobias Koenig
Browse files

coding style cleanup

svn path=/trunk/KDE/kdepim/runtime/; revision=1202331
parent 93827ef5
...@@ -21,14 +21,15 @@ ...@@ -21,14 +21,15 @@
#include <akonadi/agentfactory.h> #include <akonadi/agentfactory.h>
#include <akonadi/changerecorder.h> #include <akonadi/changerecorder.h>
#include <KMime/Message> #include <akonadi/entitydisplayattribute.h>
#include <akonadi/itemfetchscope.h> #include <akonadi/itemfetchscope.h>
#include <KNotification>
#include <KLocalizedString>
#include <akonadi/kmime/messagestatus.h> #include <akonadi/kmime/messagestatus.h>
#include <akonadi/entitydisplayattribute.h> #include <KLocalizedString>
#include <KMime/Message>
#include <KNotification>
NewMailNotifierAgent::NewMailNotifierAgent(const QString& id) : AgentBase(id) NewMailNotifierAgent::NewMailNotifierAgent( const QString &id )
: AgentBase( id )
{ {
changeRecorder()->setMimeTypeMonitored( KMime::Message::mimeType() ); changeRecorder()->setMimeTypeMonitored( KMime::Message::mimeType() );
changeRecorder()->itemFetchScope().setCacheOnly( true ); changeRecorder()->itemFetchScope().setCacheOnly( true );
...@@ -38,17 +39,19 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString& id) : AgentBase(id) ...@@ -38,17 +39,19 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString& id) : AgentBase(id)
m_timer.setInterval( 30 * 1000 ); m_timer.setInterval( 30 * 1000 );
m_timer.setSingleShot( true ); m_timer.setSingleShot( true );
connect( &m_timer, SIGNAL(timeout()), SLOT(showNotifications()) ); connect( &m_timer, SIGNAL( timeout() ), SLOT( showNotifications() ) );
} }
void NewMailNotifierAgent::itemAdded(const Akonadi::Item& item, const Akonadi::Collection& collection) void NewMailNotifierAgent::itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection )
{ {
Akonadi::MessageStatus status; Akonadi::MessageStatus status;
status.setStatusFromFlags( item.flags() ); status.setStatusFromFlags( item.flags() );
if ( status.isRead() ) if ( status.isRead() )
return; return;
if ( !m_timer.isActive() ) if ( !m_timer.isActive() )
m_timer.start(); m_timer.start();
m_newMails[collection]++; m_newMails[collection]++;
} }
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#ifndef NEWMAILNOTIFIERAGENT_H #ifndef NEWMAILNOTIFIERAGENT_H
#define NEWMAILNOTIFIERAGENT_H #define NEWMAILNOTIFIERAGENT_H
#include <Akonadi/Collection>
#include <akonadi/agentbase.h> #include <akonadi/agentbase.h>
#include <akonadi/collection.h>
#include <QtCore/QTimer> #include <QtCore/QTimer>
...@@ -30,8 +30,8 @@ class NewMailNotifierAgent : public Akonadi::AgentBase, public Akonadi::AgentBas ...@@ -30,8 +30,8 @@ class NewMailNotifierAgent : public Akonadi::AgentBase, public Akonadi::AgentBas
Q_OBJECT Q_OBJECT
public: public:
NewMailNotifierAgent(const QString& id); NewMailNotifierAgent( const QString &id );
void itemAdded(const Akonadi::Item& item, const Akonadi::Collection& collection); void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
private slots: private slots:
void showNotifications(); void showNotifications();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment