Commit eb519025 authored by Laurent Montel's avatar Laurent Montel 😁

initialize some value

parent 9377b679
......@@ -29,8 +29,6 @@
struct CreateReplyMessageJobSettings
{
CreateReplyMessageJobSettings()
: m_replyStrategy(MessageComposer::ReplySmart)
, mNoQuote(false)
{
}
......@@ -39,8 +37,8 @@ struct CreateReplyMessageJobSettings
QString mTemplate;
Akonadi::Item mItem;
KMime::Message::Ptr mMsg;
MessageComposer::ReplyStrategy m_replyStrategy;
bool mNoQuote;
MessageComposer::ReplyStrategy m_replyStrategy = MessageComposer::ReplySmart;
bool mNoQuote = false;
};
class CreateReplyMessageJob : public QObject
......
......@@ -26,9 +26,6 @@
struct NewMessageJobSettings
{
NewMessageJobSettings()
: mFolder(nullptr)
, mHidden(false)
, mIdentity(0)
{
}
......@@ -49,10 +46,10 @@ struct NewMessageJobSettings
QString mCc;
QString mBcc;
QString mAttachURL;
QSharedPointer<MailCommon::FolderSettings> mFolder;
QSharedPointer<MailCommon::FolderSettings> mFolder = nullptr;
Akonadi::Collection mCurrentCollection;
bool mHidden;
uint mIdentity;
bool mHidden = false;
uint mIdentity = 0;
};
class NewMessageJob : public QObject
......
......@@ -30,7 +30,6 @@
RemoveCollectionJob::RemoveCollectionJob(QObject *parent)
: QObject(parent)
, mMainWidget(nullptr)
{
}
......
......@@ -45,7 +45,7 @@ private Q_SLOTS:
void slotDeletionCollectionResult(KJob *job);
private:
KMMainWidget *mMainWidget;
KMMainWidget *mMainWidget = nullptr;
Akonadi::Collection mCurrentCollection;
};
......
......@@ -42,7 +42,7 @@ public Q_SLOTS:
void slotFilterLogViewer();
private:
QString akonadiPath(QString service);
QWidget *mParentWidget;
QWidget *mParentWidget = nullptr;
};
#endif // KMLAUNCHEXTERNALCOMPONENT_H
......@@ -627,23 +627,23 @@ private:
QPointer<KMail::SearchWindow> mSearchWin;
QAction *mExpireFolderAction;
QAction *mFolderMailingListPropertiesAction;
QAction *mShowFolderShortcutDialogAction;
QAction *mArchiveFolderAction;
QAction *mMessageNewList;
KToggleAction *mPreferHtmlLoadExtAction;
QAction *mExpireFolderAction = nullptr;
QAction *mFolderMailingListPropertiesAction = nullptr;
QAction *mShowFolderShortcutDialogAction = nullptr;
QAction *mArchiveFolderAction = nullptr;
QAction *mMessageNewList = nullptr;
KToggleAction *mPreferHtmlLoadExtAction = nullptr;
QTimer *menutimer;
QTimer *mShowBusySplashTimer;
QTimer *menutimer = nullptr;
QTimer *mShowBusySplashTimer = nullptr;
KSieveUi::VacationManager *mVacationManager;
#if !defined(NDEBUG)
QPointer<KSieveUi::SieveDebugDialog> mSieveDebugDialog;
#endif
KActionCollection *mActionCollection;
QAction *mToolbarActionSeparator;
QVBoxLayout *mTopLayout;
KActionCollection *mActionCollection = nullptr;
QAction *mToolbarActionSeparator = nullptr;
QVBoxLayout *mTopLayout = nullptr;
bool mDestructed;
QList<QAction *> mFilterMenuActions;
QList<QAction *> mFilterFolderMenuActions;
......@@ -651,42 +651,42 @@ private:
QList<QAction *> mFilterTBarActions;
QList<KMMetaFilterActionCommand *> mFilterCommands;
KMail::TagActionManager *mTagActionManager;
KMail::FolderShortcutActionManager *mFolderShortcutActionManager;
KMail::TagActionManager *mTagActionManager = nullptr;
KMail::FolderShortcutActionManager *mFolderShortcutActionManager = nullptr;
KSharedConfig::Ptr mConfig;
KXMLGUIClient *mGUIClient;
KXMLGUIClient *mGUIClient = nullptr;
KMail::MessageActions *mMsgActions;
Akonadi::StandardMailActionManager *mAkonadiStandardActionManager;
CollectionPane *mMessagePane;
KMail::MessageActions *mMsgActions = nullptr;
Akonadi::StandardMailActionManager *mAkonadiStandardActionManager = nullptr;
CollectionPane *mMessagePane = nullptr;
QSharedPointer<MailCommon::FolderSettings> mCurrentFolderSettings;
MailCommon::FolderTreeWidget *mFolderTreeWidget;
MailCommon::FolderTreeWidget *mFolderTreeWidget = nullptr;
KMail::VacationScriptIndicatorWidget *mVacationScriptIndicator;
KMail::VacationScriptIndicatorWidget *mVacationScriptIndicator = nullptr;
bool mVacationIndicatorActive;
bool mGoToFirstUnreadMessageInSelectedFolder;
MessageList::Core::PreSelectionMode mPreSelectionMode;
QTimer mCheckMailTimer;
KSieveUi::SieveImapPasswordProvider *mSievePasswordProvider;
KSieveUi::SieveImapPasswordProvider *mSievePasswordProvider = nullptr;
QPointer<MailCommon::FolderSelectionDialog> mMoveOrCopyToDialog;
QPointer<MailCommon::FolderSelectionDialog> mSelectFromAllFoldersDialog;
QAction *mServerSideSubscription;
KRecentFilesAction *mOpenRecentAction;
QPointer<KSieveUi::ManageSieveScriptsDialog> mManageSieveDialog;
QAction *mQuickSearchAction;
DisplayMessageFormatActionMenu *mDisplayMessageFormatMenu;
QAction *mQuickSearchAction = nullptr;
DisplayMessageFormatActionMenu *mDisplayMessageFormatMenu = nullptr;
MessageViewer::Viewer::DisplayFormatMessage mFolderDisplayFormatPreference;
QAction *mSearchMessages;
KMLaunchExternalComponent *mLaunchExternalComponent;
ManageShowCollectionProperties *mManageShowCollectionProperties;
QAction *mShowIntroductionAction;
KToggleAction *mUseLessBandwidth;
QAction *mMarkAllMessageAsReadAndInAllSubFolder;
KActionMenuAccount *mAccountActionMenu;
QAction *mRemoveDuplicateRecursiveAction;
QAction *mSearchMessages = nullptr;
KMLaunchExternalComponent *mLaunchExternalComponent = nullptr;
ManageShowCollectionProperties *mManageShowCollectionProperties = nullptr;
QAction *mShowIntroductionAction = nullptr;
KToggleAction *mUseLessBandwidth = nullptr;
QAction *mMarkAllMessageAsReadAndInAllSubFolder = nullptr;
KActionMenuAccount *mAccountActionMenu = nullptr;
QAction *mRemoveDuplicateRecursiveAction = nullptr;
Akonadi::Collection mCurrentCollection;
};
......
......@@ -67,11 +67,11 @@ private Q_SLOTS:
void slotConfigureShortcuts();
private:
KPIM::ProgressStatusBarWidget *mProgressBar;
KMMainWidget *mKMMainWidget;
KToggleAction *mHideMenuBarAction;
KPIM::ProgressStatusBarWidget *mProgressBar = nullptr;
KMMainWidget *mKMMainWidget = nullptr;
KToggleAction *mHideMenuBarAction = nullptr;
bool mReallyClose;
QLabel *mMessageLabel;
QLabel *mMessageLabel = nullptr;
};
#endif
......@@ -89,8 +89,9 @@ private:
KMReaderWin *mReaderWin;
Akonadi::Item mMsg;
// a few actions duplicated from kmmainwidget
QAction *mTrashAction, *mSaveAtmAction;
KMail::MessageActions *mMsgActions;
QAction *mTrashAction = nullptr;
QAction *mSaveAtmAction = nullptr;
KMail::MessageActions *mMsgActions = nullptr;
Akonadi::Collection mParentCollection;
};
......
......@@ -224,26 +224,26 @@ private:
private:
KContacts::Addressee mSearchedAddress;
Akonadi::Item mSearchedContact;
QWidget *mMainWindow;
KActionCollection *mActionCollection;
QAction *mMailToComposeAction;
QAction *mMailToReplyAction;
QAction *mMailToForwardAction;
QAction *mAddAddrBookAction;
QAction *mOpenAddrBookAction;
QAction *mUrlSaveAsAction;
QAction *mAddBookmarksAction;
QAction *mImageUrlSaveAsAction;
QAction *mEditContactAction;
QAction *mViewAsHtml;
QAction *mLoadExternalReference;
QAction *mShareImage;
QAction *mAddEmailToExistingContactAction;
QMenu *mViewHtmlOptions;
MessageViewer::Viewer *mViewer;
QWidget *mMainWindow = nullptr;
KActionCollection *mActionCollection = nullptr;
QAction *mMailToComposeAction = nullptr;
QAction *mMailToReplyAction = nullptr;
QAction *mMailToForwardAction = nullptr;
QAction *mAddAddrBookAction = nullptr;
QAction *mOpenAddrBookAction = nullptr;
QAction *mUrlSaveAsAction = nullptr;
QAction *mAddBookmarksAction = nullptr;
QAction *mImageUrlSaveAsAction = nullptr;
QAction *mEditContactAction = nullptr;
QAction *mViewAsHtml = nullptr;
QAction *mLoadExternalReference = nullptr;
QAction *mShareImage = nullptr;
QAction *mAddEmailToExistingContactAction = nullptr;
QMenu *mViewHtmlOptions = nullptr;
MessageViewer::Viewer *mViewer = nullptr;
};
#endif
......@@ -78,8 +78,8 @@ private:
bool mIconNotificationsEnabled;
QMenu *mNewMessagesPopup;
QAction *mSendQueued;
QMenu *mNewMessagesPopup = nullptr;
QAction *mSendQueued = nullptr;
};
}
#endif
......@@ -213,6 +213,11 @@ KontactInterface::Summary *KMailPlugin::createSummaryWidget(QWidget *parent)
return new SummaryWidget(this, parent);
}
int KMailPlugin::weight() const
{
return 200;
}
////
#include "../../kmail_options.h"
......
......@@ -59,10 +59,7 @@ public:
bool isRunningStandalone() const override;
bool createDBUSInterface(const QString &serviceType) override;
KontactInterface::Summary *createSummaryWidget(QWidget *parent) override;
int weight() const override
{
return 200;
}
int weight() const override;
QStringList invisibleToolbarActions() const override;
bool queryClose() const override;
......@@ -81,8 +78,8 @@ protected Q_SLOTS:
void slotSyncFolders();
private:
OrgKdeKmailKmailInterface *m_instance;
KontactInterface::UniqueAppWatcher *mUniqueAppWatcher;
OrgKdeKmailKmailInterface *m_instance = nullptr;
KontactInterface::UniqueAppWatcher *mUniqueAppWatcher = nullptr;
};
#endif
......@@ -96,6 +96,11 @@ SummaryWidget::SummaryWidget(KontactInterface::Plugin *plugin, QWidget *parent)
QTimer::singleShot(0, this, &SummaryWidget::slotUpdateFolderList);
}
int SummaryWidget::summaryHeight() const
{
return 1;
}
void SummaryWidget::slotCollectionChanged()
{
QTimer::singleShot(0, this, &SummaryWidget::slotUpdateFolderList);
......
......@@ -55,10 +55,7 @@ class SummaryWidget : public KontactInterface::Summary
public:
SummaryWidget(KontactInterface::Plugin *plugin, QWidget *parent);
int summaryHeight() const override
{
return 1;
}
int summaryHeight() const override;
QStringList configModules() const override;
......@@ -77,13 +74,13 @@ private:
void displayModel(const QModelIndex &, int &, const bool, QStringList);
QList<QLabel *> mLabels;
QGridLayout *mLayout;
KontactInterface::Plugin *mPlugin;
Akonadi::ChangeRecorder *mChangeRecorder;
Akonadi::EntityTreeModel *mModel;
KViewStateMaintainer<Akonadi::ETMViewStateSaver> *mModelState;
KCheckableProxyModel *mModelProxy;
QItemSelectionModel *mSelectionModel;
QGridLayout *mLayout = nullptr;
KontactInterface::Plugin *mPlugin = nullptr;
Akonadi::ChangeRecorder *mChangeRecorder = nullptr;
Akonadi::EntityTreeModel *mModel = nullptr;
KViewStateMaintainer<Akonadi::ETMViewStateSaver> *mModelState = nullptr;
KCheckableProxyModel *mModelProxy = nullptr;
QItemSelectionModel *mSelectionModel = nullptr;
};
#endif
......@@ -49,7 +49,7 @@ public:
void save() override;
private:
PluginView *mPluginView;
PluginView *mPluginView = nullptr;
};
#endif
......@@ -80,15 +80,15 @@ private:
QMap<QString, KontactInterface::Summary *> mSummaries;
QStringList mLeftColumnSummaries;
QStringList mRightColumnSummaries;
KontactInterface::Core *mCore;
DropWidget *mFrame;
QFrame *mMainWidget;
QVBoxLayout *mMainLayout;
QVBoxLayout *mLeftColumn;
QVBoxLayout *mRightColumn;
QLabel *mUsernameLabel;
QLabel *mDateLabel;
QAction *mConfigAction;
KontactInterface::Core *mCore = nullptr;
DropWidget *mFrame = nullptr;
QFrame *mMainWidget = nullptr;
QVBoxLayout *mMainLayout = nullptr;
QVBoxLayout *mLeftColumn = nullptr;
QVBoxLayout *mRightColumn = nullptr;
QLabel *mUsernameLabel = nullptr;
QLabel *mDateLabel = nullptr;
QAction *mConfigAction = nullptr;
};
#endif
......@@ -52,9 +52,9 @@ private Q_SLOTS:
void fillSyncActionSubEntries();
private:
SummaryViewPart *mPart;
KSelectAction *mSyncAction;
QAction *mAllSync;
SummaryViewPart *mPart = nullptr;
KSelectAction *mSyncAction = nullptr;
QAction *mAllSync = nullptr;
};
#endif
......@@ -56,7 +56,7 @@ private:
private:
QHash<Akonadi::Collection::Id, QPointer<Akonadi::CollectionPropertiesDialog> > mHashDialogBox;
QStringList mPages;
KMMainWidget *mMainWidget;
KMMainWidget *mMainWidget = nullptr;
};
#endif // MANAGESHOWCOLLECTIONPROPERTIES_H
......@@ -49,7 +49,7 @@ private Q_SLOTS:
private:
void askForNextCheck(quint64 id, bool needToReindex = false);
Akonadi::Collection mCollection;
Akonadi::Search::PIM::IndexedItems *mIndexedItems;
Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr;
};
#endif // CHECKINDEXINGJOB_H
......@@ -49,9 +49,9 @@ private:
void createJob();
void callToReindexCollection();
Akonadi::Search::PIM::IndexedItems *mIndexedItems;
Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr;
Akonadi::Collection::List mListCollection;
QTimer *mTimer;
QTimer *mTimer = nullptr;
QList<qint64> mCollectionsIndexed;
QList<qint64> mCollectionsNeedToBeReIndexed;
int mIndex;
......
......@@ -48,8 +48,8 @@ private:
void updateAllSelection(bool select);
QScopedPointer<Ui_IncompleteIndexDialog> mUi;
QProgressDialog *mProgressDialog;
QDBusInterface *mIndexer;
QProgressDialog *mProgressDialog = nullptr;
QDBusInterface *mIndexer = nullptr;
QList<qlonglong> mIndexingQueue;
};
......
......@@ -26,7 +26,6 @@ class AgentIdentifier
{
public:
AgentIdentifier()
: mIndex(-1)
{
}
......@@ -39,7 +38,7 @@ public:
QString mIdentifier;
QString mName;
int mIndex;
int mIndex = -1;
};
class KActionMenuAccount : public KActionMenu
......
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