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

Revert "Use nullptr"

interessant clang-tidy bug... I don't understand how clang-tidy can
create this type of bug.

This reverts commit a97e32dc.
parent a97e32dc
......@@ -251,7 +251,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
void AlarmTimeWidget::setReadOnly(bool ro)
{
mAtTimeRadio->setReadOnly(ro);
mDateEdit->setOptions(ro ? KDateComboBox::Options(nullptr) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mDateEdit->setOptions(ro ? KDateComboBox::Options(0) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mTimeEdit->setReadOnly(ro);
if (mAnyTimeCheckBox)
mAnyTimeCheckBox->setReadOnly(ro);
......
......@@ -227,7 +227,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
Preferences::defaultSoundVolume(), -1, 0, Preferences::defaultSoundRepeat());
if (mSpecialActionsButton)
{
KAEvent::ExtraActionOptions opts(nullptr);
KAEvent::ExtraActionOptions opts(0);
if (Preferences::defaultExecPreActionOnDeferral())
opts |= KAEvent::ExecPreActOnDeferral;
if (Preferences::defaultCancelOnPreActionError())
......
......@@ -143,7 +143,7 @@ bool CalendarMigrator::mCompleted = false;
CalendarMigrator::CalendarMigrator(QObject* parent)
: QObject(parent),
mExistingAlarmTypes(nullptr)
mExistingAlarmTypes(0)
{
}
......
......@@ -762,8 +762,8 @@ CalEvent::Types CollectionControlModel::setEnabled(const Collection& collection,
CalEvent::Types CollectionControlModel::setEnabledStatus(const Collection& collection, CalEvent::Types types, bool inserted)
{
qCDebug(KALARM_LOG) << "id:" << collection.id() << ", types=" << types;
CalEvent::Types disallowedStdTypes(nullptr);
CalEvent::Types stdTypes(nullptr);
CalEvent::Types disallowedStdTypes(0);
CalEvent::Types stdTypes(0);
// Prevent the enabling of duplicate alarm types if another collection
// uses the same backend storage.
......
......@@ -475,7 +475,7 @@ KDateTime DBusHandler::convertDateTime(const QString& dateTime, const KDateTime&
*/
KAEvent::Flags DBusHandler::convertStartFlags(const KDateTime& start, unsigned flags)
{
KAEvent::Flags kaEventFlags = nullptr;
KAEvent::Flags kaEventFlags = 0;
if (flags & REPEAT_AT_LOGIN) kaEventFlags |= KAEvent::REPEAT_AT_LOGIN;
if (flags & BEEP) kaEventFlags |= KAEvent::BEEP;
if (flags & SPEAK) kaEventFlags |= KAEvent::SPEAK;
......
......@@ -859,7 +859,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
*/
KAEvent::Flags EditAlarmDlg::getAlarmFlags() const
{
KAEvent::Flags flags(nullptr);
KAEvent::Flags flags(0);
if (mShowInKorganizer && mShowInKorganizer->isEnabled() && mShowInKorganizer->isChecked())
flags |= KAEvent::COPY_KORGANIZER;
if (mRecurrenceEdit->repeatType() == RecurrenceEdit::AT_LOGIN)
......
......@@ -1466,7 +1466,7 @@ void EditPrefTab::restore(bool, bool allTabs)
case TimePeriod::Minutes: index = 0; break;
}
mReminderUnits->setCurrentIndex(index);
KAEvent::ExtraActionOptions opts(nullptr);
KAEvent::ExtraActionOptions opts(0);
if (Preferences::defaultExecPreActionOnDeferral())
opts |= KAEvent::ExecPreActOnDeferral;
if (Preferences::defaultCancelOnPreActionError())
......
......@@ -276,7 +276,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
"<para><note>This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence.</note></para>"));
mRangeButtonGroup->addButton(mEndDateButton);
mEndDateEdit = new KDateComboBox(mRangeButtonBox);
mEndDateEdit->setOptions(mReadOnly ? KDateComboBox::Options(nullptr) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mEndDateEdit->setOptions(mReadOnly ? KDateComboBox::Options(0) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
static const QString tzText = i18nc("@info", "This uses the same time zone as the start time.");
mEndDateEdit->setWhatsThis(xi18nc("@info:whatsthis",
"<para>Enter the last date to repeat the alarm.</para><para>%1</para>", tzText));
......@@ -336,7 +336,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
vlayout->setMargin(0);
hlayout->addLayout(vlayout);
mExceptionDateEdit = new KDateComboBox(mExceptionGroup);
mExceptionDateEdit->setOptions(mReadOnly ? KDateComboBox::Options(nullptr) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mExceptionDateEdit->setOptions(mReadOnly ? KDateComboBox::Options(0) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mExceptionDateEdit->setDate(KDateTime::currentLocalDate());
mExceptionDateEdit->setWhatsThis(i18nc("@info:whatsthis",
"Enter a date to insert in the exceptions list. "
......
......@@ -604,7 +604,7 @@ void ResourceSelector::showInfo()
name, id, calType, alarmTypeString, storage, location, perms, enabled, std);
// Display the collection information. Because the user requested
// the information, don't raise a KNotify event.
KAMessageBox::information(this, text, QString(), QString(), nullptr);
KAMessageBox::information(this, text, QString(), QString(), 0);
}
}
......
......@@ -47,7 +47,7 @@
SpecialActionsButton::SpecialActionsButton(bool enableCheckboxes, QWidget* parent)
: QPushButton(i18nc("@action:button", "Special Actions..."), parent),
mOptions(nullptr),
mOptions(0),
mEnableCheckboxes(enableCheckboxes),
mReadOnly(false)
{
......@@ -247,7 +247,7 @@ QString SpecialActions::postAction() const
KAEvent::ExtraActionOptions SpecialActions::options() const
{
KAEvent::ExtraActionOptions opts = nullptr;
KAEvent::ExtraActionOptions opts = 0;
if (mExecOnDeferral->isChecked()) opts |= KAEvent::ExecPreActOnDeferral;
if (mCancelOnError->isChecked()) opts |= KAEvent::CancelOnPreActError;
if (mDontShowError->isChecked()) opts |= KAEvent::DontShowPreActError;
......
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