Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6319fa4d authored by Laurent Montel's avatar Laurent Montel 😁

initialize pointer

parent 5765ecd1
......@@ -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;
......
......@@ -70,7 +70,7 @@ private:
void waitForIt();
void checkExitLoop();
Akonadi::ETMCalendar *mCalendar;
Akonadi::ETMCalendar *mCalendar = nullptr;
Akonadi::Collection mCollection;
int mIncidencesToAdd;
int mIncidencesToDelete;
......
......@@ -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;
......
......@@ -74,7 +74,7 @@ class IncidenceChangerTest : public QObject
Collection mCollection;
QHash<int, IncidenceChanger::ResultCode> mExpectedResultByChangeId;
IncidenceChanger *mChanger;
IncidenceChanger *mChanger = nullptr;
int mIncidencesToDelete;
int mIncidencesToAdd;
......
......@@ -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
......@@ -89,7 +89,7 @@ class MailClientTest : public QObject
Q_OBJECT
private:
MailClient *mMailClient;
MailClient *mMailClient = nullptr;
int mPendingSignals;
MailClient::Result mLastResult;
QString mLastErrorMessage;
......
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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;
};
......
......@@ -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()
......
......@@ -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)
......
......@@ -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;
......
......@@ -51,7 +51,7 @@ private Q_SLOTS:
private:
QUrl mUrl;
QByteArray mFreeBusyData;
QWidget *mParent;
QWidget *mParent = nullptr;
};
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
};
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
};
......
......@@ -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;
};
}
......
......@@ -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)
......
......@@ -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);
......
......@@ -42,7 +42,7 @@ public Q_SLOTS:
public:
Ui::PublishDialog_base mUI;
PublishDialog *q;
PublishDialog *q = nullptr;
};
}
#endif
......@@ -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);
......
......@@ -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)
......
......@@ -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;
......
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