aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-28 08:30:57 +0200
committerMontel Laurent <[email protected]>2017-08-28 08:30:57 +0200
commit6319fa4d5f75667741402ea7bb4341aa3f32c82a (patch)
treea1e00cb4ce02767e4b8ea37ea65bd273c6dbe62d
parent5765ecd1595232d2bd9724c2f95e9faa600d9da1 (diff)
initialize pointer
-rw-r--r--autotests/calendarbasetest.h4
-rw-r--r--autotests/etmcalendartest.h2
-rw-r--r--autotests/historytest.h2
-rw-r--r--autotests/incidencechangertest.cpp2
-rw-r--r--autotests/itiphandlertest.h6
-rw-r--r--autotests/mailclienttest.cpp2
-rw-r--r--autotests/todopurgertest.h6
-rw-r--r--autotests/unittestbase.h2
-rw-r--r--src/calendarbase_p.h8
-rw-r--r--src/calendarclipboard_p.h6
-rw-r--r--src/calfilterpartstatusproxymodel_p.cpp4
-rw-r--r--src/calfilterproxymodel_p.cpp3
-rw-r--r--src/etmcalendar_p.h12
-rw-r--r--src/freebusydownloadjob_p.h2
-rw-r--r--src/history_p.h4
-rw-r--r--src/icalimporter_p.h6
-rw-r--r--src/incidencechanger_p.h22
-rw-r--r--src/itiphandler.h2
-rw-r--r--src/itiphandler_p.h8
-rw-r--r--src/itiphandlerhelper_p.h6
-rw-r--r--src/mailclient_p.h2
-rw-r--r--src/mailscheduler_p.cpp4
-rw-r--r--src/publishdialog_p.cpp3
-rw-r--r--src/publishdialog_p.h2
-rw-r--r--src/scheduler_p.h2
-rw-r--r--src/standardcalendaractionmanager.cpp12
-rw-r--r--src/todopurger_p.h2
27 files changed, 67 insertions, 69 deletions
diff --git a/autotests/calendarbasetest.h b/autotests/calendarbasetest.h
index ebef880..fcc012c 100644
--- a/autotests/calendarbasetest.h
+++ b/autotests/calendarbasetest.h
@@ -53,8 +53,8 @@ private:
Akonadi::Item::Id createTodo(const QString &uid, const QString &parentUid = QString());
Akonadi::Collection mCollection;
- Akonadi::CalendarBase *mCalendar;
- bool mExpectedSlotResult;
+ Akonadi::CalendarBase *mCalendar = nullptr;
+ bool mExpectedSlotResult = false;
QStringList mUids;
QString mOneEventUid;
QString mOneTodoUid;
diff --git a/autotests/etmcalendartest.h b/autotests/etmcalendartest.h
index 44d8355..0b24cc0 100644
--- a/autotests/etmcalendartest.h
+++ b/autotests/etmcalendartest.h
@@ -70,7 +70,7 @@ private:
void waitForIt();
void checkExitLoop();
- Akonadi::ETMCalendar *mCalendar;
+ Akonadi::ETMCalendar *mCalendar = nullptr;
Akonadi::Collection mCollection;
int mIncidencesToAdd;
int mIncidencesToDelete;
diff --git a/autotests/historytest.h b/autotests/historytest.h
index 0e50d89..fd67d94 100644
--- a/autotests/historytest.h
+++ b/autotests/historytest.h
@@ -37,7 +37,7 @@ enum SignalType {
class HistoryTest : public UnitTestBase
{
Q_OBJECT
- History *mHistory;
+ History *mHistory = nullptr;
QHash<SignalType, int> mPendingSignals;
QHash<int, Akonadi::Item> mItemByChangeId;
QList<int> mKnownChangeIds;
diff --git a/autotests/incidencechangertest.cpp b/autotests/incidencechangertest.cpp
index 3f3bc85..99c4f07 100644
--- a/autotests/incidencechangertest.cpp
+++ b/autotests/incidencechangertest.cpp
@@ -74,7 +74,7 @@ class IncidenceChangerTest : public QObject
Collection mCollection;
QHash<int, IncidenceChanger::ResultCode> mExpectedResultByChangeId;
- IncidenceChanger *mChanger;
+ IncidenceChanger *mChanger = nullptr;
int mIncidencesToDelete;
int mIncidencesToAdd;
diff --git a/autotests/itiphandlertest.h b/autotests/itiphandlertest.h
index f40f646..faa9c49 100644
--- a/autotests/itiphandlertest.h
+++ b/autotests/itiphandlertest.h
@@ -87,9 +87,9 @@ private:
int m_pendingIncidenceChangerSignal;
Akonadi::Item mLastInsertedItem;
Akonadi::ITIPHandler::Result m_expectedResult;
- Akonadi::ITIPHandler *m_itipHandler;
- Akonadi::IncidenceChanger *m_changer;
- bool m_cancelExpected;
+ Akonadi::ITIPHandler *m_itipHandler = nullptr;
+ Akonadi::IncidenceChanger *m_changer = nullptr;
+ bool m_cancelExpected = false;
};
#endif
diff --git a/autotests/mailclienttest.cpp b/autotests/mailclienttest.cpp
index bc5e021..e9c87ff 100644
--- a/autotests/mailclienttest.cpp
+++ b/autotests/mailclienttest.cpp
@@ -89,7 +89,7 @@ class MailClientTest : public QObject
Q_OBJECT
private:
- MailClient *mMailClient;
+ MailClient *mMailClient = nullptr;
int mPendingSignals;
MailClient::Result mLastResult;
QString mLastErrorMessage;
diff --git a/autotests/todopurgertest.h b/autotests/todopurgertest.h
index 77404e6..e9cfda2 100644
--- a/autotests/todopurgertest.h
+++ b/autotests/todopurgertest.h
@@ -50,16 +50,16 @@ private:
void createTodo(const QString &uid, const QString &parentUid, bool completed, bool recurring = false);
void fetchCollection();
- Akonadi::ETMCalendar *m_calendar;
+ Akonadi::ETMCalendar *m_calendar = nullptr;
Akonadi::Collection m_collection;
int m_pendingCreations;
int m_pendingDeletions;
- bool m_pendingPurgeSignal;
+ bool m_pendingPurgeSignal = false;
int m_numDeleted;
int m_numIgnored;
- Akonadi::TodoPurger *m_todoPurger;
+ Akonadi::TodoPurger *m_todoPurger = nullptr;
};
#endif
diff --git a/autotests/unittestbase.h b/autotests/unittestbase.h
index 1a8adb6..c030a1f 100644
--- a/autotests/unittestbase.h
+++ b/autotests/unittestbase.h
@@ -54,7 +54,7 @@ protected:
static Akonadi::Item generateIncidence(const QString &uid, const QString &organizer = QString());
Akonadi::Collection mCollection;
- Akonadi::IncidenceChanger *mChanger;
+ Akonadi::IncidenceChanger *mChanger = nullptr;
};
#endif
diff --git a/src/calendarbase_p.h b/src/calendarbase_p.h
index 740c071..4a71273 100644
--- a/src/calendarbase_p.h
+++ b/src/calendarbase_p.h
@@ -74,13 +74,13 @@ public:
QHash<KJob *, Akonadi::Collection::Id> mCollectionJobs;
QHash<QString, Akonadi::Item::Id> mItemIdByUid;
QHash<Akonadi::Item::Id, Akonadi::Item> mItemById;
- Akonadi::IncidenceChanger *mIncidenceChanger;
+ Akonadi::IncidenceChanger *mIncidenceChanger = nullptr;
QHash<QString, QStringList> mParentUidToChildrenUid;
QWeakPointer<CalendarBase> mWeakPointer;
Akonadi::Collection mCollectionForBatchInsertion;
- bool mBatchInsertionCancelled;
- bool mListensForNewItems; // does this model detect new item creations ?
- bool mLastCreationCancelled; // User pressed cancel in the collection selection dialog
+ bool mBatchInsertionCancelled = false;
+ bool mListensForNewItems = false; // does this model detect new item creations ?
+ bool mLastCreationCancelled = false; // User pressed cancel in the collection selection dialog
// Hash with uid->parentUid. When receiving onDataChanged() we need a way
// to obtain the original RELATED-TO. Because RELATED-TO might have been modified
diff --git a/src/calendarclipboard_p.h b/src/calendarclipboard_p.h
index 966c8fa..b992b0c 100644
--- a/src/calendarclipboard_p.h
+++ b/src/calendarclipboard_p.h
@@ -84,9 +84,9 @@ public Q_SLOTS:
public:
Akonadi::CalendarBase::Ptr m_calendar;
- Akonadi::IncidenceChanger *m_changer;
- KCalUtils::DndFactory *m_dndfactory;
- bool m_abortCurrentOperation;
+ Akonadi::IncidenceChanger *m_changer = nullptr;
+ KCalUtils::DndFactory *m_dndfactory = nullptr;
+ bool m_abortCurrentOperation = false;
QSet<int> m_pendingChangeIds;
CalendarClipboard *const q;
};
diff --git a/src/calfilterpartstatusproxymodel_p.cpp b/src/calfilterpartstatusproxymodel_p.cpp
index 2d183b9..f8fbce7 100644
--- a/src/calfilterpartstatusproxymodel_p.cpp
+++ b/src/calfilterpartstatusproxymodel_p.cpp
@@ -42,9 +42,9 @@ public:
{
}
- bool mFilterVirtual;
+ bool mFilterVirtual = false;
QList<KCalCore::Attendee::PartStat> mBlockedStatusList;
- KIdentityManagement::IdentityManager *mIdentityManager;
+ KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
void CalFilterPartStatusProxyModel::slotIdentitiesChanged()
diff --git a/src/calfilterproxymodel_p.cpp b/src/calfilterproxymodel_p.cpp
index c34aa12..6ed0155 100644
--- a/src/calfilterproxymodel_p.cpp
+++ b/src/calfilterproxymodel_p.cpp
@@ -33,10 +33,9 @@ class Q_DECL_HIDDEN CalFilterProxyModel::Private
{
public:
explicit Private()
- : filter(nullptr)
{
}
- KCalCore::CalFilter *filter;
+ KCalCore::CalFilter *filter = nullptr;
};
CalFilterProxyModel::CalFilterProxyModel(QObject *parent)
diff --git a/src/etmcalendar_p.h b/src/etmcalendar_p.h
index e0c45a8..1a9c9fb 100644
--- a/src/etmcalendar_p.h
+++ b/src/etmcalendar_p.h
@@ -131,16 +131,16 @@ public Q_SLOTS:
public:
Akonadi::CalendarModel::Ptr mETM;
- Akonadi::EntityMimeTypeFilterModel *mFilteredETM;
+ Akonadi::EntityMimeTypeFilterModel *mFilteredETM = nullptr;
// akonadi id to collections
QHash<Akonadi::Collection::Id, Akonadi::Collection> mCollectionMap;
- CheckableProxyModel *mCheckableProxyModel;
- Akonadi::CollectionFilterProxyModel *mCollectionProxyModel;
- Akonadi::CalFilterProxyModel *mCalFilterProxyModel; //KCalCore::CalFilter stuff
+ CheckableProxyModel *mCheckableProxyModel = nullptr;
+ Akonadi::CollectionFilterProxyModel *mCollectionProxyModel = nullptr;
+ Akonadi::CalFilterProxyModel *mCalFilterProxyModel = nullptr; //KCalCore::CalFilter stuff
//filter out all invitations and declined events
- Akonadi::CalFilterPartStatusProxyModel *mCalFilterPartStatusProxyModel;
- KSelectionProxyModel *mSelectionProxy;
+ Akonadi::CalFilterPartStatusProxyModel *mCalFilterPartStatusProxyModel = nullptr;
+ KSelectionProxyModel *mSelectionProxy = nullptr;
bool mCollectionFilteringEnabled;
QSet<Akonadi::Collection::Id> mPopulatedCollectionIds;
QStringList mMimeTypes;
diff --git a/src/freebusydownloadjob_p.h b/src/freebusydownloadjob_p.h
index c3712b9..fabe6af 100644
--- a/src/freebusydownloadjob_p.h
+++ b/src/freebusydownloadjob_p.h
@@ -51,7 +51,7 @@ private Q_SLOTS:
private:
QUrl mUrl;
QByteArray mFreeBusyData;
- QWidget *mParent;
+ QWidget *mParent = nullptr;
};
}
diff --git a/src/history_p.h b/src/history_p.h
index 637b1e6..3320ead 100644
--- a/src/history_p.h
+++ b/src/history_p.h
@@ -63,9 +63,9 @@ protected:
virtual bool redo() = 0;
void updateIdsGlobaly(Item::Id oldId, Item::Id newId);
QWidget *currentParent() const;
- IncidenceChanger *mChanger;
+ IncidenceChanger *mChanger = nullptr;
QHash<Akonadi::Item::Id, int> mLatestRevisionByItemId;
- History *q;
+ History *q = nullptr;
QVector<int> mChangeIds;
private:
void init(const QString &description, History *qq);
diff --git a/src/icalimporter_p.h b/src/icalimporter_p.h
index 7c4ee3f..54089fd 100644
--- a/src/icalimporter_p.h
+++ b/src/icalimporter_p.h
@@ -52,13 +52,13 @@ public:
void setErrorMessage(const QString &message);
ICalImporter *const q;
- Akonadi::IncidenceChanger *m_changer;
+ Akonadi::IncidenceChanger *m_changer = nullptr;
int m_numIncidences;
QList<int> m_pendingRequests;
QString m_lastErrorMessage;
- bool m_working;
- QTemporaryFile *m_temporaryFile;
+ bool m_working = false;
+ QTemporaryFile *m_temporaryFile = nullptr;
Akonadi::Collection m_collection;
public Q_SLOTS:
void resourceCreated(KJob *job);
diff --git a/src/incidencechanger_p.h b/src/incidencechanger_p.h
index eef913d..f0c21dd 100644
--- a/src/incidencechanger_p.h
+++ b/src/incidencechanger_p.h
@@ -257,9 +257,9 @@ public:
private:
Q_DISABLE_COPY(AtomicOperation)
QVector<Change::Ptr> m_changes;
- bool m_wasRolledback;
- Akonadi::TransactionSequence *m_transaction; // constructed in first use
- IncidenceChanger::Private *m_incidenceChangerPrivate;
+ bool m_wasRolledback = false;
+ Akonadi::TransactionSequence *m_transaction = nullptr; // constructed in first use
+ IncidenceChanger::Private *m_incidenceChangerPrivate = nullptr;
};
class Q_DECL_HIDDEN IncidenceChanger::Private : public QObject
@@ -322,14 +322,14 @@ public Q_SLOTS:
public:
int mLatestChangeId;
QHash<const KJob *, Change::Ptr> mChangeForJob;
- bool mShowDialogsOnError;
+ bool mShowDialogsOnError = false;
Akonadi::Collection mDefaultCollection;
DestinationPolicy mDestinationPolicy;
QVector<Akonadi::Item::Id> mDeletedItemIds;
Change::List mPendingCreations; // Creations waiting for collections to be loaded
- History *mHistory;
- bool mUseHistory;
+ History *mHistory = nullptr;
+ bool mUseHistory = false;
/**
Queue modifications by ID. We can only send a modification to akonadi when the previous
@@ -353,8 +353,8 @@ public:
*/
QHash<uint, AtomicOperation *> mAtomicOperations;
- bool mRespectsCollectionRights;
- bool mGroupwareCommunication;
+ bool mRespectsCollectionRights = false;
+ bool mGroupwareCommunication = false;
QHash<Akonadi::TransactionSequence *, uint> mAtomicOperationByTransaction;
QHash<uint, ITIPHandlerHelper::SendResult> mInvitationStatusByAtomicOperation;
@@ -364,15 +364,15 @@ public:
Akonadi::Collection mLastCollectionUsed;
bool mAutoAdjustRecurrence;
- Akonadi::CollectionFetchJob *m_collectionFetchJob;
+ Akonadi::CollectionFetchJob *m_collectionFetchJob = nullptr;
QMap<KJob *, QSet<KCalCore::IncidenceBase::Field> > mDirtyFieldsByJob;
IncidenceChanger::InvitationPolicy m_invitationPolicy;
- ITIPHandlerComponentFactory *mFactory;
+ ITIPHandlerComponentFactory *mFactory = nullptr;
private:
- IncidenceChanger *q;
+ IncidenceChanger *q = nullptr;
};
}
diff --git a/src/itiphandler.h b/src/itiphandler.h
index 2950455..4602133 100644
--- a/src/itiphandler.h
+++ b/src/itiphandler.h
@@ -183,7 +183,7 @@ protected:
const KGuiItem &buttonNo) const;
// parent of the dialog
- QWidget *mParent;
+ QWidget *mParent = nullptr;
// Incidence related to the dialog
KCalCore::Incidence::Ptr mIncidence;
diff --git a/src/itiphandler_p.h b/src/itiphandler_p.h
index 94d9b72..4a7a000 100644
--- a/src/itiphandler_p.h
+++ b/src/itiphandler_p.h
@@ -75,14 +75,14 @@ public:
Invitation m_queuedInvitation;
bool m_calendarLoadError;
CalendarBase::Ptr m_calendar;
- ITIPHandlerComponentFactory *m_factory;
- MailScheduler *m_scheduler;
+ ITIPHandlerComponentFactory *m_factory = nullptr;
+ MailScheduler *m_scheduler = nullptr;
KCalCore::Incidence::Ptr m_incidence;
KCalCore::iTIPMethod m_method; // METHOD field of ical rfc of incoming invitation
- ITIPHandlerHelper *m_helper;
+ ITIPHandlerHelper *m_helper = nullptr;
Operation m_currentOperation;
QPointer<QWidget> m_parentWidget; // To be used for KMessageBoxes
- GroupwareUiDelegate *m_uiDelegate;
+ GroupwareUiDelegate *m_uiDelegate = nullptr;
bool m_showDialogsOnError;
ITIPHandler *const q;
diff --git a/src/itiphandlerhelper_p.h b/src/itiphandlerhelper_p.h
index bcc73f4..05035fd 100644
--- a/src/itiphandlerhelper_p.h
+++ b/src/itiphandlerhelper_p.h
@@ -183,9 +183,9 @@ private:
bool weNeedToSendMailFor(const KCalCore::Incidence::Ptr &incidence);
ITIPHandlerDialogDelegate::Action mDefaultAction;
- QWidget *mParent;
- ITIPHandlerComponentFactory *m_factory;
- MailScheduler *m_scheduler;
+ QWidget *mParent = nullptr;
+ ITIPHandlerComponentFactory *m_factory = nullptr;
+ MailScheduler *m_scheduler = nullptr;
Status m_status;
};
diff --git a/src/mailclient_p.h b/src/mailclient_p.h
index aa9726b..c112322 100644
--- a/src/mailclient_p.h
+++ b/src/mailclient_p.h
@@ -118,7 +118,7 @@ Q_SIGNALS:
public:
// For unit-test usage, since we can't depend on kdepim-runtime on jenkins
- ITIPHandlerComponentFactory *mFactory;
+ ITIPHandlerComponentFactory *mFactory = nullptr;
};
}
diff --git a/src/mailscheduler_p.cpp b/src/mailscheduler_p.cpp
index e1c2c36..725b53c 100644
--- a/src/mailscheduler_p.cpp
+++ b/src/mailscheduler_p.cpp
@@ -40,8 +40,8 @@ using namespace KIdentityManagement;
class Q_DECL_HIDDEN MailScheduler::Private
{
public:
- KIdentityManagement::IdentityManager *m_identityManager;
- MailClient *m_mailer;
+ KIdentityManagement::IdentityManager *m_identityManager = nullptr;
+ MailClient *m_mailer = nullptr;
};
MailScheduler::MailScheduler(ITIPHandlerComponentFactory *factory, QObject *parent) : Scheduler(parent)
diff --git a/src/publishdialog_p.cpp b/src/publishdialog_p.cpp
index 87f09c3..743d097 100644
--- a/src/publishdialog_p.cpp
+++ b/src/publishdialog_p.cpp
@@ -61,8 +61,7 @@ void PublishDialog::Private::removeItem()
if (mUI.mListWidget->selectedItems().isEmpty()) {
return;
}
- QListWidgetItem *item;
- item = mUI.mListWidget->selectedItems().at(0);
+ QListWidgetItem *item = mUI.mListWidget->selectedItems().at(0);
int row = mUI.mListWidget->row(item);
mUI.mListWidget->takeItem(row);
diff --git a/src/publishdialog_p.h b/src/publishdialog_p.h
index fb1b36e..cd181cf 100644
--- a/src/publishdialog_p.h
+++ b/src/publishdialog_p.h
@@ -42,7 +42,7 @@ public Q_SLOTS:
public:
Ui::PublishDialog_base mUI;
- PublishDialog *q;
+ PublishDialog *q = nullptr;
};
}
#endif
diff --git a/src/scheduler_p.h b/src/scheduler_p.h
index 890f002..87209ef 100644
--- a/src/scheduler_p.h
+++ b/src/scheduler_p.h
@@ -170,7 +170,7 @@ protected:
void acceptFreeBusy(const KCalCore::IncidenceBase::Ptr &incidence,
KCalCore::iTIPMethod method);
- KCalCore::ICalFormat *mFormat;
+ KCalCore::ICalFormat *mFormat = nullptr;
Q_SIGNALS:
void transactionFinished(Akonadi::Scheduler::Result, const QString &errorMessage);
diff --git a/src/standardcalendaractionmanager.cpp b/src/standardcalendaractionmanager.cpp
index 3ea73ca..372a44e 100644
--- a/src/standardcalendaractionmanager.cpp
+++ b/src/standardcalendaractionmanager.cpp
@@ -527,14 +527,14 @@ public:
// dummy as long as there are no editors available in kdepimlibs/
}
- KActionCollection *mActionCollection;
- QWidget *mParentWidget;
- StandardActionManager *mGenericManager;
- QItemSelectionModel *mCollectionSelectionModel;
- QItemSelectionModel *mItemSelectionModel;
+ KActionCollection *mActionCollection = nullptr;
+ QWidget *mParentWidget = nullptr;
+ StandardActionManager *mGenericManager = nullptr;
+ QItemSelectionModel *mCollectionSelectionModel = nullptr;
+ QItemSelectionModel *mItemSelectionModel = nullptr;
QHash<StandardCalendarActionManager::Type, QAction *> mActions;
QSet<StandardCalendarActionManager::Type> mInterceptedActions;
- StandardCalendarActionManager *mParent;
+ StandardCalendarActionManager *mParent = nullptr;
};
Akonadi::StandardCalendarActionManager::StandardCalendarActionManager(KActionCollection *actionCollection, QWidget *parent)
diff --git a/src/todopurger_p.h b/src/todopurger_p.h
index 5845c56..4e64a1c 100644
--- a/src/todopurger_p.h
+++ b/src/todopurger_p.h
@@ -36,7 +36,7 @@ class Q_DECL_HIDDEN TodoPurger::Private : public QObject
Q_OBJECT
public:
Private(TodoPurger *q);
- IncidenceChanger *m_changer;
+ IncidenceChanger *m_changer = nullptr;
QString m_lastError;
CalendarBase::Ptr m_calendar;
int m_currentChangeId;