Commit af9917a7 authored by Laurent Montel's avatar Laurent Montel 😁

GIT_SILENT: use nullptr

parent 3165752f
......@@ -70,12 +70,12 @@ static const Collection::Rights writableRights = Collection::CanChangeItem | Col
= Class: AkonadiModel
=============================================================================*/
AkonadiModel* AkonadiModel::mInstance = Q_NULLPTR;
QPixmap* AkonadiModel::mTextIcon = Q_NULLPTR;
QPixmap* AkonadiModel::mFileIcon = Q_NULLPTR;
QPixmap* AkonadiModel::mCommandIcon = Q_NULLPTR;
QPixmap* AkonadiModel::mEmailIcon = Q_NULLPTR;
QPixmap* AkonadiModel::mAudioIcon = Q_NULLPTR;
AkonadiModel* AkonadiModel::mInstance = nullptr;
QPixmap* AkonadiModel::mTextIcon = nullptr;
QPixmap* AkonadiModel::mFileIcon = nullptr;
QPixmap* AkonadiModel::mCommandIcon = nullptr;
QPixmap* AkonadiModel::mEmailIcon = nullptr;
QPixmap* AkonadiModel::mAudioIcon = nullptr;
QSize AkonadiModel::mIconSize;
int AkonadiModel::mTimeHourPos = -2;
......@@ -148,7 +148,7 @@ AkonadiModel::AkonadiModel(ChangeRecorder* monitor, QObject* parent)
AkonadiModel::~AkonadiModel()
{
if (mInstance == this)
mInstance = Q_NULLPTR;
mInstance = nullptr;
}
/******************************************************************************
......@@ -540,7 +540,7 @@ bool AkonadiModel::setData(const QModelIndex& index, const QVariant& value, int
{
// This is a Collection row
bool updateCollection = false;
CollectionAttribute* attr = Q_NULLPTR;
CollectionAttribute* attr = nullptr;
switch (role)
{
case Qt::BackgroundRole:
......@@ -1266,12 +1266,12 @@ KAEvent AkonadiModel::event(Item::Id itemId) const
const QModelIndex ix = itemIndex(itemId);
if (!ix.isValid())
return KAEvent();
return event(ix.data(ItemRole).value<Item>(), ix, Q_NULLPTR);
return event(ix.data(ItemRole).value<Item>(), ix, nullptr);
}
KAEvent AkonadiModel::event(const QModelIndex& index) const
{
return event(index.data(ItemRole).value<Item>(), index, Q_NULLPTR);
return event(index.data(ItemRole).value<Item>(), index, nullptr);
}
KAEvent AkonadiModel::event(const Item& item, const QModelIndex& index, Collection* collection) const
......
......@@ -149,7 +149,7 @@ class AkonadiModel : public Akonadi::EntityTreeModel
/** Return the alarm with the specified unique identifier.
* @return the event, or invalid event if no such event exists.
*/
KAEvent event(const Akonadi::Item& item) const { return event(item, QModelIndex(), Q_NULLPTR); }
KAEvent event(const Akonadi::Item& item) const { return event(item, QModelIndex(), nullptr); }
KAEvent event(Akonadi::Item::Id) const;
KAEvent event(const QModelIndex&) const;
using QObject::event; // prevent warning about hidden virtual method
......@@ -289,7 +289,7 @@ class AkonadiModel : public Akonadi::EntityTreeModel
};
struct CollTypeData // data for configuration dialog for collection creation job
{
CollTypeData() : parent(Q_NULLPTR), alarmType(CalEvent::EMPTY) {}
CollTypeData() : parent(nullptr), alarmType(CalEvent::EMPTY) {}
CollTypeData(CalEvent::Type t, QWidget* p) : parent(p), alarmType(t) {}
QWidget* parent;
CalEvent::Type alarmType;
......
......@@ -106,7 +106,7 @@ void AkonadiResourceCreator::agentInstanceCreated(KJob* j)
if (j->error())
{
qCCritical(KALARM_LOG) << "Failed to create new calendar resource:" << j->errorString();
KMessageBox::error(Q_NULLPTR, xi18nc("@info", "%1<nl/>(%2)", i18nc("@info", "Failed to create new calendar resource"), j->errorString()));
KMessageBox::error(nullptr, xi18nc("@info", "%1<nl/>(%2)", i18nc("@info", "Failed to create new calendar resource"), j->errorString()));
exitWithError();
}
else
......
......@@ -51,8 +51,8 @@ static KACalendar::Compat fix(const KCalCore::FileStorage::Ptr&);
static const QString displayCalendarName = QStringLiteral("displaying.ics");
static const Collection::Id DISPLAY_COL_ID = -1; // collection ID used for displaying calendar
AlarmCalendar* AlarmCalendar::mResourcesCalendar = Q_NULLPTR;
AlarmCalendar* AlarmCalendar::mDisplayCalendar = Q_NULLPTR;
AlarmCalendar* AlarmCalendar::mResourcesCalendar = nullptr;
AlarmCalendar* AlarmCalendar::mDisplayCalendar = nullptr;
/******************************************************************************
......@@ -86,9 +86,9 @@ bool AlarmCalendar::initialiseCalendars()
void AlarmCalendar::terminateCalendars()
{
delete mResourcesCalendar;
mResourcesCalendar = Q_NULLPTR;
mResourcesCalendar = nullptr;
delete mDisplayCalendar;
mDisplayCalendar = Q_NULLPTR;
mDisplayCalendar = nullptr;
}
/******************************************************************************
......@@ -99,7 +99,7 @@ AlarmCalendar* AlarmCalendar::displayCalendarOpen()
if (mDisplayCalendar->open())
return mDisplayCalendar;
qCCritical(KALARM_LOG) << "Open error";
return Q_NULLPTR;
return nullptr;
}
/******************************************************************************
......@@ -109,7 +109,7 @@ AlarmCalendar* AlarmCalendar::displayCalendarOpen()
KAEvent* AlarmCalendar::getEvent(const EventId& eventId)
{
if (eventId.eventId().isEmpty())
return Q_NULLPTR;
return nullptr;
return mResourcesCalendar->event(eventId);
}
......@@ -426,7 +426,7 @@ void AlarmCalendar::updateDisplayKAEvents()
delete event;
}
events.clear();
mEarliestAlarm[key] = Q_NULLPTR;
mEarliestAlarm[key] = nullptr;
Calendar::Ptr cal = mCalendarStorage->calendar();
if (!cal)
return;
......@@ -778,7 +778,7 @@ bool AlarmCalendar::exportAlarms(const KAEvent::List& events, QWidget* parent)
{
// One or more alarms have been exported to the calendar.
// Save the calendar to file.
QTemporaryFile* tempFile = Q_NULLPTR;
QTemporaryFile* tempFile = nullptr;
bool local = url.isLocalFile();
if (!local)
{
......@@ -910,7 +910,7 @@ bool AlarmCalendar::addEvent(KAEvent& evnt, QWidget* promptParent, bool useEvent
}
Collection::Id key = (collection && collection->isValid()) ? collection->id() : -1;
Event::Ptr kcalEvent((mCalType == RESOURCES) ? (Event*)Q_NULLPTR : new Event);
Event::Ptr kcalEvent((mCalType == RESOURCES) ? (Event*)nullptr : new Event);
KAEvent* event = new KAEvent(evnt);
QString id = event->id();
if (type == CalEvent::ACTIVE)
......@@ -1004,7 +1004,7 @@ void AlarmCalendar::addNewEvent(const Collection& collection, KAEvent* event, bo
&& event->category() == CalEvent::ACTIVE)
{
// Update the earliest alarm to trigger
KAEvent* earliest = mEarliestAlarm.value(key, (KAEvent*)Q_NULLPTR);
KAEvent* earliest = mEarliestAlarm.value(key, (KAEvent*)nullptr);
if (replace && earliest == event)
findEarliestAlarm(key);
else
......@@ -1087,7 +1087,7 @@ KAEvent* AlarmCalendar::updateEvent(const KAEvent& evnt)
KAEvent* AlarmCalendar::updateEvent(const KAEvent* evnt)
{
if (!mOpen || mCalType != RESOURCES)
return Q_NULLPTR;
return nullptr;
KAEvent* kaevnt = event(EventId(*evnt));
if (kaevnt)
{
......@@ -1100,7 +1100,7 @@ KAEvent* AlarmCalendar::updateEvent(const KAEvent* evnt)
}
}
qCDebug(KALARM_LOG) << "error";
return Q_NULLPTR;
return nullptr;
}
......@@ -1233,7 +1233,7 @@ CalEvent::Type AlarmCalendar::deleteEventInternal(const QString& eventID, const
KAEvent* AlarmCalendar::event(const EventId& uniqueID, bool checkDuplicates)
{
if (!isValid())
return Q_NULLPTR;
return nullptr;
const QString eventId = uniqueID.eventId();
if (uniqueID.collectionId() == -1 && checkDuplicates)
{
......@@ -1243,15 +1243,15 @@ KAEvent* AlarmCalendar::event(const EventId& uniqueID, bool checkDuplicates)
if (list.count() > 1)
{
qCWarning(KALARM_LOG) << "Multiple events found with ID" << eventId;
return Q_NULLPTR;
return nullptr;
}
if (list.isEmpty())
return Q_NULLPTR;
return nullptr;
return list[0];
}
KAEventMap::ConstIterator it = mEventMap.constFind(uniqueID);
if (it == mEventMap.constEnd())
return Q_NULLPTR;
return nullptr;
return it.value();
}
......@@ -1274,14 +1274,14 @@ Event::Ptr AlarmCalendar::kcalEvent(const QString& uniqueID)
KAEvent* AlarmCalendar::templateEvent(const QString& templateName)
{
if (templateName.isEmpty())
return Q_NULLPTR;
return nullptr;
KAEvent::List eventlist = events(CalEvent::TEMPLATE);
for (int i = 0, end = eventlist.count(); i < end; ++i)
{
if (eventlist[i]->templateName() == templateName)
return eventlist[i];
}
return Q_NULLPTR;
return nullptr;
}
/******************************************************************************
......@@ -1495,7 +1495,7 @@ void AlarmCalendar::findEarliestAlarm(Collection::Id key)
{
EarliestMap::Iterator eit = mEarliestAlarm.find(key);
if (eit != mEarliestAlarm.end())
eit.value() = Q_NULLPTR;
eit.value() = nullptr;
if (mCalType != RESOURCES
|| key < 0)
return;
......@@ -1503,7 +1503,7 @@ void AlarmCalendar::findEarliestAlarm(Collection::Id key)
if (rit == mResourceMap.constEnd())
return;
const KAEvent::List& events = rit.value();
KAEvent* earliest = Q_NULLPTR;
KAEvent* earliest = nullptr;
KDateTime earliestTime;
for (int i = 0, end = events.count(); i < end; ++i)
{
......@@ -1528,7 +1528,7 @@ void AlarmCalendar::findEarliestAlarm(Collection::Id key)
*/
KAEvent* AlarmCalendar::earliestAlarm() const
{
KAEvent* earliest = Q_NULLPTR;
KAEvent* earliest = nullptr;
KDateTime earliestTime;
for (EarliestMap::ConstIterator eit = mEarliestAlarm.constBegin(); eit != mEarliestAlarm.constEnd(); ++eit)
{
......
......@@ -70,7 +70,7 @@ class AlarmCalendar : public QObject
KCalCore::Event::List kcalEvents(CalEvent::Type s = CalEvent::EMPTY); // display calendar only
bool eventReadOnly(Akonadi::Item::Id) const;
Akonadi::Collection collectionForEvent(Akonadi::Item::Id) const;
bool addEvent(KAEvent&, QWidget* promptparent = Q_NULLPTR, bool useEventID = false, Akonadi::Collection* = Q_NULLPTR, bool noPrompt = false, bool* cancelled = Q_NULLPTR);
bool addEvent(KAEvent&, QWidget* promptparent = nullptr, bool useEventID = false, Akonadi::Collection* = nullptr, bool noPrompt = false, bool* cancelled = nullptr);
bool modifyEvent(const EventId& oldEventId, KAEvent& newEvent);
KAEvent* updateEvent(const KAEvent&);
KAEvent* updateEvent(const KAEvent*);
......@@ -88,7 +88,7 @@ class AlarmCalendar : public QObject
static AlarmCalendar* displayCalendar() { return mDisplayCalendar; }
static AlarmCalendar* displayCalendarOpen();
static KAEvent* getEvent(const EventId&);
static bool importAlarms(QWidget*, Akonadi::Collection* = Q_NULLPTR);
static bool importAlarms(QWidget*, Akonadi::Collection* = nullptr);
static bool exportAlarms(const KAEvent::List&, QWidget* parent);
Q_SIGNALS:
......
......@@ -30,7 +30,7 @@ class AlarmListDelegate : public EventListDelegate
{
Q_OBJECT
public:
explicit AlarmListDelegate(AlarmListView* parent = Q_NULLPTR)
explicit AlarmListDelegate(AlarmListView* parent = nullptr)
: EventListDelegate(parent) {}
void paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const Q_DECL_OVERRIDE;
......
......@@ -32,7 +32,7 @@ class AlarmListView : public EventListView
{
Q_OBJECT
public:
explicit AlarmListView(const QByteArray& configGroup, QWidget* parent = Q_NULLPTR);
explicit AlarmListView(const QByteArray& configGroup, QWidget* parent = nullptr);
void setModel(QAbstractItemModel*) Q_DECL_OVERRIDE;
void selectTimeColumns(bool time, bool timeTo);
......
......@@ -124,7 +124,7 @@ bool AlarmTime::convertTimeString(const QByteArray& timeString, KDateTime& dateT
char* end;
bool noTime;
// Get the minute value
if ((s = strchr(timeStr, ':')) == Q_NULLPTR)
if ((s = strchr(timeStr, ':')) == nullptr)
noTime = true;
else
{
......@@ -134,7 +134,7 @@ bool AlarmTime::convertTimeString(const QByteArray& timeString, KDateTime& dateT
if (end == s || *end || dt[4] >= 60)
return false;
// Get the hour value
if ((s = strrchr(timeStr, '-')) == Q_NULLPTR)
if ((s = strrchr(timeStr, '-')) == nullptr)
s = timeStr;
else
*s++ = 0;
......@@ -147,7 +147,7 @@ bool AlarmTime::convertTimeString(const QByteArray& timeString, KDateTime& dateT
{
noDate = false;
// Get the day value
if ((s = strrchr(timeStr, '-')) == Q_NULLPTR)
if ((s = strrchr(timeStr, '-')) == nullptr)
s = timeStr;
else
*s++ = 0;
......@@ -157,7 +157,7 @@ bool AlarmTime::convertTimeString(const QByteArray& timeString, KDateTime& dateT
if (s != timeStr)
{
// Get the month value
if ((s = strrchr(timeStr, '-')) == Q_NULLPTR)
if ((s = strrchr(timeStr, '-')) == nullptr)
s = timeStr;
else
*s++ = 0;
......
......@@ -138,7 +138,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
if (mode == DEFER_TIME)
{
mAnyTimeAllowed = false;
mAnyTimeCheckBox = Q_NULLPTR;
mAnyTimeCheckBox = nullptr;
}
else
{
......@@ -288,7 +288,7 @@ KDateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool
if (minsFromNow)
*minsFromNow = 0;
if (errorWidget)
*errorWidget = Q_NULLPTR;
*errorWidget = nullptr;
KDateTime now = KDateTime::currentUtcDateTime();
now.setTime(QTime(now.time().hour(), now.time().minute(), 0));
if (!mAtTimeRadio->isChecked())
......
......@@ -46,9 +46,9 @@ class AlarmTimeWidget : public QFrame
DEFER_TIME = 0x02, // "Defer to ..."
DEFER_ANY_TIME = DEFER_TIME | 0x04 // "Defer to ..." with 'any time' option
};
AlarmTimeWidget(const QString& groupBoxTitle, Mode, QWidget* parent = Q_NULLPTR);
explicit AlarmTimeWidget(Mode, QWidget* parent = Q_NULLPTR);
KDateTime getDateTime(int* minsFromNow = Q_NULLPTR, bool checkExpired = true, bool showErrorMessage = true, QWidget** errorWidget = Q_NULLPTR) const;
AlarmTimeWidget(const QString& groupBoxTitle, Mode, QWidget* parent = nullptr);
explicit AlarmTimeWidget(Mode, QWidget* parent = nullptr);
KDateTime getDateTime(int* minsFromNow = nullptr, bool checkExpired = true, bool showErrorMessage = true, QWidget** errorWidget = nullptr) const;
void setDateTime(const DateTime&);
void setMinDateTimeIsCurrent();
void setMinDateTime(const KDateTime& = KDateTime());
......
......@@ -61,7 +61,7 @@ using namespace KCal;
BirthdayDlg::BirthdayDlg(QWidget* parent)
: QDialog(parent),
mSpecialActionsButton(Q_NULLPTR)
mSpecialActionsButton(nullptr)
{
setObjectName(QStringLiteral("BirthdayDlg")); // used by LikeBack
setWindowTitle(i18nc("@title:window", "Import Birthdays From KAddressBook"));
......
......@@ -45,7 +45,7 @@ class BirthdayDlg : public QDialog
{
Q_OBJECT
public:
explicit BirthdayDlg(QWidget* parent = Q_NULLPTR);
explicit BirthdayDlg(QWidget* parent = nullptr);
QVector<KAEvent> events() const;
protected Q_SLOTS:
......@@ -80,8 +80,8 @@ class BLineEdit : public QLineEdit
{
Q_OBJECT
public:
explicit BLineEdit(QWidget* parent = Q_NULLPTR) : QLineEdit(parent) {}
explicit BLineEdit(const QString& text, QWidget* parent = Q_NULLPTR) : QLineEdit(text, parent) {}
explicit BLineEdit(QWidget* parent = nullptr) : QLineEdit(parent) {}
explicit BLineEdit(const QString& text, QWidget* parent = nullptr) : QLineEdit(text, parent) {}
Q_SIGNALS:
void focusLost();
......
......@@ -35,7 +35,7 @@
using namespace KAlarmCal;
BirthdayModel* BirthdayModel::mInstance = Q_NULLPTR;
BirthdayModel* BirthdayModel::mInstance = nullptr;
BirthdayModel::BirthdayModel(Akonadi::ChangeRecorder* recorder)
: Akonadi::ContactsTreeModel(recorder)
......@@ -46,7 +46,7 @@ BirthdayModel::BirthdayModel(Akonadi::ChangeRecorder* recorder)
BirthdayModel::~BirthdayModel()
{
if (this == mInstance)
mInstance = Q_NULLPTR;
mInstance = nullptr;
}
BirthdayModel* BirthdayModel::instance()
......
......@@ -70,7 +70,7 @@ class BirthdaySortModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
explicit BirthdaySortModel(QObject* parent = Q_NULLPTR);
explicit BirthdaySortModel(QObject* parent = nullptr);
void setPrefixSuffix(const QString& prefix, const QString& suffix);
......
......@@ -138,7 +138,7 @@ class CalendarUpdater : public QObject
};
CalendarMigrator* CalendarMigrator::mInstance = Q_NULLPTR;
CalendarMigrator* CalendarMigrator::mInstance = nullptr;
bool CalendarMigrator::mCompleted = false;
CalendarMigrator::CalendarMigrator(QObject* parent)
......@@ -150,7 +150,7 @@ CalendarMigrator::CalendarMigrator(QObject* parent)
CalendarMigrator::~CalendarMigrator()
{
qCDebug(KALARM_LOG);
mInstance = Q_NULLPTR;
mInstance = nullptr;
}
/******************************************************************************
......@@ -529,7 +529,7 @@ template <class Interface> Interface* CalendarMigrator::getAgentInterface(const
errorMessage = iface->lastError().message();
qCDebug(KALARM_LOG) << "D-Bus error accessing resource:" << errorMessage;
delete iface;
return Q_NULLPTR;
return nullptr;
}
return iface;
}
......@@ -544,7 +544,7 @@ CalendarCreator::CalendarCreator(const QString& resourceType, const KConfigGroup
mFinished(false)
{
// Read the resource configuration parameters from the config
const char* pathKey = Q_NULLPTR;
const char* pathKey = nullptr;
if (resourceType == QStringLiteral("file"))
{
mResourceType = LocalFile;
......
......@@ -64,7 +64,7 @@ class CalendarMigrator : public QObject
void calendarCreated(CalendarCreator*);
private:
CalendarMigrator(QObject* parent = Q_NULLPTR);
CalendarMigrator(QObject* parent = nullptr);
void migrateOrCreate();
void createDefaultResources();
template <class Interface> static bool updateStorageFormat(const Akonadi::AgentInstance&, QString& errorMessage, QObject* parent);
......
......@@ -60,7 +60,7 @@ class CollectionMimeTypeFilterModel : public Akonadi::EntityMimeTypeFilterModel
{
Q_OBJECT
public:
explicit CollectionMimeTypeFilterModel(QObject* parent = Q_NULLPTR);
explicit CollectionMimeTypeFilterModel(QObject* parent = nullptr);
void setEventTypeFilter(CalEvent::Type);
void setFilterWritable(bool writable);
void setFilterEnabled(bool enabled);
......@@ -244,7 +244,7 @@ QVariant CollectionListModel::data(const QModelIndex& index, int role) const
= which are disabled for that alarm type, are unchecked.
=============================================================================*/
CollectionListModel* CollectionCheckListModel::mModel = Q_NULLPTR;
CollectionListModel* CollectionCheckListModel::mModel = nullptr;
int CollectionCheckListModel::mInstanceCount = 0;
CollectionCheckListModel::CollectionCheckListModel(CalEvent::Type type, QObject* parent)
......@@ -253,7 +253,7 @@ CollectionCheckListModel::CollectionCheckListModel(CalEvent::Type type, QObject*
{
++mInstanceCount;
if (!mModel)
mModel = new CollectionListModel(Q_NULLPTR);
mModel = new CollectionListModel(nullptr);
setSourceModel(mModel); // the source model is NOT filtered by alarm type
mSelectionModel = new QItemSelectionModel(mModel);
setSelectionModel(mSelectionModel);
......@@ -281,7 +281,7 @@ CollectionCheckListModel::~CollectionCheckListModel()
if (--mInstanceCount <= 0)
{
delete mModel;
mModel = Q_NULLPTR;
mModel = nullptr;
}
}
......@@ -653,7 +653,7 @@ bool CollectionView::viewportEvent(QEvent* e)
= collection models.
=============================================================================*/
CollectionControlModel* CollectionControlModel::mInstance = Q_NULLPTR;
CollectionControlModel* CollectionControlModel::mInstance = nullptr;
bool CollectionControlModel::mAskDestination = false;
CollectionControlModel* CollectionControlModel::instance()
......@@ -665,7 +665,7 @@ CollectionControlModel* CollectionControlModel::instance()
CollectionControlModel::CollectionControlModel(QObject* parent)
: FavoriteCollectionsModel(AkonadiModel::instance(), KConfigGroup(KSharedConfig::openConfig(), "Collections"), parent),
mPopulatedCheckLoop(Q_NULLPTR)
mPopulatedCheckLoop(nullptr)
{
// Initialise the list of enabled collections
EntityMimeTypeFilterModel* filter = new EntityMimeTypeFilterModel(this);
......@@ -1300,7 +1300,7 @@ bool CollectionControlModel::waitUntilPopulated(Collection::Id colId, int timeou
result = mPopulatedCheckLoop->exec();
}
delete mPopulatedCheckLoop;
mPopulatedCheckLoop = Q_NULLPTR;
mPopulatedCheckLoop = nullptr;
return result;
}
......@@ -1310,7 +1310,7 @@ bool CollectionControlModel::waitUntilPopulated(Collection::Id colId, int timeou
void CollectionControlModel::reset()
{
delete mPopulatedCheckLoop;
mPopulatedCheckLoop = Q_NULLPTR;
mPopulatedCheckLoop = nullptr;
// Clear the collections list. This is required because addCollection() or
// setCollections() don't work if the collections which they specify are
......
......@@ -50,7 +50,7 @@ class CollectionListModel : public KDescendantsProxyModel
{
Q_OBJECT
public:
explicit CollectionListModel(QObject* parent = Q_NULLPTR);
explicit CollectionListModel(QObject* parent = nullptr);
void setEventTypeFilter(CalEvent::Type);
void setFilterWritable(bool writable);
void setFilterEnabled(bool enabled);
......@@ -78,7 +78,7 @@ class CollectionCheckListModel : public KCheckableProxyModel
{
Q_OBJECT
public:
explicit CollectionCheckListModel(CalEvent::Type, QObject* parent = Q_NULLPTR);
explicit CollectionCheckListModel(CalEvent::Type, QObject* parent = nullptr);
~CollectionCheckListModel();
Akonadi::Collection collection(int row) const;
Akonadi::Collection collection(const QModelIndex&) const;
......@@ -113,7 +113,7 @@ class CollectionFilterCheckListModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
explicit CollectionFilterCheckListModel(QObject* parent = Q_NULLPTR);
explicit CollectionFilterCheckListModel(QObject* parent = nullptr);
void setEventTypeFilter(CalEvent::Type);
Akonadi::Collection collection(int row) const;
Akonadi::Collection collection(const QModelIndex&) const;
......@@ -141,7 +141,7 @@ class CollectionView : public QListView
{
Q_OBJECT
public:
explicit CollectionView(CollectionFilterCheckListModel*, QWidget* parent = Q_NULLPTR);
explicit CollectionView(CollectionFilterCheckListModel*, QWidget* parent = nullptr);
CollectionFilterCheckListModel* collectionModel() const { return static_cast<CollectionFilterCheckListModel*>(model()); }
Akonadi::Collection collection(int row) const;
Akonadi::Collection collection(const QModelIndex&) const;
......@@ -252,7 +252,7 @@ class CollectionControlModel : public Akonadi::FavoriteCollectionsModel
* @param cancelled If non-null: set to true if the user cancelled
* the prompt dialogue; set to false if any other error.
*/
static Akonadi::Collection destination(CalEvent::Type, QWidget* promptparent = Q_NULLPTR, bool noPrompt = false, bool* cancelled = Q_NULLPTR);
static Akonadi::Collection destination(CalEvent::Type, QWidget* promptparent = nullptr, bool noPrompt = false, bool* cancelled = nullptr);
/** Return the enabled collections which contain a specified mime type.
* If 'writable' is true, only writable collections are included.
......@@ -288,7 +288,7 @@ class CollectionControlModel : public Akonadi::FavoriteCollectionsModel
void collectionPopulated();
private:
explicit CollectionControlModel(QObject* parent = Q_NULLPTR);
explicit CollectionControlModel(QObject* parent = nullptr);
void findEnabledCollections(const Akonadi::EntityMimeTypeFilterModel*, const QModelIndex& parent, Akonadi::Collection::List&) const;
CalEvent::Types setEnabledStatus(const Akonadi::Collection&, CalEvent::Types, bool inserted);
static CalEvent::Types checkTypesToEnable(const Akonadi::Collection&, const Akonadi::Collection::List&, CalEvent::Types);
......
......@@ -38,9 +38,9 @@ namespace
bool convInterval(const QString& timeParam, KARecurrence::Type&, int& timeInterval, bool allowMonthYear = false);
}
CommandOptions* CommandOptions::mInstance = Q_NULLPTR;
QCommandLineParser* CommandOptions::mParser = Q_NULLPTR;
QVector<QCommandLineOption*> CommandOptions::mOptions(Num_Options, Q_NULLPTR);
CommandOptions* CommandOptions::mInstance = nullptr;
QCommandLineParser* CommandOptions::mParser = nullptr;
QVector<QCommandLineOption*> CommandOptions::mOptions(Num_Options, nullptr);