diff --git a/src/attachmenthandler.cpp b/src/attachmenthandler.cpp index c4bc08ab95618f6b4986e897ab99741ccdede45d..2a5593a1120ffa6053696a22abb076c211b6a245 100644 --- a/src/attachmenthandler.cpp +++ b/src/attachmenthandler.cpp @@ -143,7 +143,7 @@ Attachment::Ptr AttachmentHandler::find(const QString &attachmentName, return find(attachmentName, incidence); } -static QTemporaryFile *s_tempFile = 0; +static QTemporaryFile *s_tempFile = Q_NULLPTR; static QUrl tempFileForAttachment(const Attachment::Ptr &attachment) { @@ -165,7 +165,7 @@ static QUrl tempFileForAttachment(const Attachment::Ptr &attachment) if (tf.size() != attachment->size()) { //whoops. failed to write the entire attachment. return an invalid URL. delete s_tempFile; - s_tempFile = 0; + s_tempFile = Q_NULLPTR; return url; } @@ -186,7 +186,7 @@ bool AttachmentHandler::view(const Attachment::Ptr &attachment) // put the attachment in a temporary file and launch it QUrl tempUrl = tempFileForAttachment(attachment); if (tempUrl.isValid()) { - stat = KRun::runUrl(tempUrl, attachment->mimeType(), 0, true); + stat = KRun::runUrl(tempUrl, attachment->mimeType(), Q_NULLPTR, true); } else { stat = false; KMessageBox::error( @@ -194,7 +194,7 @@ bool AttachmentHandler::view(const Attachment::Ptr &attachment) i18n("Unable to create a temporary file for the attachment.")); } delete s_tempFile; - s_tempFile = 0; + s_tempFile = Q_NULLPTR; } return stat; } @@ -257,7 +257,7 @@ bool AttachmentHandler::saveAs(const Attachment::Ptr &attachment) i18n("Unable to create a temporary file for the attachment.")); } delete s_tempFile; - s_tempFile = 0; + s_tempFile = Q_NULLPTR; } return stat; } diff --git a/src/calendarutils.cpp b/src/calendarutils.cpp index fb1e0376ad0c352f0a001f0be51892569c3c0794..18fdc059878e29654e32fe5969648c2941c36d18 100644 --- a/src/calendarutils.cpp +++ b/src/calendarutils.cpp @@ -152,7 +152,7 @@ bool CalendarUtilsPrivate::purgeCompletedSubTodos(const KCalCore::Todo::Ptr &tod if (deleteThisTodo) { if (todo->isCompleted()) { - if (!mChanger->deleteIncidence(mCalendar->item(todo), 0)) { + if (!mChanger->deleteIncidence(mCalendar->item(todo), Q_NULLPTR)) { allPurged = false; } } else { @@ -259,7 +259,7 @@ void CalendarUtils::purgeCompletedTodos() // endMultiModify(); if (!allDeleted) { KMessageBox::information( - 0, + Q_NULLPTR, i18nc("@info", "Unable to purge to-dos with uncompleted children."), i18nc("@title:window", "Delete To-do"), diff --git a/src/incidenceattachmentmodel.cpp b/src/incidenceattachmentmodel.cpp index 055ac13eef0468264855bb2e742033039dec930a..89be463e98b7e5e6f910ca33db23abdf10f3c431 100644 --- a/src/incidenceattachmentmodel.cpp +++ b/src/incidenceattachmentmodel.cpp @@ -36,7 +36,7 @@ class IncidenceAttachmentModelPrivate IncidenceAttachmentModelPrivate(IncidenceAttachmentModel *qq, const QPersistentModelIndex &modelIndex, const Akonadi::Item &item = Akonadi::Item()) - : q_ptr(qq), m_modelIndex(modelIndex), m_item(item), m_monitor(0) + : q_ptr(qq), m_modelIndex(modelIndex), m_item(item), m_monitor(Q_NULLPTR) { if (modelIndex.isValid()) { QObject::connect(modelIndex.model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), diff --git a/src/utils.cpp b/src/utils.cpp index 90bf4b4c7990227065f13bd22a3e2ea4447cd9a3..d74839cd14f2b8e03cad157071d87e6aa94aa501 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -196,7 +196,7 @@ QMimeData *CalendarSupport::createMimeData(const Akonadi::Item::List &items, const KDateTime::Spec &timeSpec) { if (items.isEmpty()) { - return 0; + return Q_NULLPTR; } KCalCore::MemoryCalendar::Ptr cal(new KCalCore::MemoryCalendar(timeSpec)); @@ -215,7 +215,7 @@ QMimeData *CalendarSupport::createMimeData(const Akonadi::Item::List &items, } if (incidencesFound == 0) { - return 0; + return Q_NULLPTR; } std::unique_ptr mimeData(new QMimeData);