Commit fc6bcf4b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 9c05d4e8
Pipeline #33662 passed with stage
in 19 minutes and 39 seconds
......@@ -27,15 +27,14 @@ public:
CategoryFilterProxyModelPrivate(CategoryFilterProxyModel *parent);
QList<Tag::Id> filterIdList;
bool filterEnabled;
bool filterEnabled = false;
private:
CategoryFilterProxyModel *q_ptr;
CategoryFilterProxyModel *const q_ptr;
};
CategoryFilterProxyModelPrivate::CategoryFilterProxyModelPrivate(CategoryFilterProxyModel *parent)
: QObject()
, filterEnabled(false)
, q_ptr(parent)
{
}
......
......@@ -30,7 +30,7 @@ public:
explicit CategorySelectWidgetPrivate(CategorySelectWidget *parent);
Akonadi::TagModel *tagModel = nullptr;
int rowOffset;
int rowOffset = 0;
QTimer *updateTimer = nullptr;
KPIM::KCheckComboBox *checkCombo = nullptr;
......@@ -51,15 +51,11 @@ public Q_SLOTS:
void slotCheckedItemsTimer();
private:
CategorySelectWidget *q_ptr;
CategorySelectWidget *const q_ptr;
};
CategorySelectWidgetPrivate::CategorySelectWidgetPrivate(CategorySelectWidget *parent)
: QObject()
, tagModel(nullptr)
, rowOffset(0)
, updateTimer(nullptr)
, checkCombo(nullptr)
, q_ptr(parent)
{
}
......
......@@ -88,7 +88,7 @@ private:
mutable Cache mGroupsCache;
mutable QStringList mPendingGroups;
const QVector<int>mKrole {PictureRole, InitialsRole, DescriptionRole};
Akonadi::Monitor *mMonitor = nullptr;
Akonadi::Monitor *const mMonitor;
};
#endif // CONTACTINFOPROXYMODEL_H
......@@ -15,7 +15,6 @@
ContactSwitcher::ContactSwitcher(QWidget *parent)
: QWidget(parent)
, mView(nullptr)
{
QHBoxLayout *layout = new QHBoxLayout(this);
......
......@@ -28,7 +28,6 @@ class KAddressBookApplication : public KontactInterface::PimUniqueApplication
public:
KAddressBookApplication(int &argc, char **argv[])
: KontactInterface::PimUniqueApplication(argc, argv)
, mMainWindow(nullptr)
{
}
......
......@@ -30,7 +30,7 @@ private:
void slotCollectionPropertiesFinished(KJob *job);
QHash<Akonadi::Collection::Id, QPointer<Akonadi::CollectionPropertiesDialog> > mHashDialogBox;
QStringList mPages;
MainWidget *mMainWidget = nullptr;
MainWidget *const mMainWidget;
};
#endif // MANAGESHOWCOLLECTIONPROPERTIES_H
......@@ -57,7 +57,7 @@ protected:
private:
void adaptHeaderView();
Akonadi::ContactsTreeModel *mModel = nullptr;
Akonadi::ContactsTreeModel *const mModel;
Akonadi::ContactsTreeModel::Columns mColumns;
QWidget *mWidget = nullptr;
};
......
......@@ -25,7 +25,7 @@ public:
void print(const KContacts::Addressee::List &, PrintProgress *) override;
private:
QString m_themePath;
const QString m_themePath;
};
class GrantleeStyleFactory : public PrintStyleFactory
......
......@@ -9,8 +9,8 @@
UserFeedBackManager::UserFeedBackManager(QObject *parent)
: QObject(parent)
, mUserFeedbackProvider(new KAddressBookUserFeedbackProvider(this))
{
mUserFeedbackProvider = new KAddressBookUserFeedbackProvider(this);
}
UserFeedBackManager *UserFeedBackManager::self()
......
......@@ -23,7 +23,7 @@ public:
KUserFeedback::Provider *userFeedbackProvider() const;
private:
KUserFeedback::Provider *mUserFeedbackProvider = nullptr;
KUserFeedback::Provider *const mUserFeedbackProvider;
};
#endif // USERFEEDBACKMANAGER_H
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