Commit 2a79e3a3 authored by Laurent Montel's avatar Laurent Montel 😁

Modernize code

parent 8a71c419
Pipeline #32747 passed with stage
in 23 minutes and 55 seconds
......@@ -38,9 +38,6 @@ static QString itemToString(const Akonadi::Item &item)
CalendarBasePrivate::CalendarBasePrivate(CalendarBase *qq)
: QObject()
, mIncidenceChanger(new IncidenceChanger())
, mBatchInsertionCancelled(false)
, mListensForNewItems(false)
, mLastCreationCancelled(false)
, q(qq)
{
connect(mIncidenceChanger, &IncidenceChanger::createFinished,
......
......@@ -20,7 +20,6 @@ CalendarClipboard::Private::Private(const Akonadi::CalendarBase::Ptr &calendar,
: QObject(qq)
, m_calendar(calendar)
, m_changer(changer)
, m_abortCurrentOperation(false)
, q(qq)
{
Q_ASSERT(m_calendar);
......
......@@ -25,12 +25,11 @@ class Q_DECL_HIDDEN CalFilterPartStatusProxyModel::Private
public:
explicit Private()
: mIdentityManager(KIdentityManagement::IdentityManager::self())
, mFilterVirtual(false)
{
}
QList<KCalendarCore::Attendee::PartStat> mBlockedStatusList;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
KIdentityManagement::IdentityManager * const mIdentityManager;
bool mFilterVirtual = false;
};
......
......@@ -35,13 +35,6 @@ using namespace KCalendarCore;
ETMCalendarPrivate::ETMCalendarPrivate(ETMCalendar *qq)
: CalendarBasePrivate(qq)
, mETM(nullptr)
, mFilteredETM(nullptr)
, mCheckableProxyModel(nullptr)
, mCollectionProxyModel(nullptr)
, mCalFilterProxyModel(nullptr)
, mCalFilterPartStatusProxyModel(nullptr)
, mSelectionProxy(nullptr)
, mCollectionFilteringEnabled(true)
, q(qq)
{
mListensForNewItems = true;
......
......@@ -119,7 +119,7 @@ public:
//filter out all invitations and declined events
Akonadi::CalFilterPartStatusProxyModel *mCalFilterPartStatusProxyModel = nullptr;
KSelectionProxyModel *mSelectionProxy = nullptr;
bool mCollectionFilteringEnabled;
bool mCollectionFilteringEnabled = true;
QSet<Akonadi::Collection::Id> mPopulatedCollectionIds;
QStringList mMimeTypes;
private:
......
......@@ -17,7 +17,6 @@ using namespace KCalendarCore;
FetchJobCalendarPrivate::FetchJobCalendarPrivate(FetchJobCalendar *qq)
: CalendarBasePrivate(qq)
, m_isLoaded(false)
, q(qq)
{
IncidenceFetchJob *job = new IncidenceFetchJob();
......
......@@ -26,7 +26,7 @@ public Q_SLOTS:
void slotFetchJobFinished();
public:
bool m_isLoaded;
bool m_isLoaded = false;
private:
FetchJobCalendar *const q;
......
......@@ -35,7 +35,7 @@ private Q_SLOTS:
private:
QUrl mUrl;
QByteArray mFreeBusyData;
QWidget *mParent = nullptr;
QWidget *const mParent;
};
}
......
......@@ -17,7 +17,6 @@
using namespace Akonadi;
Akonadi::IncidenceFetchJob::IncidenceFetchJob(QObject *parent) : Job(parent)
, m_jobCount(0)
{
m_mimeTypeChecker.addWantedMimeType(QStringLiteral("text/calendar"));
}
......
......@@ -13,14 +13,12 @@
using namespace Akonadi;
ITIPHandler::Private::Private(ITIPHandlerComponentFactory *factory, ITIPHandler *qq)
: m_calendarLoadError(false)
, m_factory(factory ? factory : new ITIPHandlerComponentFactory(this))
: m_factory(factory ? factory : new ITIPHandlerComponentFactory(this))
, m_scheduler(new MailScheduler(m_factory, qq))
, m_method(KCalendarCore::iTIPNoMethod)
, m_helper(new ITIPHandlerHelper(m_factory))
, m_currentOperation(OperationNone)
, m_uiDelegate(nullptr)
, m_showDialogsOnError(true)
, q(qq)
{
m_helper->setParent(this);
......
......@@ -521,7 +521,7 @@ public:
QItemSelectionModel *mItemSelectionModel = nullptr;
QHash<StandardCalendarActionManager::Type, QAction *> mActions;
QSet<StandardCalendarActionManager::Type> mInterceptedActions;
StandardCalendarActionManager *mParent = nullptr;
StandardCalendarActionManager *const mParent;
};
Akonadi::StandardCalendarActionManager::StandardCalendarActionManager(KActionCollection *actionCollection, QWidget *parent)
......
......@@ -15,11 +15,7 @@
using namespace Akonadi;
TodoPurger::Private::Private(TodoPurger *q)
: m_changer(nullptr)
, m_currentChangeId(-1)
, m_ignoredItems(0)
, m_calendarOwnership(true)
, q(q)
: q(q)
{
}
......
......@@ -24,9 +24,9 @@ public:
IncidenceChanger *m_changer = nullptr;
QString m_lastError;
CalendarBase::Ptr m_calendar;
int m_currentChangeId;
int m_ignoredItems;
bool m_calendarOwnership; // If false it's not ours.
int m_currentChangeId = -1;
int m_ignoredItems = 0;
bool m_calendarOwnership = true; // If false it's not ours.
void deleteTodos();
Q_REQUIRED_RESULT bool treeIsDeletable(const KCalendarCore::Todo::Ptr &todo);
......
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