Commit 3e5c2b76 authored by Kevin Krammer's avatar Kevin Krammer
Browse files

Several EBN Krazy fixes

Fixing various issues found by the EnglishBreakfastNetwork's
code checker Krazy.

Submitted by Mohammed Nafees <nafees.technocool@gmail.com>, completing
a Google Code-in task.

CCMAIL: nafees.technocool@gmail.com
REVIEW: 107719
DIGEST: Google Code-in contribution
parent ec58a89e
......@@ -32,7 +32,7 @@ class LoadPage : public Page
{
Q_OBJECT
public:
LoadPage( KAssistantDialog *parent );
explicit LoadPage( KAssistantDialog *parent );
virtual void enterPageNext();
virtual void enterPageBack();
......
......@@ -29,7 +29,7 @@ class Page : public QWidget
{
Q_OBJECT
public:
Page( KAssistantDialog *parent );
explicit Page( KAssistantDialog *parent );
void setPageWidgetItem( KPageWidgetItem *item );
......
......@@ -138,7 +138,7 @@ void ProviderPage::findDesktopAndSetAssistant( const QStringList& list )
{
foreach ( const QString& file, list ) {
kDebug() << file;
if ( file.endsWith( ".desktop" ) ) {
if ( file.endsWith( QLatin1String ( ".desktop" ) ) ) {
kDebug() << "Yay, a desktop file!" << file;
Global::setAssistant( file );
m_newPageReady = true;
......
......@@ -30,7 +30,7 @@ class ServerTest : public QObject
{
Q_OBJECT
public:
ServerTest( QObject *parent );
explicit ServerTest( QObject *parent );
~ServerTest();
public slots:
......
......@@ -26,7 +26,7 @@ class SetupObject : public QObject
{
Q_OBJECT
public:
SetupObject( QObject *parent );
explicit SetupObject( QObject *parent );
virtual void create() = 0;
virtual void destroy() = 0;
......
......@@ -31,7 +31,7 @@ class ConfigDialog : public KDialog
Q_OBJECT
public:
ConfigDialog( QWidget *parent = 0 );
explicit ConfigDialog( QWidget *parent = 0 );
private Q_SLOTS:
void save();
......
......@@ -37,7 +37,7 @@ class MailDispatcherAgent : public Akonadi::AgentBase
Q_CLASSINFO( "D-Bus Interface", "org.freedesktop.Akonadi.MailDispatcherAgent" )
public:
MailDispatcherAgent( const QString &id );
explicit MailDispatcherAgent( const QString &id );
~MailDispatcherAgent();
public Q_SLOTS:
......
......@@ -33,7 +33,7 @@ class SentActionHandler : public QObject
Q_OBJECT
public:
SentActionHandler( QObject *parent = 0 );
explicit SentActionHandler( QObject *parent = 0 );
void runAction( const MailTransport::SentActionAttribute::Action &action );
......
......@@ -42,8 +42,8 @@
#include <boost/shared_ptr.hpp>
#define TIMEOUT_SECONDS 60
#define MAXCOUNT 99 // must be 2-digit!
static const int TIMEOUT_SECONDS = 60;
static const int MAXCOUNT = 99; // must be 2-digit!
using namespace Akonadi;
using namespace KMime;
......
......@@ -34,7 +34,6 @@
#include <akonadi/itemfetchjob.h>
#include <akonadi/itemfetchscope.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/entityhiddenattribute.h>
#include <nepomuk2/simpleresource.h>
#include <nepomuk2/simpleresourcegraph.h>
......
......@@ -79,7 +79,7 @@ class NepomukFeederAgent : public Akonadi::AgentBase, public Akonadi::AgentBase:
Q_OBJECT
public:
NepomukFeederAgent(const QString& id);
explicit NepomukFeederAgent(const QString& id);
~NepomukFeederAgent();
/**
......
......@@ -30,7 +30,7 @@ class FeederPluginloader
{
private:
FeederPluginloader(){};
FeederPluginloader(FeederPluginloader const&); // Don't Implement
explicit FeederPluginloader(FeederPluginloader const&); // Don't Implement
void operator=(FeederPluginloader const&); // Don't implement
public:
static FeederPluginloader &instance()
......
......@@ -27,8 +27,6 @@
#include <kabc/contactgroup.h>
#include <Nepomuk2/Vocabulary/NCO>
#include <Nepomuk2/Vocabulary/NIE>
#include <Soprano/Vocabulary/NAO>
#include <KUrl>
#include <KStandardDirs>
......
......@@ -21,8 +21,8 @@
*/
#ifndef NEPOMUKNOTEFEEDER_H
#define NEPOMUKNOTEFEEDER_H
#ifndef NEPOMUKCONTACTFEEDER_H
#define NEPOMUKCONTACTFEEDER_H
#include <nepomukfeederplugin.h>
......
......@@ -18,4 +18,5 @@ target_link_libraries( performancetest
${KDEPIMLIBS_AKONADI_KMIME_LIBS}
${KDEPIMLIBS_KMIME_LIBS}
nepomukfeederpluginlib
)
\ No newline at end of file
)
......@@ -100,4 +100,5 @@ private slots:
QTEST_AKONADIMAIN( PerformanceTest, NoGUI )
#include "performancetest.moc"
\ No newline at end of file
#include "performancetest.moc"
......@@ -81,7 +81,7 @@ void NewMailNotifierAgent::showNotifications()
}
kDebug() << texts;
KNotification *notify = new KNotification( "new-email", 0L, KNotification::Persistent );
KNotification *notify = new KNotification( "new-email", 0, KNotification::Persistent );
notify->setText( texts.join( "<br>" ) );
notify->sendEvent();
......
......@@ -30,7 +30,7 @@ class NewMailNotifierAgent : public Akonadi::AgentBase, public Akonadi::AgentBas
Q_OBJECT
public:
NewMailNotifierAgent( const QString &id );
explicit NewMailNotifierAgent( const QString &id );
void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
private slots:
......
......@@ -43,7 +43,7 @@ class StrigiFeeder : public AgentBase, public AgentBase::ObserverV2
Q_OBJECT
public:
StrigiFeeder( const QString &id );
explicit StrigiFeeder( const QString &id );
~StrigiFeeder();
void configure( WId windowId );
......
......@@ -17,8 +17,8 @@
02110-1301, USA.
*/
#ifndef MAILSERIALIZERTEST_H
#define MAILSERIALIZERTEST_H
#ifndef MAILSERIALIZERPLUGINTEST_H
#define MAILSERIALIZERPLUGINTEST_H
#include <QtCore/QObject>
......
......@@ -28,7 +28,7 @@ class CollectionTest : public QObject, protected WrappedObject
{
Q_OBJECT
public:
CollectionTest( QObject *parent = 0 );
explicit CollectionTest( QObject *parent = 0 );
void setParent( const Akonadi::Collection &parent );
void setCollection( const Akonadi::Collection &collection );
......
......@@ -29,7 +29,7 @@ class ItemTest : public QObject, protected WrappedObject
{
Q_OBJECT
public:
ItemTest( QObject *parent = 0 );
explicit ItemTest( QObject *parent = 0 );
void setParentCollection( const Akonadi::Collection &parent );
......
......@@ -28,7 +28,7 @@ class QEmu : public QObject
{
Q_OBJECT
public:
QEmu( QObject *parent );
explicit QEmu( QObject *parent );
~QEmu();
public slots:
......
......@@ -32,7 +32,7 @@ class Resource: public QObject, protected WrappedObject
{
Q_OBJECT
public:
Resource( QObject *parent );
explicit Resource( QObject *parent );
~Resource();
public slots:
......
......@@ -26,7 +26,7 @@ class System : public QObject
{
Q_OBJECT
public:
System( QObject *parent = 0 );
explicit System( QObject *parent = 0 );
public slots:
void exec( const QString& program, const QStringList& args );
......
......@@ -134,7 +134,7 @@ void XmlOperations::setItemKey(XmlOperations::ItemField field)
void XmlOperations::setItemKey(const QString& _fieldName)
{
QString fieldName = _fieldName;
if ( !fieldName.startsWith( "Item" ) )
if ( !fieldName.startsWith( QLatin1String ( "Item" ) ) )
fieldName.prepend( "Item" );
const QMetaEnum me = metaObject()->enumerator( metaObject()->indexOfEnumerator( "ItemField" ) );
setItemKey( static_cast<ItemField>( me.keyToValue( fieldName.toLatin1() ) ) );
......
......@@ -41,7 +41,7 @@ class XmlOperations : public QObject
Q_ENUMS( CollectionField ItemField )
public:
XmlOperations( QObject *parent = 0 );
explicit XmlOperations( QObject *parent = 0 );
~XmlOperations();
enum CollectionField {
......
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