Commit 25217cd7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Initialize variables

parent e5b25cbd
......@@ -64,7 +64,7 @@ private:
KMime::Message::Ptr loadMessageFromFile(const QString &filename);
KMime::Message::Ptr createPlainTestMessageWithMultiEmails();
KMime::Message::Ptr loadMessage(const QString &filename);
KIdentityManagement::IdentityManager *mIdentMan;
KIdentityManagement::IdentityManager *mIdentMan = nullptr;
};
#endif
......@@ -65,8 +65,8 @@ public:
}
private:
MimeTreeParser::HtmlWriter *mWriter;
MessageViewer::CSSHelperBase *mCSSHelper;
MimeTreeParser::HtmlWriter *mWriter = nullptr;
MessageViewer::CSSHelperBase *mCSSHelper = nullptr;
};
}
......
......@@ -46,7 +46,7 @@ public:
QString toCleanHtml() const;
PimCommon::AutoCorrection *autoCorrection = nullptr;
RichTextComposerNg *richtextComposer = nullptr;
MessageComposer::RichTextComposerSignatures *richTextComposerSignatures;
MessageComposer::RichTextComposerSignatures *richTextComposerSignatures = nullptr;
};
RichTextComposerNg::RichTextComposerNg(QWidget *parent)
......
......@@ -35,7 +35,7 @@ public:
}
void cleanWhitespaceHelper(const QRegExp &regExp, const QString &newText, const KIdentityManagement::Signature &sig);
QList<QPair<int, int> > signaturePositions(const KIdentityManagement::Signature &sig) const;
RichTextComposerNg *richTextComposer;
RichTextComposerNg *richTextComposer = nullptr;
};
RichTextComposerSignatures::RichTextComposerSignatures(MessageComposer::RichTextComposerNg *composer, QObject *parent)
......
......@@ -88,17 +88,17 @@ public:
QList<KMime::Message::Ptr> resultMessages;
// Stuff that the application plays with.
GlobalPart *globalPart;
InfoPart *infoPart;
TextPart *textPart;
GlobalPart *globalPart = nullptr;
InfoPart *infoPart = nullptr;
TextPart *textPart = nullptr;
AttachmentPart::List attachmentParts;
// attachments with different sign/encrypt settings from
// main message body. added at the end of the process
AttachmentPart::List lateAttachmentParts;
// Stuff that we play with.
KMime::Message *skeletonMessage;
KMime::Content *resultContent;
KMime::Message *skeletonMessage = nullptr;
KMime::Content *resultContent = nullptr;
Q_DECLARE_PUBLIC(Composer)
};
......@@ -311,8 +311,8 @@ void ComposerPrivate::contentJobFinished(KJob *job)
}
qCDebug(MESSAGECOMPOSER_LOG) << "composing final message";
KMime::Message *headers;
KMime::Content *resultContent;
KMime::Message *headers = nullptr;
KMime::Content *resultContent = nullptr;
std::vector<GpgME::Key> keys;
QStringList recipients;
......
......@@ -39,7 +39,7 @@ public:
}
Akonadi::Collection mCollection;
FollowUpReminder::FollowUpReminderInfo *mInfo;
FollowUpReminder::FollowUpReminderInfo *mInfo = nullptr;
};
FollowupReminderCreateJob::FollowupReminderCreateJob(QObject *parent)
......
......@@ -42,15 +42,12 @@ class MessageComposer::FollowUpReminderSelectDateDialogPrivate
{
public:
FollowUpReminderSelectDateDialogPrivate()
: mDateComboBox(nullptr),
mCollectionCombobox(nullptr),
mOkButton(nullptr)
{
}
KDateComboBox *mDateComboBox;
Akonadi::CollectionComboBox *mCollectionCombobox;
QPushButton *mOkButton;
KDateComboBox *mDateComboBox = nullptr;
Akonadi::CollectionComboBox *mCollectionCombobox = nullptr;
QPushButton *mOkButton = nullptr;
};
FollowUpReminderSelectDateDialog::FollowUpReminderSelectDateDialog(QWidget *parent, QAbstractItemModel *model)
......
......@@ -60,7 +60,7 @@ private:
KMime::Message::Ptr mMsg;
KMime::Message::Ptr mOrigMsg;
Akonadi::Collection mCollection;
KIdentityManagement::IdentityManager *mIdentityManager;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
}
......
......@@ -254,7 +254,7 @@ private:
QByteArray getRefStr(const KMime::Message::Ptr &msg);
KMime::Content *createForwardAttachmentMessage(const KMime::Message::Ptr &fwdMsg);
KIdentityManagement::IdentityManager *m_identityManager;
KIdentityManagement::IdentityManager *m_identityManager = nullptr;
// Required parts to create messages
KMime::Message::Ptr m_origMsg;
Akonadi::Item::Id m_folderId;
......@@ -265,7 +265,7 @@ private:
// Optional settings the calling class may set
MessageComposer::ReplyStrategy m_replyStrategy;
QString m_selection, m_template;
bool m_quote;
bool m_quote = false;
KMime::Types::Mailbox::List m_mailingListAddresses;
Akonadi::Item::Id m_id;
......
......@@ -60,8 +60,8 @@ private:
KMime::Message::Ptr mMsg;
KMime::Message::Ptr mOrigMsg;
Akonadi::Collection mCollection;
bool mReplyAll;
KIdentityManagement::IdentityManager *mIdentityManager;
bool mReplyAll = false;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
}
......
......@@ -46,7 +46,7 @@ private:
};
void initialize();
void addImageFormat(const QString &format, const QString &mimetype);
QListWidget *mListWidget;
QListWidget *mListWidget = nullptr;
};
class ImageScalingSelectFormat : public QWidget
......@@ -66,8 +66,8 @@ private Q_SLOTS:
void slotSelectFormat();
private:
QLineEdit *mFormat;
QPushButton *mSelectFormat;
QLineEdit *mFormat = nullptr;
QPushButton *mSelectFormat = nullptr;
};
}
......
......@@ -33,10 +33,7 @@ class MessageComposer::ImageScalingWidgetPrivate
{
public:
ImageScalingWidgetPrivate()
: ui(new Ui::ImageScalingWidget),
mSourceFilenameFilterGroup(nullptr),
mRecipientFilterGroup(nullptr),
mWasChanged(false)
: ui(new Ui::ImageScalingWidget)
{
}
~ImageScalingWidgetPrivate()
......@@ -44,10 +41,10 @@ public:
delete ui;
}
Ui::ImageScalingWidget *ui;
QButtonGroup *mSourceFilenameFilterGroup;
QButtonGroup *mRecipientFilterGroup;
bool mWasChanged;
Ui::ImageScalingWidget *ui = nullptr;
QButtonGroup *mSourceFilenameFilterGroup = nullptr;
QButtonGroup *mRecipientFilterGroup = nullptr;
bool mWasChanged = false;
};
ImageScalingWidget::ImageScalingWidget(QWidget *parent)
......
......@@ -33,17 +33,15 @@ class ContentJobBasePrivate : public JobBasePrivate
public:
explicit ContentJobBasePrivate(ContentJobBase *qq)
: JobBasePrivate(qq)
, resultContent(nullptr)
, extraContent(nullptr)
{
}
void init(QObject *parent);
void doNextSubjob();
KMime::Content *resultContent;
KMime::Content::List subjobContents;
KMime::Content *extraContent;
KMime::Content *resultContent = nullptr;
KMime::Content *extraContent = nullptr;
Q_DECLARE_PUBLIC(ContentJobBase)
};
......
......@@ -45,11 +45,10 @@ class MessageComposer::EncryptJobPrivate : public ContentJobBasePrivate
public:
EncryptJobPrivate(EncryptJob *qq)
: ContentJobBasePrivate(qq)
, content(nullptr)
{
}
KMime::Content *content;
KMime::Content *content = nullptr;
std::vector<GpgME::Key> keys;
Kleo::CryptoMessageFormat format;
QStringList recipients;
......
......@@ -54,7 +54,7 @@ public:
SinglepartJob *createHtmlJob();
SinglepartJob *createImageJob(const QSharedPointer<KPIMTextEdit::EmbeddedImage> &image);
TextPart *textPart;
TextPart *textPart = nullptr;
QByteArray chosenCharset;
QString sourcePlainText;
QByteArray encodedPlainText;
......
......@@ -49,7 +49,7 @@ public:
{
}
KMime::Content *content;
KMime::Content *content = nullptr;
std::vector<GpgME::Key> signers;
Kleo::CryptoMessageFormat format;
......
......@@ -48,7 +48,7 @@ public:
{
}
KMime::Content *content;
KMime::Content *content = nullptr;
std::vector<GpgME::Key> signers;
Kleo::CryptoMessageFormat format;
......
......@@ -48,11 +48,11 @@ public:
bool chooseCTE();
QByteArray data;
KMime::Headers::ContentDescription *contentDescription;
KMime::Headers::ContentDisposition *contentDisposition;
KMime::Headers::ContentID *contentID;
KMime::Headers::ContentTransferEncoding *contentTransferEncoding;
KMime::Headers::ContentType *contentType;
KMime::Headers::ContentDescription *contentDescription = nullptr;
KMime::Headers::ContentDisposition *contentDisposition = nullptr;
KMime::Headers::ContentID *contentID = nullptr;
KMime::Headers::ContentTransferEncoding *contentTransferEncoding = nullptr;
KMime::Headers::ContentType *contentType = nullptr;
Q_DECLARE_PUBLIC(SinglepartJob)
};
......
......@@ -43,17 +43,14 @@ class MessageComposer::SkeletonMessageJobPrivate : public JobBasePrivate
public:
SkeletonMessageJobPrivate(SkeletonMessageJob *qq)
: JobBasePrivate(qq)
, infoPart(nullptr)
, globalPart(nullptr)
, message(nullptr)
{
}
void doStart(); // slot
InfoPart *infoPart;
GlobalPart *globalPart;
KMime::Message *message;
InfoPart *infoPart = nullptr;
GlobalPart *globalPart = nullptr;
KMime::Message *message = nullptr;
Q_DECLARE_PUBLIC(SkeletonMessageJob)
};
......
......@@ -32,11 +32,10 @@ class MessageComposer::TransparentJobPrivate : public MessageComposer::ContentJo
public:
TransparentJobPrivate(TransparentJob *qq)
: ContentJobBasePrivate(qq)
, content(nullptr)
{
}
KMime::Content *content;
KMime::Content *content = nullptr;
Q_DECLARE_PUBLIC(TransparentJob)
};
......
Supports Markdown
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