Commit 5c8b873c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 1a042daf
Pipeline #31596 failed with stage
in 29 minutes and 15 seconds
......@@ -21,8 +21,6 @@ AlarmDialog::AlarmDialog(KCalendarCore::Incidence::IncidenceType incidenceType,
: QDialog(parent)
, mUi(new Ui::AlarmDialog)
, mIncidenceType(incidenceType)
, mAllowBeginReminders(true)
, mAllowEndReminders(true)
{
setWindowTitle(i18nc("@title:window", "Create a new reminder"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
......
......@@ -55,8 +55,8 @@ private:
private:
Ui::AlarmDialog *mUi = nullptr;
KCalendarCore::Incidence::IncidenceType mIncidenceType;
bool mAllowBeginReminders;
bool mAllowEndReminders;
bool mAllowBeginReminders = true;
bool mAllowEndReminders = true;
};
}
......
......@@ -43,7 +43,7 @@ public:
AttachmentIconItem(const KCalendarCore::Attachment &att, QListWidget *parent);
~AttachmentIconItem();
KCalendarCore::Attachment attachment() const;
Q_REQUIRED_RESULT KCalendarCore::Attachment attachment() const;
Q_REQUIRED_RESULT const QString uri() const;
Q_REQUIRED_RESULT const QString savedUri() const;
void setUri(const QString &uri);
......
......@@ -15,8 +15,6 @@ using namespace IncidenceEditorNG;
AttendeeTableModel::AttendeeTableModel(QObject *parent)
: QAbstractTableModel(parent)
, mKeepEmpty(false)
, mRemoveEmptyLines(false)
{
}
......@@ -277,7 +275,7 @@ ResourceFilterProxyModel::ResourceFilterProxyModel(QObject *parent)
bool ResourceFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
const QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
sourceParent);
KCalendarCore::Attendee::CuType cuType
= static_cast<KCalendarCore::Attendee::CuType>(sourceModel()->data(cuTypeIndex).toUInt());
......@@ -292,7 +290,7 @@ AttendeeFilterProxyModel::AttendeeFilterProxyModel(QObject *parent)
bool AttendeeFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
const QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
sourceParent);
KCalendarCore::Attendee::CuType cuType
= static_cast<KCalendarCore::Attendee::CuType>(sourceModel()->data(cuTypeIndex).toUInt());
......
......@@ -70,8 +70,8 @@ private:
KCalendarCore::Attendee::List mAttendeeList;
std::vector<AvailableStatus> mAttendeeAvailable;
bool mKeepEmpty;
bool mRemoveEmptyLines;
bool mKeepEmpty = false;
bool mRemoveEmptyLines = false;
};
class ResourceFilterProxyModel : public QSortFilterProxyModel
......
......@@ -11,14 +11,8 @@ using namespace IncidenceEditorNG;
class Q_DECL_HIDDEN AutoCheckTreeWidget::Private
{
public:
Private()
: mAutoCheckChildren(false)
, mAutoCheck(true)
{
}
bool mAutoCheckChildren;
bool mAutoCheck;
bool mAutoCheckChildren = false;
bool mAutoCheck = true;
};
//@endcond
......
......@@ -61,8 +61,6 @@ public:
ItemEditorPrivate::ItemEditorPrivate(Akonadi::IncidenceChanger *changer, EditorItemManager *qq)
: q_ptr(qq)
, mItemMonitor(nullptr)
, mIsCounterProposal(false)
, currentAction(EditorItemManager::None)
{
mFetchScope.fetchFullPayload();
......
......@@ -19,8 +19,6 @@ using namespace CalendarSupport;
IncidenceAlarm::IncidenceAlarm(IncidenceDateTime *dateTime, Ui::EventOrTodoDesktop *ui)
: mUi(ui)
, mDateTime(dateTime)
, mEnabledAlarmCount(0)
, mIsTodo(false)
{
setObjectName(QStringLiteral("IncidenceAlarm"));
......
......@@ -21,7 +21,6 @@ using namespace IncidenceEditorNG;
IncidenceCategories::IncidenceCategories(Ui::EventOrTodoDesktop *ui)
: mUi(ui)
, mDirty(false)
{
setObjectName(QStringLiteral("IncidenceCategories"));
......
......@@ -18,8 +18,6 @@ class IncidenceCompletionPriority::Private
public:
explicit Private(IncidenceCompletionPriority *parent)
: q(parent)
, mUi(nullptr)
, mOrigPercentCompleted(-1)
{
}
......
......@@ -20,12 +20,12 @@ namespace IncidenceEditorNG {
class IncidenceDescriptionPrivate
{
public:
IncidenceDescriptionPrivate() : mRichTextEnabled(false)
IncidenceDescriptionPrivate()
{
}
QString mRealOriginalDescriptionEditContents;
bool mRichTextEnabled;
bool mRichTextEnabled = false;
};
}
......
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