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 dbdcca9b authored by Laurent Montel's avatar Laurent Montel 😁

initialize pointer

parent aa453cdc
......@@ -38,11 +38,11 @@ public:
void expunge(Akonadi::Collection::Id col, bool sync) override;
private:
KIdentityManagement::IdentityManager *mIdentityManager;
MessageComposer::MessageSender *mMessageSender;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor;
Akonadi::EntityTreeModel *mEntityTreeModel;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
MessageComposer::MessageSender *mMessageSender = nullptr;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor = nullptr;
Akonadi::EntityTreeModel *mEntityTreeModel = nullptr;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel = nullptr;
};
#endif
......@@ -255,9 +255,9 @@ private:
}
static QStringList collectNames(QAbstractItemModel *model);
EntityMimeTypeFilterModel *mCollectionModel;
QAbstractItemModel *mTopModel;
MailCommon::FolderTreeWidget *mFolderTreeWidget;
EntityMimeTypeFilterModel *mCollectionModel = nullptr;
QAbstractItemModel *mTopModel = nullptr;
MailCommon::FolderTreeWidget *mFolderTreeWidget = nullptr;
QStringList mFolderNames;
};
......
......@@ -59,17 +59,17 @@ private:
void saveAndExpire(Akonadi::Collection &collection, bool saveSettings, bool _expirenow);
private:
QCheckBox *expireReadMailCB;
KPluralHandlingSpinBox *expireReadMailSB;
QCheckBox *expireUnreadMailCB;
KPluralHandlingSpinBox *expireUnreadMailSB;
QRadioButton *moveToRB;
FolderRequester *folderSelector;
QRadioButton *deletePermanentlyRB;
QPushButton *expireNowPB;
QCheckBox *expireReadMailCB = nullptr;
KPluralHandlingSpinBox *expireReadMailSB = nullptr;
QCheckBox *expireUnreadMailCB = nullptr;
KPluralHandlingSpinBox *expireUnreadMailSB = nullptr;
QRadioButton *moveToRB = nullptr;
FolderRequester *folderSelector = nullptr;
QRadioButton *deletePermanentlyRB = nullptr;
QPushButton *expireNowPB = nullptr;
Akonadi::Collection mCollection;
bool mChanged;
bool mChanged = false;
};
AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionExpiryPageFactory, CollectionExpiryPage)
......
......@@ -82,7 +82,7 @@ void CollectionGeneralPage::init(const Akonadi::Collection &collection)
|| Kernel::folderIsInbox(collection);
mIsResourceFolder = (collection.parentCollection() == Akonadi::Collection::root());
QLabel *label;
QLabel *label = nullptr;
QVBoxLayout *topLayout = new QVBoxLayout(this);
......
......@@ -59,18 +59,18 @@ private Q_SLOTS:
private:
void addLine(QWidget *parent, QVBoxLayout *layout);
QString mColorName;
PimCommon::ContentTypeWidget *mContentsComboBox;
PimCommon::IncidencesForWidget *mIncidencesForComboBox;
QCheckBox *mSharedSeenFlagsCheckBox;
QCheckBox *mNotifyOnNewMailCheckBox;
QCheckBox *mKeepRepliesInSameFolderCheckBox;
QCheckBox *mHideInSelectionDialogCheckBox;
QCheckBox *mUseDefaultIdentityCheckBox;
KLineEdit *mNameEdit;
KIdentityManagement::IdentityCombo *mIdentityComboBox;
PimCommon::ContentTypeWidget *mContentsComboBox = nullptr;
PimCommon::IncidencesForWidget *mIncidencesForComboBox = nullptr;
QCheckBox *mSharedSeenFlagsCheckBox = nullptr;
QCheckBox *mNotifyOnNewMailCheckBox = nullptr;
QCheckBox *mKeepRepliesInSameFolderCheckBox = nullptr;
QCheckBox *mHideInSelectionDialogCheckBox = nullptr;
QCheckBox *mUseDefaultIdentityCheckBox = nullptr;
KLineEdit *mNameEdit = nullptr;
KIdentityManagement::IdentityCombo *mIdentityComboBox = nullptr;
QSharedPointer<MailCommon::FolderSettings> mFolderCollection;
bool mIsLocalSystemFolder;
bool mIsResourceFolder;
bool mIsLocalSystemFolder = false;
bool mIsResourceFolder = false;
};
AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionGeneralPageFactory, CollectionGeneralPage)
......
......@@ -35,7 +35,7 @@ public:
private:
void readConfig();
void writeConfig();
MailCommon::KMFilterAccountList *mAccountList;
MailCommon::KMFilterAccountList *mAccountList = nullptr;
};
}
#endif // FILTERACTIONMISSINGACCOUNTDIALOG_H
......@@ -58,9 +58,9 @@ private:
private:
void writeConfig();
void readConfig();
MailCommon::FolderRequester *mFolderRequester;
QListWidget *mListwidget;
QPushButton *mOkButton;
MailCommon::FolderRequester *mFolderRequester = nullptr;
QListWidget *mListwidget = nullptr;
QPushButton *mOkButton = nullptr;
};
#endif /* FILTERACTIONMISSINGARGUMENTDIALOG_H */
......@@ -37,7 +37,7 @@ public:
private:
void writeConfig();
void readConfig();
KIdentityManagement::IdentityCombo *mComboBoxIdentity;
KIdentityManagement::IdentityCombo *mComboBoxIdentity = nullptr;
};
}
......
......@@ -34,7 +34,7 @@ public:
private:
void readConfig();
void writeConfig();
KUrlRequester *mUrlWidget;
KUrlRequester *mUrlWidget = nullptr;
};
}
......
......@@ -41,7 +41,7 @@ private:
enum TypeData {
UrlData = Qt::UserRole + 1
};
QListWidget *mTagList;
QListWidget *mTagList = nullptr;
};
}
#endif // FILTERACTIONMISSINGTAGDIALOG_H
......@@ -35,7 +35,7 @@ public:
private:
void readConfig();
void writeConfig();
KComboBox *mComboBoxTemplate;
KComboBox *mComboBoxTemplate = nullptr;
};
}
#endif // FILTERACTIONMISSINGTEMPLATEDIALOG_H
......@@ -37,7 +37,7 @@ public:
private:
void writeConfig();
void readConfig();
MailTransport::TransportComboBox *mComboBoxTransport;
MailTransport::TransportComboBox *mComboBoxTransport = nullptr;
};
}
......
......@@ -37,7 +37,7 @@ public:
private:
void readConfig();
void writeConfig();
SelectThunderbirdFilterFilesWidget *mSelectFilterFilesWidget;
SelectThunderbirdFilterFilesWidget *mSelectFilterFilesWidget = nullptr;
};
}
......
......@@ -47,7 +47,7 @@ private Q_SLOTS:
void slotUrlChanged(const QString &path);
void slotItemSelectionChanged();
private:
Ui::SelectThunderbirdFilterFilesWidget *ui;
Ui::SelectThunderbirdFilterFilesWidget *ui = nullptr;
};
}
#endif // SELECTTHUNDERBIRDFILTERFILESWIDGET_H
......@@ -62,7 +62,7 @@ private:
void initializeTagList();
mutable QMap<QUrl, QString> mList;
QString mParameter;
mutable PimCommon::MinimumComboBox *mComboBox;
mutable PimCommon::MinimumComboBox *mComboBox = nullptr;
};
}
......
......@@ -45,7 +45,7 @@ public:
bool isEmpty() const override;
QString informationAboutNotValidAction() const override;
private:
mutable Phonon::MediaObject *mPlayer;
mutable Phonon::MediaObject *mPlayer = nullptr;
};
}
......
......@@ -66,11 +66,11 @@ public:
FilterActionWidget *q;
QList<MailCommon::FilterAction *> mActionList;
KComboBox *mComboBox;
QPushButton *mAdd;
QPushButton *mRemove;
KComboBox *mComboBox = nullptr;
QPushButton *mAdd = nullptr;
QPushButton *mRemove = nullptr;
QGridLayout *mLayout;
QGridLayout *mLayout = nullptr;
};
void FilterActionWidget::Private::setFilterAction(QWidget *widget)
......
......@@ -109,7 +109,7 @@ public:
protected:
QString mParameter;
private:
mutable FilterActionWithUrlHelpButton *mHelpButton;
mutable FilterActionWithUrlHelpButton *mHelpButton = nullptr;
private Q_SLOTS:
void slotHelp();
};
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
private:
void readConfig();
void writeConfig();
KPIMTextEdit::PlainTextEditorWidget *mEditor;
KPIMTextEdit::PlainTextEditorWidget *mEditor = nullptr;
};
}
......
......@@ -52,11 +52,11 @@ public:
void expunge(Akonadi::Collection::Id col, bool sync) override;
private:
KIdentityManagement::IdentityManager *mIdentityManager;
MessageComposer::MessageSender *mMessageSender;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor;
Akonadi::EntityTreeModel *mEntityTreeModel;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
MessageComposer::MessageSender *mMessageSender = nullptr;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor = nullptr;
Akonadi::EntityTreeModel *mEntityTreeModel = nullptr;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel = nullptr;
};
#endif
......@@ -131,7 +131,7 @@ public:
}
void warningInfoAboutInvalidFilter(const QStringList &emptyFilters) const;
QWidget *mParent;
QWidget *mParent = nullptr;
};
void FilterImporterExporter::Private::warningInfoAboutInvalidFilter(
......
......@@ -59,7 +59,7 @@ public:
static FilterActionDict *mFilterActionDict;
FilterManager *q;
OrgFreedesktopAkonadiMailFilterAgentInterface *mMailFilterAgentInterface;
OrgFreedesktopAkonadiMailFilterAgentInterface *mMailFilterAgentInterface = nullptr;
QList<MailCommon::MailFilter *> mFilters;
Akonadi::Monitor *mMonitor;
bool mInitialized;
......
......@@ -49,11 +49,11 @@ public Q_SLOTS:
private:
void writeConfig();
void readConfig();
QListWidget *filtersListWidget;
QListWidget *filtersListWidget = nullptr;
QList<MailFilter *> originalFilters;
QPushButton *selectAllButton;
QPushButton *unselectAllButton;
QPushButton *mOkButton;
QPushButton *selectAllButton = nullptr;
QPushButton *unselectAllButton = nullptr;
QPushButton *mOkButton = nullptr;
};
}
#endif // FILTERSELECTIONDIALOG_H
......@@ -36,8 +36,8 @@ public:
private:
void writeConfig();
void readConfig();
InvalidFilterWidget *mInvalidFilterWidget;
InvalidFilterInfoWidget *mInvalidFilterInfoWidget;
InvalidFilterWidget *mInvalidFilterWidget = nullptr;
InvalidFilterInfoWidget *mInvalidFilterInfoWidget = nullptr;
};
}
#endif // INVALIDFILTERDIALOG_H
......@@ -36,7 +36,7 @@ Q_SIGNALS:
void showDetails(const QString &);
void hideInformationWidget();
private:
InvalidFilterListView *mInvalidFilterListWidget;
InvalidFilterListView *mInvalidFilterListWidget = nullptr;
};
}
......
......@@ -214,39 +214,45 @@ protected:
/** The widget that contains the ListBox showing the filters, and the
controls to remove filters, add new ones and to change their order. */
KMFilterListBox *mFilterList;
KMFilterListBox *mFilterList = nullptr;
/** The widget that allows editing of the filter pattern. */
MailCommon::SearchPatternEdit *mPatternEdit;
MailCommon::SearchPatternEdit *mPatternEdit = nullptr;
/** The widget that allows editing of the filter actions. */
MailCommon::FilterActionWidgetLister *mActionLister;
MailCommon::FilterActionWidgetLister *mActionLister = nullptr;
/** Lets the user select whether to apply this filter on
inbound/outbound messages, both, or only on explicit CTRL-J. */
QCheckBox *mApplyOnIn, *mApplyOnOut, *mApplyBeforeOut, *mApplyOnCtrlJ, *mApplyOnAllFolders;
QCheckBox *mApplyOnIn = nullptr;
QCheckBox *mApplyOnOut = nullptr;
QCheckBox *mApplyBeforeOut = nullptr;
QCheckBox *mApplyOnCtrlJ = nullptr;
QCheckBox *mApplyOnAllFolders = nullptr;
/** For a filter applied to inbound messages selects whether to apply
this filter to all accounts or to selected accounts only. */
QRadioButton *mApplyOnForAll, *mApplyOnForTraditional, *mApplyOnForChecked;
QRadioButton *mApplyOnForAll = nullptr;
QRadioButton *mApplyOnForTraditional = nullptr;
QRadioButton *mApplyOnForChecked = nullptr;
/** ListView that shows the accounts in the advanced tab */
KMFilterAccountList *mAccountList;
QCheckBox *mStopProcessingHere;
QCheckBox *mConfigureShortcut;
QCheckBox *mConfigureToolbar;
QLabel *mFilterActionLabel;
KIconButton *mFilterActionIconButton;
KKeySequenceWidget *mKeySeqWidget;
QGroupBox *mAdvOptsGroup;
MailCommon::MailFilter *mFilter;
MailCommon::FolderRequester *mFolderRequester;
QPushButton *mRunNow;
QDialogButtonBox *buttonBox;
bool mDoNotClose;
bool mIgnoreFilterUpdates;
KMFilterAccountList *mAccountList = nullptr;
QCheckBox *mStopProcessingHere = nullptr;
QCheckBox *mConfigureShortcut = nullptr;
QCheckBox *mConfigureToolbar = nullptr;
QLabel *mFilterActionLabel = nullptr;
KIconButton *mFilterActionIconButton = nullptr;
KKeySequenceWidget *mKeySeqWidget = nullptr;
QGroupBox *mAdvOptsGroup = nullptr;
MailCommon::MailFilter *mFilter = nullptr;
MailCommon::FolderRequester *mFolderRequester = nullptr;
QPushButton *mRunNow = nullptr;
QDialogButtonBox *buttonBox = nullptr;
bool mDoNotClose = false;
bool mIgnoreFilterUpdates = false;
};
}
......
......@@ -62,7 +62,7 @@ public:
MailCommon::MailFilter *filter();
private:
MailCommon::MailFilter *mFilter;
MailCommon::MailFilter *mFilter = nullptr;
};
class KMFilterListBox : public QGroupBox
......@@ -231,18 +231,18 @@ protected Q_SLOTS:
protected:
/** The listbox displaying the filter list. */
QListWidget *mListWidget;
QListWidget *mListWidget = nullptr;
/** The various action buttons. */
QPushButton *mBtnNew;
QPushButton *mBtnCopy;
QPushButton *mBtnDelete;
QPushButton *mBtnUp;
QPushButton *mBtnDown;
QPushButton *mBtnRename;
QPushButton *mBtnTop;
QPushButton *mBtnBottom;
KListWidgetSearchLine *mSearchListWidget;
QPushButton *mBtnNew = nullptr;
QPushButton *mBtnCopy = nullptr;
QPushButton *mBtnDelete = nullptr;
QPushButton *mBtnUp = nullptr;
QPushButton *mBtnDown = nullptr;
QPushButton *mBtnRename = nullptr;
QPushButton *mBtnTop = nullptr;
QPushButton *mBtnBottom = nullptr;
KListWidgetSearchLine *mSearchListWidget = nullptr;
bool eventFilter(QObject *obj, QEvent *event) override;
private:
void applyFilterChanged(bool closeAfterSaving);
......
......@@ -78,8 +78,8 @@ private:
void playSound();
void openSoundDialog(KUrlRequester *);
void slotUrlChanged(const QString &);
KUrlRequester *m_urlRequester;
QPushButton *m_playButton;
KUrlRequester *m_urlRequester = nullptr;
QPushButton *m_playButton = nullptr;
};
}
......
......@@ -31,7 +31,7 @@ private Q_SLOTS:
void slotImportFilter(QAction *act);
private:
void importFilters(MailCommon::FilterImporterExporter::FilterType type);
QTextEdit *mTextEdit;
QTextEdit *mTextEdit = nullptr;
};
#endif // FILTERIMPORTEREXPORTERGUI_H
......@@ -58,10 +58,10 @@ public:
{
}
QListWidget *mListAccount;
QPushButton *mUpButton;
QPushButton *mDownButton;
QCheckBox *mEnableAccountOrder;
QListWidget *mListAccount = nullptr;
QPushButton *mUpButton = nullptr;
QPushButton *mDownButton = nullptr;
QCheckBox *mEnableAccountOrder = nullptr;
};
AccountConfigOrderDialog::AccountConfigOrderDialog(QWidget *parent)
......
......@@ -43,7 +43,7 @@ public:
{
}
Akonadi::ChangeRecorder *mMonitor;
Akonadi::ChangeRecorder *mMonitor = nullptr;
};
FolderCollectionMonitor::FolderCollectionMonitor(Akonadi::Session *session, QObject *parent)
......
......@@ -58,10 +58,10 @@ public:
}
Akonadi::Collection mCollection;
KLineEdit *mEdit;
bool mMustBeReadWrite;
bool mShowOutbox;
bool mNotCreateNewFolder;
KLineEdit *mEdit = nullptr;
bool mMustBeReadWrite = false;
bool mShowOutbox = false;
bool mNotCreateNewFolder = false;
};
FolderRequester::FolderRequester(QWidget *parent)
......
......@@ -53,11 +53,11 @@ public:
{
}
FolderTreeWidget *folderTreeWidget;
QPushButton *mUser1Button;
QPushButton *mOkButton;
bool mNotAllowToCreateNewFolder;
bool mUseGlobalSettings;
FolderTreeWidget *folderTreeWidget = nullptr;
QPushButton *mUser1Button = nullptr;
QPushButton *mOkButton = nullptr;
bool mNotAllowToCreateNewFolder = false;
bool mUseGlobalSettings = false;
};
FolderSelectionDialog::FolderSelectionDialog(QWidget *parent, SelectionFolderOptions options)
......
......@@ -70,17 +70,17 @@ public:
QString filter;
QString oldFilterStr;
Akonadi::StatisticsProxyModel *filterModel;
FolderTreeView *folderTreeView;
Akonadi::QuotaColorProxyModel *quotaModel;
FolderTreeWidgetProxyModel *readableproxy;
EntityCollectionOrderProxyModel *entityOrderProxy;
QLineEdit *filterFolderLineEdit;
Akonadi::StatisticsProxyModel *filterModel = nullptr;
FolderTreeView *folderTreeView = nullptr;
Akonadi::QuotaColorProxyModel *quotaModel = nullptr;
FolderTreeWidgetProxyModel *readableproxy = nullptr;
EntityCollectionOrderProxyModel *entityOrderProxy = nullptr;
QLineEdit *filterFolderLineEdit = nullptr;
QPointer<Akonadi::ETMViewStateSaver> saver;
QStringList expandedItems;
QString currentItem;
QLabel *label;
bool dontKeyFilter;
QLabel *label = nullptr;
bool dontKeyFilter = false;
};
FolderTreeWidget::FolderTreeWidget(
......
......@@ -105,8 +105,8 @@ private:
QDateTime mArchiveTime;
ArchiveType mArchiveType;
Akonadi::Collection mRootFolder;
KArchive *mArchive;
QWidget *mParentWidget;
KArchive *mArchive = nullptr;
QWidget *mParentWidget = nullptr;
int mArchivedMessages;
uint mArchivedSize;
QPointer<KPIM::ProgressItem> mProgressItem;
......@@ -118,8 +118,8 @@ private:
Akonadi::Collection::List mAllFolders;
Akonadi::Collection mCurrentFolder;
Akonadi::Item::List mPendingMessages;
Akonadi::ItemFetchJob *mCurrentJob;
bool mDisplayMessageBox;
Akonadi::ItemFetchJob *mCurrentJob = nullptr;
bool mDisplayMessageBox = false;
};
}
......
......@@ -143,11 +143,11 @@ private Q_SLOTS:
private:
void initLayout(SearchPatternEditOptions options, SearchModeType modeType);
MailCommon::SearchPattern *mPattern;
QRadioButton *mAllRBtn;
QRadioButton *mAnyRBtn;
QRadioButton *mAllMessageRBtn;
SearchRuleWidgetLister *mRuleLister;
MailCommon::SearchPattern *mPattern = nullptr;
QRadioButton *mAllRBtn = nullptr;
QRadioButton *mAnyRBtn = nullptr;
QRadioButton *mAllMessageRBtn = nullptr;
SearchRuleWidgetLister *mRuleLister = nullptr;
};
/**
......@@ -267,11 +267,11 @@ private:
void initFieldList(MailCommon::SearchPatternEdit::SearchPatternEditOptions options);
QStringList mFilterFieldList;
KComboBox *mRuleField;
QStackedWidget *mFunctionStack;
QStackedWidget *mValueStack;
QPushButton *mAdd;
QPushButton *mRemove;
KComboBox *mRuleField = nullptr;
QStackedWidget *mFunctionStack = nullptr;
QStackedWidget *mValueStack = nullptr;
QPushButton *mAdd = nullptr;
QPushButton *mRemove = nullptr;
};
class SearchRuleWidgetLister : public KPIM::KWidgetLister
......
......@@ -46,7 +46,7 @@ private Q_SLOTS:
void onTagsFetched(KJob *);
private:
KComboBox *mComboBox;
KComboBox *mComboBox = nullptr;
};
FillTagComboJob::FillTagComboJob(KComboBox *combo, QObject *parent)
......
......@@ -56,9 +56,9 @@ private Q_SLOTS:
private:
bool snippetIsValid() const;
KActionCollection *mActionCollection;
Ui::SnippetDialog *mUi;
QPushButton *mOkButton;
KActionCollection *mActionCollection = nullptr;
Ui::SnippetDialog *mUi = nullptr;
QPushButton *mOkButton = nullptr;
};
}
#endif
......@@ -87,23 +87,23 @@ public:
void load();
void save();
SnippetsManager *q;
SnippetsModel *mModel;
QItemSelectionModel *mSelectionModel;
KActionCollection *mActionCollection;
QObject *mEditor;
SnippetsManager *q = nullptr;
SnippetsModel *mModel = nullptr;
QItemSelectionModel *mSelectionModel = nullptr;
KActionCollection *mActionCollection = nullptr;
QObject *mEditor = nullptr;
QByteArray mEditorInsertMethod;
QMap<QString, QString> mSavedVariables;
QAction *mAddSnippetAction;
QAction *mEditSnippetAction;
QAction *mDeleteSnippetAction;
QAction *mAddSnippetGroupAction;
QAction *mEditSnippetGroupAction;
QAction *mDeleteSnippetGroupAction;
QAction *mInsertSnippetAction;
QWidget *mParent;
bool mDirty;
QAction *mAddSnippetAction = nullptr;
QAction *mEditSnippetAction = nullptr;
QAction *mDeleteSnippetAction = nullptr;
QAction *mAddSnippetGroupAction = nullptr;
QAction *mEditSnippetGroupAction = nullptr;
QAction *mDeleteSnippetGroupAction = nullptr;
QAction *mInsertSnippetAction = nullptr;
QWidget *mParent = nullptr;
bool mDirty = false;
};
QModelIndex SnippetsManager::Private::currentGroupIndex() const
......