Commit 8817e4ae authored by Laurent Montel's avatar Laurent Montel 😁

use nullptr

parent 56b0a719
......@@ -53,7 +53,7 @@ void FreeBusyItemModelTest::testModelValidity()
fb1->addPeriod(dt1, KCalCore::Duration(60 * 60));
fb1->addPeriod(dt2, KCalCore::Duration(60 * 60));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, 0));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, nullptr));
item1->setFreeBusy(fb1);
model->addItem(item1);
......@@ -119,10 +119,10 @@ void FreeBusyItemModelTest::testModelValidity2()
fb3->addPeriod(dt2, KCalCore::Duration(60 * 60));
fb3->addPeriod(dt4, KCalCore::Duration(60 * 60 * 2));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, 0));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, nullptr));
item1->setFreeBusy(fb1);
FreeBusyItem::Ptr item2(new FreeBusyItem(a2, 0));
FreeBusyItem::Ptr item3(new FreeBusyItem(a3, 0));
FreeBusyItem::Ptr item2(new FreeBusyItem(a2, nullptr));
FreeBusyItem::Ptr item3(new FreeBusyItem(a3, nullptr));
model->addItem(item1);
model->addItem(item2);
......@@ -234,7 +234,7 @@ void FreeBusyItemModelTest::testInsertFreeBusy()
fb2->addPeriod(dt3, KCalCore::Duration(60 * 60));
fb2->addPeriod(dt4, KCalCore::Duration(60 * 60 * 2));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, 0));
FreeBusyItem::Ptr item1(new FreeBusyItem(a1, nullptr));
item1->setFreeBusy(fb1);
model->addItem(item1);
......
......@@ -76,7 +76,7 @@ void FreeBusyCalendar::setModel(FreeBusyItemModel *model)
{
if (model != d->mModel) {
if (d->mModel) {
disconnect(d->mModel, 0, 0, 0);
disconnect(d->mModel, nullptr, nullptr, nullptr);
}
d->mModel = model;
connect(d->mModel, &QAbstractItemModel::layoutChanged, this, &FreeBusyCalendar::onLayoutChanged);
......
......@@ -110,7 +110,7 @@ FreeBusyItemModel::FreeBusyItemModel(QObject *parent)
connect(&d->mReloadTimer, &QTimer::timeout, this, &FreeBusyItemModel::autoReload);
d->mReloadTimer.setSingleShot(true);
d->mRootData = new ItemPrivateData(0);
d->mRootData = new ItemPrivateData(nullptr);
}
FreeBusyItemModel::~FreeBusyItemModel()
......@@ -291,7 +291,7 @@ void FreeBusyItemModel::clear()
beginResetModel();
d->mFreeBusyItems.clear();
delete d->mRootData;
d->mRootData = new ItemPrivateData(0);
d->mRootData = new ItemPrivateData(nullptr);
endResetModel();
}
......
......@@ -100,7 +100,7 @@ public:
void slotParentCollectionFetched(KJob *job)
{
mParentCollectionFetchJob = 0;
mParentCollectionFetchJob = nullptr;
mParentCollection = Akonadi::Collection();
if (!job->error()) {
......
......@@ -1647,7 +1647,7 @@ void CalPrintTodos::print(QPainter &p, int width, int height)
mConnectSubTodos,
mStrikeOutCompleted, mIncludeDescription,
pospriority, possummary, posdue, poscomplete,
0, 0, mCurrentLinePos, width, height, todoList, 0,
0, 0, mCurrentLinePos, width, height, todoList, nullptr,
mExcludeConfidential, mExcludePrivate);
}
}
......
......@@ -312,7 +312,7 @@ PrintPlugin *CalPrintDialog::selectedPlugin()
if (mPluginIDs.contains(id)) {
return mPluginIDs[id];
} else {
return 0;
return nullptr;
}
}
......
......@@ -179,7 +179,7 @@ void CalPrintPluginBase::doPrint(QPrinter *printer)
print(p, pageWidth, pageHeight);
p.end();
mPrinter = 0;
mPrinter = nullptr;
}
void CalPrintPluginBase::doLoadConfig()
......@@ -1512,7 +1512,7 @@ void CalPrintPluginBase::drawTimeTable(QPainter &p,
class MonthEventStruct
{
public:
MonthEventStruct() : event(0) {}
MonthEventStruct() : event(nullptr) {}
MonthEventStruct(const KDateTime &s, const KDateTime &e, const KCalCore::Event::Ptr &ev)
{
event = ev;
......
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