Verified Commit a1519ed8 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳
Browse files

Use nullptr everywhere


Reviewed-by: Alexander Akulich's avatarAlexander Akulich <akulichalexander@gmail.com>
parent aaabe232
......@@ -23,7 +23,7 @@
ContactPin::ContactPin(QObject *parent)
: QObject(parent)
, m_model(0)
, m_model(nullptr)
{
}
......
......@@ -33,7 +33,7 @@ class ContactPin : public QObject
Q_PROPERTY(bool pinned READ isPinned NOTIFY pinnedChanged)
public:
explicit ContactPin(QObject *parent = 0);
explicit ContactPin(QObject *parent = nullptr);
KTp::ContactPtr contact() const;
Tp::AccountPtr account() const;
......
......@@ -35,7 +35,7 @@ class Conversation::ConversationPrivate
public:
ConversationPrivate()
{
messages = 0;
messages = nullptr;
delegated = false;
valid = false;
isGroupChat = false;
......@@ -201,7 +201,7 @@ Tp::Account* Conversation::accountObject() const
return d->account.data();
}
return 0;
return nullptr;
}
bool Conversation::isValid() const
......
......@@ -48,8 +48,8 @@ class Conversation : public QObject
Q_PROPERTY(bool canSendMessages READ canSendMessages NOTIFY canSendMessagesChanged)
public:
Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject *parent = 0);
Conversation(const QString &contactId, const Tp::AccountPtr &account, QObject *parent = 0);
Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject *parent = nullptr);
Conversation(const QString &contactId, const Tp::AccountPtr &account, QObject *parent = nullptr);
~Conversation() override;
void setTextChannel(const Tp::TextChannelPtr &channel);
......
......@@ -34,7 +34,7 @@ class ConversationsModel : public QAbstractListModel, public Tp::AbstractClientH
Q_PROPERTY(int activeChatIndex READ activeChatIndex NOTIFY activeChatIndexChanged)
public:
explicit ConversationsModel(QObject *parent = 0);
explicit ConversationsModel(QObject *parent = nullptr);
~ConversationsModel() override;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
......
......@@ -26,7 +26,7 @@ class FilteredPinnedContactsProxyModel : public QSortFilterProxyModel
Q_OBJECT
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel)
public:
FilteredPinnedContactsProxyModel(QObject* parent = 0);
FilteredPinnedContactsProxyModel(QObject* parent = nullptr);
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
};
......
......@@ -92,7 +92,7 @@ public:
};
Q_ENUMS(Role)
MainLogModel(QObject *parent = 0);
MainLogModel(QObject *parent = nullptr);
~MainLogModel() override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
......
......@@ -37,7 +37,7 @@ class MessagesModel : public QAbstractListModel
Q_PROPERTY(bool shouldStartOpened READ shouldStartOpened CONSTANT)
public:
MessagesModel(const Tp::AccountPtr &account, QObject *parent = 0);
MessagesModel(const Tp::AccountPtr &account, QObject *parent = nullptr);
~MessagesModel() override;
enum Roles {
......
......@@ -38,7 +38,7 @@
class PinnedContactsModelPrivate {
public:
PinnedContactsModelPrivate() {
conversations = 0;
conversations = nullptr;
}
QList<KTp::PersistentContactPtr> m_pins;
......
......@@ -37,7 +37,7 @@ class PinnedContactsModel : public QAbstractListModel
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
public:
explicit PinnedContactsModel(QObject *parent = 0);
explicit PinnedContactsModel(QObject *parent = nullptr);
~PinnedContactsModel() override;
enum role {
......
......@@ -47,7 +47,7 @@ class TelepathyManager : public QObject
Q_PROPERTY(bool ready READ isReady NOTIFY ready)
public:
TelepathyManager(QObject *parent=0);
TelepathyManager(QObject *parent=nullptr);
~TelepathyManager() override;
/** Returns the account manager*/
......
......@@ -48,7 +48,7 @@ class KTPCOMMONINTERNALS_EXPORT AbstractLoggerPlugin : public QObject
/**
* Constructor.
*/
explicit AbstractLoggerPlugin(QObject *parent = 0);
explicit AbstractLoggerPlugin(QObject *parent = nullptr);
/**
* Destructor.
......
......@@ -37,7 +37,7 @@ using namespace KTp;
#define KTP_LOGGER_PLUGIN_VERSION "1"
LogManager* LogManager::Private::s_logManagerInstance = 0;
LogManager* LogManager::Private::s_logManagerInstance = nullptr;
void LogManager::Private::loadPlugins()
{
......@@ -71,7 +71,7 @@ LogManager::Private::Private(LogManager *parent):
LogManager* LogManager::instance()
{
if (Private::s_logManagerInstance == 0) {
if (Private::s_logManagerInstance == nullptr) {
Private::s_logManagerInstance = new LogManager();
}
......
......@@ -29,7 +29,7 @@ class PendingLoggerDatesImpl : public KTp::PendingLoggerDates
public:
explicit PendingLoggerDatesImpl(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
QObject* parent = 0);
QObject* parent = nullptr);
~PendingLoggerDatesImpl() override;
private Q_SLOTS:
......
......@@ -69,7 +69,7 @@ class KTPCOMMONINTERNALS_EXPORT PendingLoggerDates : public KTp::PendingLoggerOp
protected:
explicit PendingLoggerDates(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
QObject *parent = 0);
QObject *parent = nullptr);
void setDates(const QList<QDate> &dates);
......
......@@ -28,7 +28,7 @@ class PendingLoggerEntitiesImpl: public KTp::PendingLoggerEntities
public:
explicit PendingLoggerEntitiesImpl(const Tp::AccountPtr &account,
QObject *parent = 0);
QObject *parent = nullptr);
~PendingLoggerEntitiesImpl() override;
private Q_SLOTS:
......
......@@ -60,7 +60,7 @@ class KTPCOMMONINTERNALS_EXPORT PendingLoggerEntities : public KTp::PendingLogge
QList<KTp::LogEntity> entities() const;
protected:
explicit PendingLoggerEntities(const Tp::AccountPtr &account, QObject* parent = 0);
explicit PendingLoggerEntities(const Tp::AccountPtr &account, QObject* parent = nullptr);
void appendEntities(const QList<KTp::LogEntity> &entities);
void appendEntity(const KTp::LogEntity &entity);
......
......@@ -30,7 +30,7 @@ class PendingLoggerLogsImpl : public KTp::PendingLoggerLogs
explicit PendingLoggerLogsImpl(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
const QDate &date,
QObject *parent = 0);
QObject *parent = nullptr);
~PendingLoggerLogsImpl() override;
private Q_SLOTS:
......
......@@ -74,7 +74,7 @@ class KTPCOMMONINTERNALS_EXPORT PendingLoggerLogs : public KTp::PendingLoggerOpe
explicit PendingLoggerLogs(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
const QDate &date,
QObject* parent = 0);
QObject* parent = nullptr);
void appendLogs(const QList<KTp::LogMessage> &logs);
......
......@@ -42,7 +42,7 @@ class KTPCOMMONINTERNALS_EXPORT PendingLoggerOperation : public QObject
void finished(KTp::PendingLoggerOperation *self);
protected:
explicit PendingLoggerOperation(QObject *parent = 0);
explicit PendingLoggerOperation(QObject *parent = nullptr);
void setError(const QString &error);
void emitFinished();
......
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