Commit 751d78f8 authored by Laurent Montel's avatar Laurent Montel 😁

Use nullptr

parent db139a9f
......@@ -94,7 +94,7 @@ public:
// check if T also inherits AgentBase::Observer and
// if it does, automatically register it on itself
Akonadi::AgentBase::Observer *observer = dynamic_cast<Akonadi::AgentBase::Observer *>(instance);
if (observer != 0) {
if (observer != nullptr) {
instance->registerObserver(observer);
}
......
......@@ -189,7 +189,7 @@ public:
// check if T also inherits AgentBase::Observer and
// if it does, automatically register it on itself
Observer *observer = dynamic_cast<Observer *>(r);
if (observer != 0) {
if (observer != nullptr) {
r->registerObserver(observer);
}
......
......@@ -95,7 +95,7 @@ class EntityCache : public EntityCacheBase
{
public:
typedef FetchScope_ FetchScope;
explicit EntityCache(int maxCapacity, Session *session = 0, QObject *parent = nullptr)
explicit EntityCache(int maxCapacity, Session *session = nullptr, QObject *parent = nullptr)
: EntityCacheBase(session, parent)
, mCapacity(maxCapacity)
{
......@@ -306,7 +306,7 @@ class EntityListCache : public EntityCacheBase
public:
typedef FetchScope_ FetchScope;
explicit EntityListCache(int maxCapacity, Session *session = 0, QObject *parent = nullptr)
explicit EntityListCache(int maxCapacity, Session *session = nullptr, QObject *parent = nullptr)
: EntityCacheBase(session, parent)
, mCapacity(maxCapacity)
{
......
......@@ -55,7 +55,7 @@ AKONADICORE_EXPORT bool canPaste(const QMimeData *mimeData, const Collection &co
@param copy Indicate whether this is a copy or a move.
@returns The job performing the paste, 0 if there is nothing to paste.
*/
AKONADICORE_EXPORT KJob *paste(const QMimeData *mimeData, const Collection &collection, bool copy = true, Session *session = 0);
AKONADICORE_EXPORT KJob *paste(const QMimeData *mimeData, const Collection &collection, bool copy = true, Session *session = nullptr);
/**
URI list paste/drop.
......@@ -64,7 +64,7 @@ AKONADICORE_EXPORT KJob *paste(const QMimeData *mimeData, const Collection &coll
@param action The drop action (copy/move/link).
@returns The job performing the paste, 0 if there is nothing to paste.
*/
AKONADICORE_EXPORT KJob *pasteUriList(const QMimeData *mimeData, const Collection &collection, Qt::DropAction action, Session *session = 0);
AKONADICORE_EXPORT KJob *pasteUriList(const QMimeData *mimeData, const Collection &collection, Qt::DropAction action, Session *session = nullptr);
}
}
......
......@@ -101,7 +101,7 @@ public:
static void parseAncestorsCached(const QVector<Protocol::Ancestor> &ancestors,
Item *item,
Collection::Id parentCollection,
ProtocolHelperValuePool *valuePool = 0);
ProtocolHelperValuePool *valuePool = nullptr);
/**
Convert a ancestor chain from its protocol representation into an Collection object.
......@@ -112,7 +112,7 @@ public:
static void parseAncestorsCached(const QVector<Protocol::Ancestor> &ancestors,
Collection *collection,
Collection::Id parentCollection,
ProtocolHelperValuePool *valuePool = 0);
ProtocolHelperValuePool *valuePool = nullptr);
/**
Parse a collection description.
@param data The input data.
......@@ -232,7 +232,7 @@ public:
/**
Parses a single line from an item fetch job result into an Item object.
*/
static Item parseItemFetchResult(const Protocol::FetchItemsResponse &data, ProtocolHelperValuePool *valuePool = 0);
static Item parseItemFetchResult(const Protocol::FetchItemsResponse &data, ProtocolHelperValuePool *valuePool = nullptr);
static Tag parseTagFetchResult(const Protocol::FetchTagsResponse &data);
static Relation parseRelationFetchResult(const Protocol::FetchRelationsResponse &data);
......@@ -252,7 +252,7 @@ private:
template<typename T, template<typename> class Container>
inline static
typename std::enable_if<std::is_same<T, Akonadi::Collection>::value, bool>::type
entitySetHasGID(const Container<T> &/*objects*/, int * /*dummy*/ = 0)
entitySetHasGID(const Container<T> &/*objects*/, int * /*dummy*/ = nullptr)
{
return false;
}
......@@ -268,7 +268,7 @@ private:
template<typename T, template<typename> class Container>
inline static
typename std::enable_if<std::is_same<T, Akonadi::Collection>::value, Scope>::type
entitySetToGID(const Container<T> &/*objects*/, int * /*dummy*/ = 0)
entitySetToGID(const Container<T> &/*objects*/, int * /*dummy*/ = nullptr)
{
return Scope();
}
......@@ -301,7 +301,7 @@ private:
template<typename T, template<typename> class Container, typename RIDFunc>
inline static
typename std::enable_if<std::is_same<QByteArray, typename RIDFunc:: result_type>::value, Scope>::type
entitySetToRemoteIdentifier(Scope::SelectionScope scope, const Container<T> &objects, const RIDFunc &ridFunc, int * /*dummy*/ = 0)
entitySetToRemoteIdentifier(Scope::SelectionScope scope, const Container<T> &objects, const RIDFunc &ridFunc, int * /*dummy*/ = nullptr)
{
QStringList rids;
rids.reserve(objects.size());
......@@ -328,7 +328,7 @@ private:
template<typename T, template<typename> class Container>
inline static
typename std::enable_if<std::is_same<T, Tag>::value, bool>::type
entitySetHasHRID(const Container<T> &/*objects*/, int * /*dummy*/ = 0)
entitySetHasHRID(const Container<T> &/*objects*/, int * /*dummy*/ = nullptr)
{
return false;
}
......
......@@ -126,9 +126,9 @@ public:
/* --- ItemFlags ----------------------------------------------------- */
virtual bool setItemsFlags(const PimItem::List &items, const QVector<Flag> &flags,
bool *flagsChanged = nullptr, const Collection &col = Collection(), bool silent = false);
virtual bool appendItemsFlags(const PimItem::List &items, const QVector<Flag> &flags, bool *flagsChanged = 0,
virtual bool appendItemsFlags(const PimItem::List &items, const QVector<Flag> &flags, bool *flagsChanged = nullptr,
bool checkIfExists = true, const Collection &col = Collection(), bool silent = false);
virtual bool removeItemsFlags(const PimItem::List &items, const QVector<Flag> &flags, bool *tagsChanged = 0,
virtual bool removeItemsFlags(const PimItem::List &items, const QVector<Flag> &flags, bool *tagsChanged = nullptr,
const Collection &collection = Collection(), bool silent = false);
/* --- ItemTags ----------------------------------------------------- */
......
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