[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [akonadi] src: Use nullptr
From: Montel Laurent <null () kde ! org>
Date: 2017-05-28 20:07:57
Message-ID: E1dF4Tl-00046H-Mb () code ! kde ! org
[Download RAW message or body]
Git commit 751d78f8736a95ca9da65c09d1687656de33b9b2 by Montel Laurent.
Committed on 28/05/2017 at 20:07.
Pushed by mlaurent into branch 'master'.
Use nullptr
M +1 -1 src/agentbase/agentfactory.h
M +1 -1 src/agentbase/resourcebase.h
M +2 -2 src/core/entitycache_p.h
M +2 -2 src/core/pastehelper_p.h
M +7 -7 src/core/protocolhelper_p.h
M +2 -2 src/server/storage/datastore.h
https://commits.kde.org/akonadi/751d78f8736a95ca9da65c09d1687656de33b9b2
diff --git a/src/agentbase/agentfactory.h b/src/agentbase/agentfactory.h
index 751f637dd..b5cecaabe 100644
--- a/src/agentbase/agentfactory.h
+++ b/src/agentbase/agentfactory.h
@@ -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);
}
diff --git a/src/agentbase/resourcebase.h b/src/agentbase/resourcebase.h
index 79d10916d..789edb107 100644
--- a/src/agentbase/resourcebase.h
+++ b/src/agentbase/resourcebase.h
@@ -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);
}
diff --git a/src/core/entitycache_p.h b/src/core/entitycache_p.h
index 1964c4eeb..c7acc5fb3 100644
--- a/src/core/entitycache_p.h
+++ b/src/core/entitycache_p.h
@@ -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)
{
diff --git a/src/core/pastehelper_p.h b/src/core/pastehelper_p.h
index 0caf6fa44..f59fbaa05 100644
--- a/src/core/pastehelper_p.h
+++ b/src/core/pastehelper_p.h
@@ -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); }
}
diff --git a/src/core/protocolhelper_p.h b/src/core/protocolhelper_p.h
index b2a2f70ea..593404056 100644
--- a/src/core/protocolhelper_p.h
+++ b/src/core/protocolhelper_p.h
@@ -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;
}
diff --git a/src/server/storage/datastore.h b/src/server/storage/datastore.h
index ec26adb69..6de3963c5 100644
--- a/src/server/storage/datastore.h
+++ b/src/server/storage/datastore.h
@@ -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 ----------------------------------------------------- */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic