summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-09-03 08:50:58 +0200
committerMontel Laurent <[email protected]>2017-09-03 08:50:58 +0200
commit25217cd70f6dcc9700b2591a11932f1aa7e6a01d (patch)
tree90fbfa8c45fd28558323854c2ac10ca04266c51d
parente5b25cbd01bc0966bb8f07032833cb9ace7b7585 (diff)
Initialize variables
-rw-r--r--messagecomposer/autotests/messagefactoryngtest.h2
-rw-r--r--messagecomposer/autotests/setupenv.h4
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposerng.cpp2
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposersignatures.cpp2
-rw-r--r--messagecomposer/src/composer/composer.cpp14
-rw-r--r--messagecomposer/src/followupreminder/followupremindercreatejob.cpp2
-rw-r--r--messagecomposer/src/followupreminder/followupreminderselectdatedialog.cpp9
-rw-r--r--messagecomposer/src/helper/messagefactoryforwardjob.h2
-rw-r--r--messagecomposer/src/helper/messagefactoryng.h4
-rw-r--r--messagecomposer/src/helper/messagefactoryreplyjob.h4
-rw-r--r--messagecomposer/src/imagescaling/imagescalingselectformat.h6
-rw-r--r--messagecomposer/src/imagescaling/imagescalingwidget.cpp13
-rw-r--r--messagecomposer/src/job/contentjobbase_p.h6
-rw-r--r--messagecomposer/src/job/encryptjob.cpp3
-rw-r--r--messagecomposer/src/job/maintextjob.cpp2
-rw-r--r--messagecomposer/src/job/signencryptjob.cpp2
-rw-r--r--messagecomposer/src/job/signjob.cpp2
-rw-r--r--messagecomposer/src/job/singlepartjob.cpp10
-rw-r--r--messagecomposer/src/job/skeletonmessagejob.cpp9
-rw-r--r--messagecomposer/src/job/transparentjob.cpp3
-rw-r--r--messagecomposer/src/part/globalpart.cpp15
-rw-r--r--messagecomposer/src/plugineditor/plugineditorinterface.cpp9
-rw-r--r--messagecomposer/src/plugineditor/plugineditorinterface.h2
-rw-r--r--messagecomposer/src/plugineditor/plugineditormanager.cpp9
-rw-r--r--messagecomposer/src/plugineditorinit/plugineditorinitmanager.cpp6
-rw-r--r--messagecomposer/src/recipient/kwindowpositioner.h6
-rw-r--r--messagecomposer/src/recipient/recipientseditor.cpp9
-rw-r--r--messagecomposer/src/settings/messagecomposersettings.h2
-rw-r--r--messagecomposer/tests/recipientseditortest.h2
-rw-r--r--messagecore/src/attachment/attachmentpropertiesdialog.cpp6
-rw-r--r--messagecore/src/misc/imagecollector.cpp2
-rw-r--r--messagelist/src/core/item_p.h2
-rw-r--r--messagelist/src/core/manager.h2
-rw-r--r--messagelist/src/core/messageitem_p.h2
-rw-r--r--messagelist/src/core/modelinvariantindex_p.h2
-rw-r--r--messagelist/src/core/modelinvariantrowmapper_p.h2
-rw-r--r--messagelist/src/core/theme.h2
-rw-r--r--messagelist/src/core/widgets/quicksearchline.h4
-rw-r--r--messagelist/src/core/widgets/searchcollectionindexingwarning.h2
-rw-r--r--messagelist/src/pane.cpp22
-rw-r--r--messagelist/src/storagemodel.cpp11
-rw-r--r--messagelist/src/utils/aggregationconfigbutton.cpp2
-rw-r--r--messagelist/src/utils/aggregationeditor.h14
-rw-r--r--messagelist/src/utils/configureaggregationsdialog.cpp2
-rw-r--r--messagelist/src/utils/configureaggregationsdialog_p.h14
-rw-r--r--messagelist/src/utils/configurethemesdialog.cpp2
-rw-r--r--messagelist/src/utils/configurethemesdialog_p.h14
-rw-r--r--messagelist/src/utils/optionseteditor.h4
-rw-r--r--messagelist/src/utils/themeconfigbutton.cpp2
-rw-r--r--messagelist/src/utils/themeeditor.cpp20
-rw-r--r--messagelist/src/utils/themeeditor.h32
-rw-r--r--messagelist/src/widget.cpp6
-rw-r--r--messageviewer/src/header/grantleeheaderformatter.cpp2
-rw-r--r--messageviewer/src/header/grantleeheaderstyle.cpp6
-rw-r--r--messageviewer/src/header/grantleeheaderteststyle.cpp2
-rw-r--r--messageviewer/src/header/headerstyle.cpp6
-rw-r--r--messageviewer/src/header/headerstyleinterface.h2
-rw-r--r--messageviewer/src/header/headerstylemenumanager.cpp10
-rw-r--r--messageviewer/src/header/headerstylepluginmanager.cpp2
-rw-r--r--messageviewer/src/htmlwriter/webengineparthtmlwriter.h2
-rw-r--r--messageviewer/src/job/attachmenteditjob.h6
-rw-r--r--messageviewer/src/messagepartthemes/default/defaultrenderer.cpp2
-rw-r--r--messageviewer/src/messagepartthemes/default/defaultrenderer_p.h6
-rw-r--r--messageviewer/src/messagepartthemes/default/htmlblock.h6
-rw-r--r--messageviewer/src/messagepartthemes/default/messagepartrenderermanager.h2
-rw-r--r--messageviewer/src/messagepartthemes/default/partrendered.h4
-rw-r--r--messageviewer/src/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h4
-rw-r--r--messageviewer/src/scamdetection/autotests/scamdetectionwebenginetest.h4
-rw-r--r--messageviewer/src/scamdetection/scamcheckshorturlmanager.cpp3
-rw-r--r--messageviewer/src/scamdetection/scamdetectiondetailsdialog.h2
-rw-r--r--messageviewer/src/scamdetection/scamexpandurljob.cpp3
-rw-r--r--messageviewer/src/settings/messageviewersettings.h2
-rw-r--r--messageviewer/src/viewer/bodypartformatterfactory.cpp4
-rw-r--r--messageviewer/src/viewer/csshelperbase.h2
-rw-r--r--messageviewer/src/viewer/editorwatcher.h4
-rw-r--r--messageviewer/src/viewer/mimeparttree/mimeparttreeview.h2
-rw-r--r--messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp2
-rw-r--r--messageviewer/src/viewer/objecttreeviewersource.h2
-rw-r--r--messageviewer/src/viewer/urlhandlermanager.h2
-rw-r--r--messageviewer/src/viewer/viewer_p.h96
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineview.cpp21
-rw-r--r--messageviewer/src/viewer/webengine/tests/testjquerysupportmailwebengine.h4
-rw-r--r--messageviewer/src/viewerplugins/viewerpluginmanager.cpp6
-rw-r--r--messageviewer/src/viewerplugins/viewerplugintoolmanager.cpp6
-rw-r--r--messageviewer/src/widgets/configurewidget.cpp3
-rw-r--r--messageviewer/src/widgets/invitationsettings.cpp2
-rw-r--r--messageviewer/src/widgets/printingsettings.cpp2
-rw-r--r--messageviewer/src/widgets/vcardviewer.h6
-rw-r--r--mimetreeparser/autotests/setupenv.h8
-rw-r--r--mimetreeparser/src/htmlwriter/queuehtmlwriter.h2
-rw-r--r--mimetreeparser/src/interfaces/bodypartformatter.cpp6
-rw-r--r--mimetreeparser/src/job/qgpgmejobexecutor.h2
-rw-r--r--mimetreeparser/src/viewer/messagepart.h10
-rw-r--r--mimetreeparser/src/viewer/nodehelper.h4
-rw-r--r--mimetreeparser/src/viewer/partnodebodypart.h10
-rw-r--r--templateparser/src/customtemplates.h2
-rw-r--r--templateparser/src/customtemplatesmenu.cpp14
-rw-r--r--templateparser/src/templateparserjob.cpp2
-rw-r--r--templateparser/src/templatesconfiguration.cpp2
-rw-r--r--templateparser/src/templatesinsertcommand.cpp2
-rw-r--r--webengineviewer/src/checkphishingurl/backoffmodemanager.cpp2
-rw-r--r--webengineviewer/src/checkphishingurl/checkphishingurljob.cpp2
-rw-r--r--webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp2
-rw-r--r--webengineviewer/src/checkphishingurl/searchfullhashjob.cpp2
-rw-r--r--webengineviewer/src/checkphishingurl/tests/webengineviewwithsafebrowsingsupport.h4
-rw-r--r--webengineviewer/src/findbar/findbarwebengineview.cpp3
-rw-r--r--webengineviewer/src/networkmanager/interceptormanager.cpp4
-rw-r--r--webengineviewer/src/tests/testdndwebengine.h4
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp2
-rw-r--r--webengineviewer/src/webengineaccesskey/autotests/webengineaccesskeyanchorfromhtmltest.h2
110 files changed, 303 insertions, 360 deletions
diff --git a/messagecomposer/autotests/messagefactoryngtest.h b/messagecomposer/autotests/messagefactoryngtest.h
index 5ff747b..01b18ba 100644
--- a/messagecomposer/autotests/messagefactoryngtest.h
+++ b/messagecomposer/autotests/messagefactoryngtest.h
@@ -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
diff --git a/messagecomposer/autotests/setupenv.h b/messagecomposer/autotests/setupenv.h
index 3958e87..68effce 100644
--- a/messagecomposer/autotests/setupenv.h
+++ b/messagecomposer/autotests/setupenv.h
@@ -65,8 +65,8 @@ public:
}
private:
- MimeTreeParser::HtmlWriter *mWriter;
- MessageViewer::CSSHelperBase *mCSSHelper;
+ MimeTreeParser::HtmlWriter *mWriter = nullptr;
+ MessageViewer::CSSHelperBase *mCSSHelper = nullptr;
};
}
diff --git a/messagecomposer/src/composer-ng/richtextcomposerng.cpp b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
index f0b7a09..5aa4940 100644
--- a/messagecomposer/src/composer-ng/richtextcomposerng.cpp
+++ b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
@@ -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)
diff --git a/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp b/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
index 1715b02..82f2588 100644
--- a/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
+++ b/messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
@@ -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)
diff --git a/messagecomposer/src/composer/composer.cpp b/messagecomposer/src/composer/composer.cpp
index 6544d41..6340d8f 100644
--- a/messagecomposer/src/composer/composer.cpp
+++ b/messagecomposer/src/composer/composer.cpp
@@ -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;
diff --git a/messagecomposer/src/followupreminder/followupremindercreatejob.cpp b/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
index ac18b46..d2abda5 100644
--- a/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
+++ b/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
@@ -39,7 +39,7 @@ public:
}
Akonadi::Collection mCollection;
- FollowUpReminder::FollowUpReminderInfo *mInfo;
+ FollowUpReminder::FollowUpReminderInfo *mInfo = nullptr;
};
FollowupReminderCreateJob::FollowupReminderCreateJob(QObject *parent)
diff --git a/messagecomposer/src/followupreminder/followupreminderselectdatedialog.cpp b/messagecomposer/src/followupreminder/followupreminderselectdatedialog.cpp
index 7b991c5..16a9342 100644
--- a/messagecomposer/src/followupreminder/followupreminderselectdatedialog.cpp
+++ b/messagecomposer/src/followupreminder/followupreminderselectdatedialog.cpp
@@ -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)
diff --git a/messagecomposer/src/helper/messagefactoryforwardjob.h b/messagecomposer/src/helper/messagefactoryforwardjob.h
index 7d39cef..988edb9 100644
--- a/messagecomposer/src/helper/messagefactoryforwardjob.h
+++ b/messagecomposer/src/helper/messagefactoryforwardjob.h
@@ -60,7 +60,7 @@ private:
KMime::Message::Ptr mMsg;
KMime::Message::Ptr mOrigMsg;
Akonadi::Collection mCollection;
- KIdentityManagement::IdentityManager *mIdentityManager;
+ KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
}
diff --git a/messagecomposer/src/helper/messagefactoryng.h b/messagecomposer/src/helper/messagefactoryng.h
index d9a62ad..86b3eab 100644
--- a/messagecomposer/src/helper/messagefactoryng.h
+++ b/messagecomposer/src/helper/messagefactoryng.h
@@ -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;
diff --git a/messagecomposer/src/helper/messagefactoryreplyjob.h b/messagecomposer/src/helper/messagefactoryreplyjob.h
index 190732a..d03f281 100644
--- a/messagecomposer/src/helper/messagefactoryreplyjob.h
+++ b/messagecomposer/src/helper/messagefactoryreplyjob.h
@@ -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;
};
}
diff --git a/messagecomposer/src/imagescaling/imagescalingselectformat.h b/messagecomposer/src/imagescaling/imagescalingselectformat.h
index c265f8b..df3501b 100644
--- a/messagecomposer/src/imagescaling/imagescalingselectformat.h
+++ b/messagecomposer/src/imagescaling/imagescalingselectformat.h
@@ -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;
};
}
diff --git a/messagecomposer/src/imagescaling/imagescalingwidget.cpp b/messagecomposer/src/imagescaling/imagescalingwidget.cpp
index 190f46e..652b84d 100644
--- a/messagecomposer/src/imagescaling/imagescalingwidget.cpp
+++ b/messagecomposer/src/imagescaling/imagescalingwidget.cpp
@@ -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)
diff --git a/messagecomposer/src/job/contentjobbase_p.h b/messagecomposer/src/job/contentjobbase_p.h
index 121c2b0..a5ef636 100644
--- a/messagecomposer/src/job/contentjobbase_p.h
+++ b/messagecomposer/src/job/contentjobbase_p.h
@@ -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)
};
diff --git a/messagecomposer/src/job/encryptjob.cpp b/messagecomposer/src/job/encryptjob.cpp
index 17f3b3d..de3b7cd 100644
--- a/messagecomposer/src/job/encryptjob.cpp
+++ b/messagecomposer/src/job/encryptjob.cpp
@@ -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;
diff --git a/messagecomposer/src/job/maintextjob.cpp b/messagecomposer/src/job/maintextjob.cpp
index 698207a..1fd821e 100644
--- a/messagecomposer/src/job/maintextjob.cpp
+++ b/messagecomposer/src/job/maintextjob.cpp
@@ -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;
diff --git a/messagecomposer/src/job/signencryptjob.cpp b/messagecomposer/src/job/signencryptjob.cpp
index 511f4e6..a51373c 100644
--- a/messagecomposer/src/job/signencryptjob.cpp
+++ b/messagecomposer/src/job/signencryptjob.cpp
@@ -49,7 +49,7 @@ public:
{
}
- KMime::Content *content;
+ KMime::Content *content = nullptr;
std::vector<GpgME::Key> signers;
Kleo::CryptoMessageFormat format;
diff --git a/messagecomposer/src/job/signjob.cpp b/messagecomposer/src/job/signjob.cpp
index c1551d0..87f3b65 100644
--- a/messagecomposer/src/job/signjob.cpp
+++ b/messagecomposer/src/job/signjob.cpp
@@ -48,7 +48,7 @@ public:
{
}
- KMime::Content *content;
+ KMime::Content *content = nullptr;
std::vector<GpgME::Key> signers;
Kleo::CryptoMessageFormat format;
diff --git a/messagecomposer/src/job/singlepartjob.cpp b/messagecomposer/src/job/singlepartjob.cpp
index defca7f..ddce0f3 100644
--- a/messagecomposer/src/job/singlepartjob.cpp
+++ b/messagecomposer/src/job/singlepartjob.cpp
@@ -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)
};
diff --git a/messagecomposer/src/job/skeletonmessagejob.cpp b/messagecomposer/src/job/skeletonmessagejob.cpp
index 5849656..6397176 100644
--- a/messagecomposer/src/job/skeletonmessagejob.cpp
+++ b/messagecomposer/src/job/skeletonmessagejob.cpp
@@ -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)
};
diff --git a/messagecomposer/src/job/transparentjob.cpp b/messagecomposer/src/job/transparentjob.cpp
index 8f9f990..f0dcddd 100644
--- a/messagecomposer/src/job/transparentjob.cpp
+++ b/messagecomposer/src/job/transparentjob.cpp
@@ -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)
};
diff --git a/messagecomposer/src/part/globalpart.cpp b/messagecomposer/src/part/globalpart.cpp
index 10a89d2..a2b9f04 100644
--- a/messagecomposer/src/part/globalpart.cpp
+++ b/messagecomposer/src/part/globalpart.cpp
@@ -25,20 +25,15 @@ class Q_DECL_HIDDEN GlobalPart::Private
{
public:
Private()
- : guiEnabled(true),
- parentWidgetForGui(nullptr),
- fallbackCharsetEnabled(false),
- allow8Bit(false),
- MDNRequested(false)
{
}
- bool guiEnabled;
- QWidget *parentWidgetForGui;
- bool fallbackCharsetEnabled;
+ bool guiEnabled = true;
+ QWidget *parentWidgetForGui = nullptr;
+ bool fallbackCharsetEnabled = false;
QList<QByteArray> charsets;
- bool allow8Bit;
- bool MDNRequested;
+ bool allow8Bit = false;
+ bool MDNRequested = false;
};
GlobalPart::GlobalPart(QObject *parent)
diff --git a/messagecomposer/src/plugineditor/plugineditorinterface.cpp b/messagecomposer/src/plugineditor/plugineditorinterface.cpp
index 8e8c8a1..d0d46fa 100644
--- a/messagecomposer/src/plugineditor/plugineditorinterface.cpp
+++ b/messagecomposer/src/plugineditor/plugineditorinterface.cpp
@@ -48,16 +48,13 @@ class MessageComposer::PluginEditorInterfacePrivate
{
public:
PluginEditorInterfacePrivate()
- : mParentWidget(nullptr),
- mRichTextEditor(nullptr),
- plugin(nullptr)
{
}
ActionType mActionType;
- QWidget *mParentWidget;
- KPIMTextEdit::RichTextEditor *mRichTextEditor;
- PluginEditor *plugin;
+ QWidget *mParentWidget = nullptr;
+ KPIMTextEdit::RichTextEditor *mRichTextEditor = nullptr;
+ PluginEditor *plugin = nullptr;
};
PluginEditorInterface::PluginEditorInterface(QObject *parent)
diff --git a/messagecomposer/src/plugineditor/plugineditorinterface.h b/messagecomposer/src/plugineditor/plugineditorinterface.h
index 7b4b52b..6944ee2 100644
--- a/messagecomposer/src/plugineditor/plugineditorinterface.h
+++ b/messagecomposer/src/plugineditor/plugineditorinterface.h
@@ -52,7 +52,7 @@ public:
Type type() const;
private:
- QAction *mAction;
+ QAction *mAction = nullptr;
Type mType;
};
diff --git a/messagecomposer/src/plugineditor/plugineditormanager.cpp b/messagecomposer/src/plugineditor/plugineditormanager.cpp
index 78a500c..15d303f 100644
--- a/messagecomposer/src/plugineditor/plugineditormanager.cpp
+++ b/messagecomposer/src/plugineditor/plugineditormanager.cpp
@@ -33,18 +33,15 @@ class PluginEditorInfo
{
public:
PluginEditorInfo()
- : order(0),
- plugin(nullptr),
- isEnabled(true)
{
}
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
- int order;
- PluginEditor *plugin;
- bool isEnabled;
+ int order = 0;
+ PluginEditor *plugin = nullptr;
+ bool isEnabled = true;
};
namespace
diff --git a/messagecomposer/src/plugineditorinit/plugineditorinitmanager.cpp b/messagecomposer/src/plugineditorinit/plugineditorinitmanager.cpp
index 8dadfca..aa342ac 100644
--- a/messagecomposer/src/plugineditorinit/plugineditorinitmanager.cpp
+++ b/messagecomposer/src/plugineditorinit/plugineditorinitmanager.cpp
@@ -34,16 +34,14 @@ class PluginEditorInitInfo
{
public:
PluginEditorInitInfo()
- : plugin(nullptr)
- , isEnabled(true)
{
}
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
- PluginEditorInit *plugin;
- bool isEnabled;
+ PluginEditorInit *plugin = nullptr;
+ bool isEnabled = true;
};
namespace {
diff --git a/messagecomposer/src/recipient/kwindowpositioner.h b/messagecomposer/src/recipient/kwindowpositioner.h
index 84c5022..da91ce0 100644
--- a/messagecomposer/src/recipient/kwindowpositioner.h
+++ b/messagecomposer/src/recipient/kwindowpositioner.h
@@ -36,10 +36,10 @@ public:
void reposition();
private:
- QWidget *mMaster;
- QWidget *mSlave;
+ QWidget *mMaster = nullptr;
+ QWidget *mSlave = nullptr;
- Mode mMode;
+ Mode mMode = Bottom;
};
}
diff --git a/messagecomposer/src/recipient/recipientseditor.cpp b/messagecomposer/src/recipient/recipientseditor.cpp
index fd18f22..d75c87c 100644
--- a/messagecomposer/src/recipient/recipientseditor.cpp
+++ b/messagecomposer/src/recipient/recipientseditor.cpp
@@ -71,15 +71,12 @@ class MessageComposer::RecipientsEditorPrivate
{
public:
RecipientsEditorPrivate()
- : mRecentAddressConfig(nullptr),
- mSideWidget(nullptr),
- mSkipTotal(false)
{
}
- KConfig *mRecentAddressConfig;
- RecipientsEditorSideWidget *mSideWidget;
- bool mSkipTotal;
+ KConfig *mRecentAddressConfig = nullptr;
+ RecipientsEditorSideWidget *mSideWidget = nullptr;
+ bool mSkipTotal = false;
};
RecipientsEditor::RecipientsEditor(QWidget *parent)
diff --git a/messagecomposer/src/settings/messagecomposersettings.h b/messagecomposer/src/settings/messagecomposersettings.h
index 8583a5c..0122fb5 100644
--- a/messagecomposer/src/settings/messagecomposersettings.h
+++ b/messagecomposer/src/settings/messagecomposersettings.h
@@ -53,7 +53,7 @@ private:
virtual ~MessageComposerSettings();
static MessageComposerSettings *mSelf;
- QTimer *mConfigSyncTimer;
+ QTimer *mConfigSyncTimer = nullptr;
};
diff --git a/messagecomposer/tests/recipientseditortest.h b/messagecomposer/tests/recipientseditortest.h
index da5b7f8..9c61b26 100644
--- a/messagecomposer/tests/recipientseditortest.h
+++ b/messagecomposer/tests/recipientseditortest.h
@@ -41,7 +41,7 @@ public Q_SLOTS:
void slotClose();
private:
- MessageComposer::RecipientsEditor *mRecipients;
+ MessageComposer::RecipientsEditor *mRecipients = nullptr;
};
#endif
diff --git a/messagecore/src/attachment/attachmentpropertiesdialog.cpp b/messagecore/src/attachment/attachmentpropertiesdialog.cpp
index 5784429..87e631d 100644
--- a/messagecore/src/attachment/attachmentpropertiesdialog.cpp
+++ b/messagecore/src/attachment/attachmentpropertiesdialog.cpp
@@ -74,9 +74,9 @@ public:
bool mReadOnly;
AttachmentPart::Ptr mPart;
- Ui::AttachmentPropertiesDialog *ui;
- Ui::AttachmentPropertiesDialogReadOnly *uiReadOnly;
- QVBoxLayout *mainLayout;
+ Ui::AttachmentPropertiesDialog *ui = nullptr;
+ Ui::AttachmentPropertiesDialogReadOnly *uiReadOnly = nullptr;
+ QVBoxLayout *mainLayout = nullptr;
};
void AttachmentPropertiesDialog::Private::init(const AttachmentPart::Ptr &part, bool readOnly)
diff --git a/messagecore/src/misc/imagecollector.cpp b/messagecore/src/misc/imagecollector.cpp
index 1661df7..dea55a2 100644
--- a/messagecore/src/misc/imagecollector.cpp
+++ b/messagecore/src/misc/imagecollector.cpp
@@ -72,7 +72,7 @@ MessageCore::ImageCollector::~ImageCollector()
void MessageCore::ImageCollector::collectImagesFrom(KMime::Content *node)
{
- KMime::Content *parent;
+ KMime::Content *parent = nullptr;
while (node) {
parent = node->parent();
diff --git a/messagelist/src/core/item_p.h b/messagelist/src/core/item_p.h
index 9e7cc6f..fac4a0a 100644
--- a/messagelist/src/core/item_p.h
+++ b/messagelist/src/core/item_p.h
@@ -238,7 +238,7 @@ public:
Item *const q;
QList< Item * > *mChildItems; ///< List of children, may be 0
- Item *mParent; ///< The parent view item
+ Item *mParent = nullptr; ///< The parent view item
time_t mMaxDate; ///< The maximum date in the subtree
time_t mDate; ///< The date of the message (or group date)
size_t mSize; ///< The size of the message in bytes
diff --git a/messagelist/src/core/manager.h b/messagelist/src/core/manager.h
index df4f527..746d797 100644
--- a/messagelist/src/core/manager.h
+++ b/messagelist/src/core/manager.h
@@ -68,7 +68,7 @@ private:
QList< Widget * > mWidgetList;
QHash< QString, Aggregation * > mAggregations;
QHash< QString, Theme * > mThemes;
- KMime::DateFormatter *mDateFormatter;
+ KMime::DateFormatter *mDateFormatter = nullptr;
QString mCachedLocalizedUnknownText;
public:
diff --git a/messagelist/src/core/messageitem_p.h b/messagelist/src/core/messageitem_p.h
index 09ef45d..56daeee 100644
--- a/messagelist/src/core/messageitem_p.h
+++ b/messagelist/src/core/messageitem_p.h
@@ -113,7 +113,7 @@ private Q_SLOTS:
private:
QHash<KJob *, MessageItemPrivate *> mRequests;
QCache<Akonadi::Tag::Id, Akonadi::Tag> mCache;
- Akonadi::Monitor *mMonitor;
+ Akonadi::Monitor *mMonitor = nullptr;
};
}
diff --git a/messagelist/src/core/modelinvariantindex_p.h b/messagelist/src/core/modelinvariantindex_p.h
index 13c75cc..6f6a4ad 100644
--- a/messagelist/src/core/modelinvariantindex_p.h
+++ b/messagelist/src/core/modelinvariantindex_p.h
@@ -34,7 +34,7 @@ class ModelInvariantIndex::Private
public:
int mModelIndexRow; ///< The row that this index referenced at the time it was emitted
uint mRowMapperSerial; ///< The serial that was current in the RowMapper at the time the invariant index was emitted
- ModelInvariantRowMapper *mRowMapper; ///< The mapper that this invariant index is attached to
+ ModelInvariantRowMapper *mRowMapper = nullptr; ///< The mapper that this invariant index is attached to
int modelIndexRow() const
{
diff --git a/messagelist/src/core/modelinvariantrowmapper_p.h b/messagelist/src/core/modelinvariantrowmapper_p.h
index 50a849f..0051b0f 100644
--- a/messagelist/src/core/modelinvariantrowmapper_p.h
+++ b/messagelist/src/core/modelinvariantrowmapper_p.h
@@ -71,7 +71,7 @@ public:
uint mRemovedShiftCount; ///< The number of shifts that we have completely processed
int mLazyUpdateChunkInterval; ///< Msecs: how much time we spend inside a lazy update chunk
int mLazyUpdateIdleInterval; ///< Msecs: how much time we idle between lazy update chunks
- QTimer *mUpdateTimer; ///< Background lazy update timer
+ QTimer *mUpdateTimer = nullptr; ///< Background lazy update timer
};
} // Core
diff --git a/messagelist/src/core/theme.h b/messagelist/src/core/theme.h
index 1b6f126..c015355 100644
--- a/messagelist/src/core/theme.h
+++ b/messagelist/src/core/theme.h
@@ -615,7 +615,7 @@ public:
QList< Row * > mGroupHeaderRows; ///< The list of rows we display in this column for a GroupHeaderItem
QList< Row * > mMessageRows; ///< The list of rows we display in this column for a MessageItem
- SharedRuntimeData *mSharedRuntimeData; ///< A pointer to the shared runtime data: shared between all instances of a theme with the same id
+ SharedRuntimeData *mSharedRuntimeData = nullptr; ///< A pointer to the shared runtime data: shared between all instances of a theme with the same id
public:
/**
* Returns the label set for this column
diff --git a/messagelist/src/core/widgets/quicksearchline.h b/messagelist/src/core/widgets/quicksearchline.h
index 1a460f1..993fc70 100644
--- a/messagelist/src/core/widgets/quicksearchline.h
+++ b/messagelist/src/core/widgets/quicksearchline.h
@@ -82,8 +82,8 @@ private Q_SLOTS:
void slotClearButtonClicked();
void slotFilterActionChanged(const QList<Akonadi::MessageStatus> &lst);
private:
- SearchLineStatus *mSearchEdit;
- KComboBox *mTagFilterCombo;
+ SearchLineStatus *mSearchEdit = nullptr;
+ KComboBox *mTagFilterCombo = nullptr;
QList<Akonadi::MessageStatus> mLstStatus;
};
}
diff --git a/messagelist/src/core/widgets/searchcollectionindexingwarning.h b/messagelist/src/core/widgets/searchcollectionindexingwarning.h
index d59a98f..ca89420 100644
--- a/messagelist/src/core/widgets/searchcollectionindexingwarning.h
+++ b/messagelist/src/core/widgets/searchcollectionindexingwarning.h
@@ -62,7 +62,7 @@ private:
Akonadi::Collection mCollection;
Akonadi::Collection::List mCollections;
- Akonadi::Search::PIM::IndexedItems *mIndexedItems;
+ Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr;
};
}
}
diff --git a/messagelist/src/pane.cpp b/messagelist/src/pane.cpp
index 6eba751..c7338fa 100644
--- a/messagelist/src/pane.cpp
+++ b/messagelist/src/pane.cpp
@@ -92,23 +92,23 @@ public:
Pane *const q;
- KXMLGUIClient *mXmlGuiClient;
- KActionMenu *mActionMenu;
+ KXMLGUIClient *mXmlGuiClient = nullptr;
+ KActionMenu *mActionMenu = nullptr;
- QAbstractItemModel *mModel;
- QItemSelectionModel *mSelectionModel;
+ QAbstractItemModel *mModel = nullptr;
+ QItemSelectionModel *mSelectionModel = nullptr;
Core::PreSelectionMode mPreSelectionMode;
QHash<Widget *, QItemSelectionModel *> mWidgetSelectionHash;
QVector<const QAbstractProxyModel *> mProxyStack;
- QToolButton *mNewTabButton;
- QToolButton *mCloseTabButton;
- QAction *mCloseTabAction;
- QAction *mActivateNextTabAction;
- QAction *mActivatePreviousTabAction;
- QAction *mMoveTabLeftAction;
- QAction *mMoveTabRightAction;
+ QToolButton *mNewTabButton = nullptr;
+ QToolButton *mCloseTabButton = nullptr;
+ QAction *mCloseTabAction = nullptr;
+ QAction *mActivateNextTabAction = nullptr;
+ QAction *mActivatePreviousTabAction = nullptr;
+ QAction *mMoveTabLeftAction = nullptr;
+ QAction *mMoveTabRightAction = nullptr;
bool mPreferEmptyTab;
int mMaxTabCreated;
};
diff --git a/messagelist/src/storagemodel.cpp b/messagelist/src/storagemodel.cpp
index 161b4b4..1f8f0ad 100644
--- a/messagelist/src/storagemodel.cpp
+++ b/messagelist/src/storagemodel.cpp
@@ -58,15 +58,12 @@ public:
StorageModel *const q;
- QAbstractItemModel *mModel;
- QAbstractItemModel *mChildrenFilterModel;
- QItemSelectionModel *mSelectionModel;
+ QAbstractItemModel *mModel = nullptr;
+ QAbstractItemModel *mChildrenFilterModel = nullptr;
+ QItemSelectionModel *mSelectionModel = nullptr;
Private(StorageModel *owner)
- : q(owner),
- mModel(nullptr),
- mChildrenFilterModel(nullptr),
- mSelectionModel(nullptr)
+ : q(owner)
{}
};
diff --git a/messagelist/src/utils/aggregationconfigbutton.cpp b/messagelist/src/utils/aggregationconfigbutton.cpp
index 6e4c5e9..10949c3 100644
--- a/messagelist/src/utils/aggregationconfigbutton.cpp
+++ b/messagelist/src/utils/aggregationconfigbutton.cpp
@@ -36,7 +36,7 @@ public:
AggregationConfigButton *const q;
- const AggregationComboBox *mAggregationComboBox;
+ const AggregationComboBox *mAggregationComboBox = nullptr;
void slotConfigureAggregations();
};
diff --git a/messagelist/src/utils/aggregationeditor.h b/messagelist/src/utils/aggregationeditor.h
index c374304..673b9bc 100644
--- a/messagelist/src/utils/aggregationeditor.h
+++ b/messagelist/src/utils/aggregationeditor.h
@@ -51,16 +51,16 @@ public:
~AggregationEditor();
private:
- Core::Aggregation *mCurrentAggregation; // shallow, may be null!
+ Core::Aggregation *mCurrentAggregation = nullptr; // shallow, may be null!
// Grouping, Threading and Sorting tab
- KComboBox *mGroupingCombo;
- KComboBox *mGroupExpandPolicyCombo;
- KComboBox *mThreadingCombo;
- KComboBox *mThreadLeaderCombo;
- KComboBox *mThreadExpandPolicyCombo;
+ KComboBox *mGroupingCombo = nullptr;
+ KComboBox *mGroupExpandPolicyCombo = nullptr;
+ KComboBox *mThreadingCombo = nullptr;
+ KComboBox *mThreadLeaderCombo = nullptr;
+ KComboBox *mThreadExpandPolicyCombo = nullptr;
// Advanced tab
- KComboBox *mFillViewStrategyCombo;
+ KComboBox *mFillViewStrategyCombo = nullptr;
public:
/**
diff --git a/messagelist/src/utils/configureaggregationsdialog.cpp b/messagelist/src/utils/configureaggregationsdialog.cpp
index f972fbe..0fc53d6 100644
--- a/messagelist/src/utils/configureaggregationsdialog.cpp
+++ b/messagelist/src/utils/configureaggregationsdialog.cpp
@@ -49,7 +49,7 @@ namespace Utils
class AggregationListWidgetItem : public QListWidgetItem
{
private:
- Core::Aggregation *mAggregation;
+ Core::Aggregation *mAggregation = nullptr;
public:
AggregationListWidgetItem(QListWidget *par, const Core::Aggregation &set)
diff --git a/messagelist/src/utils/configureaggregationsdialog_p.h b/messagelist/src/utils/configureaggregationsdialog_p.h
index 8f22e0b..9437098 100644
--- a/messagelist/src/utils/configureaggregationsdialog_p.h
+++ b/messagelist/src/utils/configureaggregationsdialog_p.h
@@ -75,13 +75,13 @@ public:
ConfigureAggregationsDialog *const q;
- AggregationListWidget *mAggregationList;
- AggregationEditor *mEditor;
- QPushButton *mNewAggregationButton;
- QPushButton *mCloneAggregationButton;
- QPushButton *mDeleteAggregationButton;
- QPushButton *mExportAggregationButton;
- QPushButton *mImportAggregationButton;
+ AggregationListWidget *mAggregationList = nullptr;
+ AggregationEditor *mEditor = nullptr;
+ QPushButton *mNewAggregationButton = nullptr;
+ QPushButton *mCloneAggregationButton = nullptr;
+ QPushButton *mDeleteAggregationButton = nullptr;
+ QPushButton *mExportAggregationButton = nullptr;
+ QPushButton *mImportAggregationButton = nullptr;
};
} // namespace Utils
diff --git a/messagelist/src/utils/configurethemesdialog.cpp b/messagelist/src/utils/configurethemesdialog.cpp
index f2b4d86..647e5cd 100644
--- a/messagelist/src/utils/configurethemesdialog.cpp
+++ b/messagelist/src/utils/configurethemesdialog.cpp
@@ -69,7 +69,7 @@ public:
mTheme = nullptr;
}
private:
- Core::Theme *mTheme;
+ Core::Theme *mTheme = nullptr;
};
class ThemeListWidget : public QListWidget
diff --git a/messagelist/src/utils/configurethemesdialog_p.h b/messagelist/src/utils/configurethemesdialog_p.h
index de71846..dbb59b1 100644
--- a/messagelist/src/utils/configurethemesdialog_p.h
+++ b/messagelist/src/utils/configurethemesdialog_p.h
@@ -64,13 +64,13 @@ public:
ConfigureThemesDialog *const q;
- ThemeListWidget *mThemeList;
- ThemeEditor *mEditor;
- QPushButton *mNewThemeButton;
- QPushButton *mCloneThemeButton;
- QPushButton *mDeleteThemeButton;
- QPushButton *mExportThemeButton;
- QPushButton *mImportThemeButton;
+ ThemeListWidget *mThemeList = nullptr;
+ ThemeEditor *mEditor = nullptr;
+ QPushButton *mNewThemeButton = nullptr;
+ QPushButton *mCloneThemeButton = nullptr;
+ QPushButton *mDeleteThemeButton = nullptr;
+ QPushButton *mExportThemeButton = nullptr;
+ QPushButton *mImportThemeButton = nullptr;
};
diff --git a/messagelist/src/utils/optionseteditor.h b/messagelist/src/utils/optionseteditor.h
index 6b298a8..9574a14 100644
--- a/messagelist/src/utils/optionseteditor.h
+++ b/messagelist/src/utils/optionseteditor.h
@@ -73,8 +73,8 @@ protected Q_SLOTS:
virtual void slotNameEditTextEdited(const QString &newName) = 0;
private:
- KLineEdit *mNameEdit; ///< The editor for the OptionSet name
- KTextEdit *mDescriptionEdit; ///< The editor for the OptionSet description
+ KLineEdit *mNameEdit = nullptr; ///< The editor for the OptionSet name
+ KTextEdit *mDescriptionEdit = nullptr; ///< The editor for the OptionSet description
};
diff --git a/messagelist/src/utils/themeconfigbutton.cpp b/messagelist/src/utils/themeconfigbutton.cpp
index f6d5467..f50352f 100644
--- a/messagelist/src/utils/themeconfigbutton.cpp
+++ b/messagelist/src/utils/themeconfigbutton.cpp
@@ -37,7 +37,7 @@ public:
ThemeConfigButton *const q;
- const ThemeComboBox *mThemeComboBox;
+ const ThemeComboBox *mThemeComboBox = nullptr;
void slotConfigureThemes();
};
diff --git a/messagelist/src/utils/themeeditor.cpp b/messagelist/src/utils/themeeditor.cpp
index 925310d..0dafc10 100644
--- a/messagelist/src/utils/themeeditor.cpp
+++ b/messagelist/src/utils/themeeditor.cpp
@@ -82,9 +82,7 @@ ThemeColumnPropertiesDialog::ThemeColumnPropertiesDialog(QWidget *parent, Theme:
QGridLayout *g = new QGridLayout(base);
- QLabel *l;
-
- l = new QLabel(i18nc("@label:textbox Property name", "Name:"), base);
+ QLabel *l = new QLabel(i18nc("@label:textbox Property name", "Name:"), base);
g->addWidget(l, 0, 0);
mNameEdit = new KLineEdit(base);
@@ -876,8 +874,7 @@ void ThemePreviewWidget::mousePressEvent(QMouseEvent *e)
menu.addSection(Theme::ContentItem::description(mSelectedThemeContentItem->type()));
if (mSelectedThemeContentItem->displaysText()) {
- QAction *act;
- act = menu.addAction(i18nc("@action:inmenu soften the text color", "Soften"));
+ QAction *act = menu.addAction(i18nc("@action:inmenu soften the text color", "Soften"));
act->setCheckable(true);
act->setChecked(mSelectedThemeContentItem->softenByBlending());
connect(act, &QAction::triggered, this, &ThemePreviewWidget::slotSoftenActionTriggered);
@@ -903,8 +900,7 @@ void ThemePreviewWidget::mousePressEvent(QMouseEvent *e)
QActionGroup *grp = new QActionGroup(childmenu);
- QAction *act;
- act = childmenu->addAction(i18nc("@action:inmenu Foreground color setting", "Default"));
+ QAction *act = childmenu->addAction(i18nc("@action:inmenu Foreground color setting", "Default"));
act->setData(QVariant(static_cast< int >(0)));
act->setCheckable(true);
act->setChecked(!mSelectedThemeContentItem->useCustomColor());
@@ -925,8 +921,7 @@ void ThemePreviewWidget::mousePressEvent(QMouseEvent *e)
QActionGroup *grp = new QActionGroup(childmenu);
- QAction *act;
- act = childmenu->addAction(i18nc("Hide a mark if the mail does not have the attribute, e.g. Important mark on a non important mail", "Hide"));
+ QAction *act = childmenu->addAction(i18nc("Hide a mark if the mail does not have the attribute, e.g. Important mark on a non important mail", "Hide"));
act->setData(QVariant(static_cast< int >(Theme::ContentItem::HideWhenDisabled)));
act->setCheckable(true);
act->setChecked(mSelectedThemeContentItem->hideWhenDisabled());
@@ -958,8 +953,7 @@ void ThemePreviewWidget::mousePressEvent(QMouseEvent *e)
QActionGroup *grp = new QActionGroup(childmenu);
- QAction *act;
- act = childmenu->addAction(i18nc("@action:inmenu Group header background color setting", "None"));
+ QAction *act = childmenu->addAction(i18nc("@action:inmenu Group header background color setting", "None"));
act->setData(QVariant(static_cast< int >(Theme::Transparent)));
act->setCheckable(true);
act->setChecked(mTheme->groupHeaderBackgroundMode() == Theme::Transparent);
@@ -1188,9 +1182,7 @@ void ThemePreviewWidget::slotHeaderContextMenuRequested(const QPoint &pos)
menu.setTitle(mSelectedThemeColumn->label());
- QAction *act;
-
- act = menu.addAction(i18n("Column Properties..."));
+ QAction *act = menu.addAction(i18n("Column Properties..."));
connect(act, &QAction::triggered, this, &ThemePreviewWidget::slotColumnProperties);
act = menu.addAction(i18n("Add Column..."));
diff --git a/messagelist/src/utils/themeeditor.h b/messagelist/src/utils/themeeditor.h
index 5e0576b..cae7146 100644
--- a/messagelist/src/utils/themeeditor.h
+++ b/messagelist/src/utils/themeeditor.h
@@ -61,11 +61,11 @@ public:
explicit ThemeColumnPropertiesDialog(QWidget *parent, Core::Theme::Column *column, const QString &title);
protected:
- Core::Theme::Column *mColumn;
- KLineEdit *mNameEdit;
- QCheckBox *mVisibleByDefaultCheck;
- QCheckBox *mIsSenderOrReceiverCheck;
- KComboBox *mMessageSortingCombo;
+ Core::Theme::Column *mColumn = nullptr;
+ KLineEdit *mNameEdit = nullptr;
+ QCheckBox *mVisibleByDefaultCheck = nullptr;
+ QCheckBox *mIsSenderOrReceiverCheck = nullptr;
+ KComboBox *mMessageSortingCombo = nullptr;
protected Q_SLOTS:
void slotOkButtonClicked();
@@ -79,9 +79,9 @@ public:
~ThemePreviewDelegate();
private:
- Core::GroupHeaderItem *mSampleGroupHeaderItem;
- Core::FakeItem *mSampleMessageItem;
- Core::ModelInvariantRowMapper *mRowMapper; // needed for the MessageItem above to be valid
+ Core::GroupHeaderItem *mSampleGroupHeaderItem = nullptr;
+ Core::FakeItem *mSampleMessageItem = nullptr;
+ Core::ModelInvariantRowMapper *mRowMapper = nullptr; // needed for the MessageItem above to be valid
public:
Core::Item *itemFromIndex(const QModelIndex &index) const override;
};
@@ -119,11 +119,11 @@ private:
};
private:
- ThemePreviewDelegate *mDelegate;
- QTreeWidgetItem *mGroupHeaderSampleItem;
+ ThemePreviewDelegate *mDelegate = nullptr;
+ QTreeWidgetItem *mGroupHeaderSampleItem = nullptr;
QRect mThemeSelectedContentItemRect;
- Core::Theme::ContentItem *mSelectedThemeContentItem;
- Core::Theme::Column *mSelectedThemeColumn;
+ Core::Theme::ContentItem *mSelectedThemeContentItem = nullptr;
+ Core::Theme::Column *mSelectedThemeColumn = nullptr;
QPoint mMouseDownPoint;
Core::Theme *mTheme;
RowInsertPosition mRowInsertPosition;
@@ -227,14 +227,14 @@ protected Q_SLOTS:
private:
void setReadOnly(bool readOnly);
- Core::Theme *mCurrentTheme; // shallow, may be null!
+ Core::Theme *mCurrentTheme = nullptr; // shallow, may be null!
// Appearance tab
- ThemePreviewWidget *mPreviewWidget;
+ ThemePreviewWidget *mPreviewWidget = nullptr;
// Advanced tab
- KComboBox *mViewHeaderPolicyCombo;
- KPluralHandlingSpinBox *mIconSizeSpinBox;
+ KComboBox *mViewHeaderPolicyCombo = nullptr;
+ KPluralHandlingSpinBox *mIconSizeSpinBox = nullptr;
};
} // namespace Utils
diff --git a/messagelist/src/widget.cpp b/messagelist/src/widget.cpp
index ebc7b06..0b854ce 100644
--- a/messagelist/src/widget.cpp
+++ b/messagelist/src/widget.cpp
@@ -68,9 +68,9 @@ public:
Widget *const q;
int mLastSelectedMessage;
- KXMLGUIClient *mXmlGuiClient;
+ KXMLGUIClient *mXmlGuiClient = nullptr;
QModelIndex mGroupHeaderItemIndex;
- Akonadi::Monitor *mMonitor;
+ Akonadi::Monitor *mMonitor = nullptr;
};
} // namespace MessageList
@@ -348,7 +348,7 @@ void Widget::viewGroupHeaderContextPopupRequest(MessageList::Core::GroupHeaderIt
QMenu menu(this);
- QAction *act;
+ QAction *act = nullptr;
QModelIndex index = view()->model()->index(ghi, 0);
d->mGroupHeaderItemIndex = index;
diff --git a/messageviewer/src/header/grantleeheaderformatter.cpp b/messageviewer/src/header/grantleeheaderformatter.cpp
index 0723fa4..68b5e56 100644
--- a/messageviewer/src/header/grantleeheaderformatter.cpp
+++ b/messageviewer/src/header/grantleeheaderformatter.cpp
@@ -60,7 +60,7 @@ public:
MessageViewer::HeaderStyleUtil headerStyleUtil;
QSharedPointer<Grantlee::FileSystemTemplateLoader> templateLoader;
int iconSize;
- Grantlee::Engine *engine;
+ Grantlee::Engine *engine = nullptr;
};
GrantleeHeaderFormatter::GrantleeHeaderFormatter()
diff --git a/messageviewer/src/header/grantleeheaderstyle.cpp b/messageviewer/src/header/grantleeheaderstyle.cpp
index ed04714..98ced9d 100644
--- a/messageviewer/src/header/grantleeheaderstyle.cpp
+++ b/messageviewer/src/header/grantleeheaderstyle.cpp
@@ -29,8 +29,6 @@ class MessageViewer::GrantleeHeaderStylePrivate
{
public:
GrantleeHeaderStylePrivate()
- : mGrantleeFormatter(nullptr)
- , mShowMailAction(true)
{
mGrantleeFormatter = new GrantleeHeaderFormatter;
}
@@ -40,8 +38,8 @@ public:
delete mGrantleeFormatter;
}
- GrantleeHeaderFormatter *mGrantleeFormatter;
- bool mShowMailAction;
+ GrantleeHeaderFormatter *mGrantleeFormatter = nullptr;
+ bool mShowMailAction = true;
};
GrantleeHeaderStyle::GrantleeHeaderStyle()
diff --git a/messageviewer/src/header/grantleeheaderteststyle.cpp b/messageviewer/src/header/grantleeheaderteststyle.cpp
index 2b5cab6..dfab7d1 100644
--- a/messageviewer/src/header/grantleeheaderteststyle.cpp
+++ b/messageviewer/src/header/grantleeheaderteststyle.cpp
@@ -42,7 +42,7 @@ public:
QStringList mExtraDisplay;
QString mAbsolutePath;
QString mMainFilename;
- GrantleeHeaderFormatter *mGrantleeFormatter;
+ GrantleeHeaderFormatter *mGrantleeFormatter = nullptr;
};
GrantleeHeaderTestStyle::GrantleeHeaderTestStyle()
diff --git a/messageviewer/src/header/headerstyle.cpp b/messageviewer/src/header/headerstyle.cpp
index 59748e7..0e496c8 100644
--- a/messageviewer/src/header/headerstyle.cpp
+++ b/messageviewer/src/header/headerstyle.cpp
@@ -56,11 +56,11 @@ public:
GrantleeTheme::Theme mTheme;
QString mMessagePath;
- const HeaderStrategy *mStrategy;
+ const HeaderStrategy *mStrategy = nullptr;
QString mVCardName;
QString mCollectionName;
- MimeTreeParser::NodeHelper *mNodeHelper;
- QObject *mSourceObject;
+ MimeTreeParser::NodeHelper *mNodeHelper = nullptr;
+ QObject *mSourceObject = nullptr;
Akonadi::MessageStatus mMessageStatus;
bool mPrinting;
bool mTopLevel;
diff --git a/messageviewer/src/header/headerstyleinterface.h b/messageviewer/src/header/headerstyleinterface.h
index c9c773c..ad79c20 100644
--- a/messageviewer/src/header/headerstyleinterface.h
+++ b/messageviewer/src/header/headerstyleinterface.h
@@ -52,7 +52,7 @@ protected:
void addHelpTextAction(QAction *act, const QString &text);
void addActionToMenu(KActionMenu *menu, QActionGroup *actionGroup);
QList<KToggleAction *> mAction;
- HeaderStylePlugin *mHeaderStylePlugin;
+ HeaderStylePlugin *mHeaderStylePlugin = nullptr;
};
}
#endif // HEADERSTYLEINTERFACE_H
diff --git a/messageviewer/src/header/headerstylemenumanager.cpp b/messageviewer/src/header/headerstylemenumanager.cpp
index b11a9fb..37b9d6c 100644
--- a/messageviewer/src/header/headerstylemenumanager.cpp
+++ b/messageviewer/src/header/headerstylemenumanager.cpp
@@ -36,9 +36,7 @@ class MessageViewer::HeaderStyleMenuManagerPrivate
{
public:
HeaderStyleMenuManagerPrivate(HeaderStyleMenuManager *qq)
- : group(nullptr)
- , headerMenu(nullptr)
- , q(qq)
+ : q(qq)
{
}
@@ -48,9 +46,9 @@ public:
void addHelpTextAction(QAction *act, const QString &text);
void setPluginName(const QString &pluginName);
QHash<QString, MessageViewer::HeaderStyleInterface *> lstInterface;
- QActionGroup *group;
- KActionMenu *headerMenu;
- HeaderStyleMenuManager *q;
+ QActionGroup *group = nullptr;
+ KActionMenu *headerMenu = nullptr;
+ HeaderStyleMenuManager *q = nullptr;
};
void HeaderStyleMenuManagerPrivate::addHelpTextAction(QAction *act, const QString &text)
diff --git a/messageviewer/src/header/headerstylepluginmanager.cpp b/messageviewer/src/header/headerstylepluginmanager.cpp
index 5d5b607..9994c1f 100644
--- a/messageviewer/src/header/headerstylepluginmanager.cpp
+++ b/messageviewer/src/header/headerstylepluginmanager.cpp
@@ -40,7 +40,7 @@ public:
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
- MessageViewer::HeaderStylePlugin *plugin;
+ MessageViewer::HeaderStylePlugin *plugin = nullptr;
bool isEnabled;
};
diff --git a/messageviewer/src/htmlwriter/webengineparthtmlwriter.h b/messageviewer/src/htmlwriter/webengineparthtmlwriter.h
index 9a42259..1837adc 100644
--- a/messageviewer/src/htmlwriter/webengineparthtmlwriter.h
+++ b/messageviewer/src/htmlwriter/webengineparthtmlwriter.h
@@ -52,7 +52,7 @@ private:
void insertExtraHead();
private:
- MailWebEngineView *mHtmlView;
+ MailWebEngineView *mHtmlView = nullptr;
QString mHtml;
QString mExtraHead;
enum State {
diff --git a/messageviewer/src/job/attachmenteditjob.h b/messageviewer/src/job/attachmenteditjob.h
index f4d4e9a..e384df7 100644
--- a/messageviewer/src/job/attachmenteditjob.h
+++ b/messageviewer/src/job/attachmenteditjob.h
@@ -58,9 +58,9 @@ private:
QHash<EditorWatcher *, KMime::Content *> mEditorWatchers;
Akonadi::Item mMessageItem;
KMime::Message::Ptr mMessage;
- bool mShowWarning;
- QWidget *mMainWindow;
- Akonadi::Session *mSession;
+ bool mShowWarning = false;
+ QWidget *mMainWindow = nullptr;
+ Akonadi::Session *mSession = nullptr;
};
}
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
index e1069c0..d0e9c62 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
@@ -336,7 +336,7 @@ public:
}
QString html;
- MimeTreeParser::HtmlWriter *mBaseWriter;
+ MimeTreeParser::HtmlWriter *mBaseWriter = nullptr;
};
DefaultRendererPrivate::DefaultRendererPrivate(const Interface::MessagePart::Ptr &msgPart,
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer_p.h b/messageviewer/src/messagepartthemes/default/defaultrenderer_p.h
index a869378..a8ca21c 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer_p.h
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer_p.h
@@ -67,10 +67,10 @@ public:
QString mHtml;
Interface::MessagePart::Ptr mMsgPart;
- HtmlWriter *mOldWriter;
+ HtmlWriter *mOldWriter = nullptr;
- CSSHelperBase *mCSSHelper;
- const MessageViewer::MessagePartRendererFactoryBase *mRendererFactory;
+ CSSHelperBase *mCSSHelper = nullptr;
+ const MessageViewer::MessagePartRendererFactoryBase *mRendererFactory = nullptr;
};
}
#endif
diff --git a/messageviewer/src/messagepartthemes/default/htmlblock.h b/messageviewer/src/messagepartthemes/default/htmlblock.h
index f0cc7a1..a6fc854 100644
--- a/messageviewer/src/messagepartthemes/default/htmlblock.h
+++ b/messageviewer/src/messagepartthemes/default/htmlblock.h
@@ -68,8 +68,8 @@ private:
void internalEnter();
void internalExit();
- KMime::Content *mNode;
- HtmlWriter *mWriter;
+ KMime::Content *mNode = nullptr;
+ HtmlWriter *mWriter = nullptr;
};
// Make sure the whole content is relative, so that nothing is painted over the header
@@ -89,7 +89,7 @@ private:
void internalEnter();
void internalExit();
- HtmlWriter *mWriter;
+ HtmlWriter *mWriter = nullptr;
};
}
#endif //__MIMETREEPARSER_HTMLBLOCK_H__
diff --git a/messageviewer/src/messagepartthemes/default/messagepartrenderermanager.h b/messageviewer/src/messagepartthemes/default/messagepartrenderermanager.h
index cf09761..4e1b7a7 100644
--- a/messageviewer/src/messagepartthemes/default/messagepartrenderermanager.h
+++ b/messageviewer/src/messagepartthemes/default/messagepartrenderermanager.h
@@ -42,7 +42,7 @@ public:
int iconCurrentSize() const;
private:
void initializeRenderer();
- GrantleeTheme::Engine *m_engine;
+ GrantleeTheme::Engine *m_engine = nullptr;
int mCurrentIconSize;
};
}
diff --git a/messageviewer/src/messagepartthemes/default/partrendered.h b/messageviewer/src/messagepartthemes/default/partrendered.h
index f04d09e..dbc59ee 100644
--- a/messageviewer/src/messagepartthemes/default/partrendered.h
+++ b/messageviewer/src/messagepartthemes/default/partrendered.h
@@ -96,7 +96,7 @@ protected:
private:
QString mHtml;
bool mShowAttachmentBlock;
- KMime::Content *mAttachmentNode;
+ KMime::Content *mAttachmentNode = nullptr;
};
class TextPartRendered : public PartRendered
@@ -113,7 +113,7 @@ private:
QString mHtml;
QVector<QSharedPointer<PartRendered> > mSubList;
bool mShowAttachmentBlock;
- KMime::Content *mAttachmentNode;
+ KMime::Content *mAttachmentNode = nullptr;
};
#endif
diff --git a/messageviewer/src/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h b/messageviewer/src/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h
index 49e3a13..090c5d0 100644
--- a/messageviewer/src/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h
+++ b/messageviewer/src/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h
@@ -41,8 +41,8 @@ public:
QString name() const override;
private:
void initializePlugin();
- GrantleeHeaderStyle *mHeaderStyle;
- HeaderStrategy *mHeaderStrategy;
+ GrantleeHeaderStyle *mHeaderStyle = nullptr;
+ HeaderStrategy *mHeaderStrategy = nullptr;
};
}
#endif // DEFAULTGRANTLEEHEADERSTYLEPLUGIN_H
diff --git a/messageviewer/src/scamdetection/autotests/scamdetectionwebenginetest.h b/messageviewer/src/scamdetection/autotests/scamdetectionwebenginetest.h
index 5da716d..abbdc15 100644
--- a/messageviewer/src/scamdetection/autotests/scamdetectionwebenginetest.h
+++ b/messageviewer/src/scamdetection/autotests/scamdetectionwebenginetest.h
@@ -41,8 +41,8 @@ Q_SIGNALS:
void resultScanDetection(bool result);
private:
- QWebEngineView *mEngineView;
- MessageViewer::ScamDetectionWebEngine *mScamDetectionWebEngine;
+ QWebEngineView *mEngineView = nullptr;
+ MessageViewer::ScamDetectionWebEngine *mScamDetectionWebEngine = nullptr;
};
class ScamDetectionWebEngineTest : public QObject
diff --git a/messageviewer/src/scamdetection/scamcheckshorturlmanager.cpp b/messageviewer/src/scamdetection/scamcheckshorturlmanager.cpp
index 31fe353..3e32688 100644
--- a/messageviewer/src/scamdetection/scamcheckshorturlmanager.cpp
+++ b/messageviewer/src/scamdetection/scamcheckshorturlmanager.cpp
@@ -27,11 +27,10 @@ class MessageViewer::ScamCheckShortUrlManagerPrivate
{
public:
ScamCheckShortUrlManagerPrivate()
- : mCheckShortUrl(nullptr)
{
}
- ScamCheckShortUrl *mCheckShortUrl;
+ ScamCheckShortUrl *mCheckShortUrl = nullptr;
};
ScamCheckShortUrlManager::ScamCheckShortUrlManager(QObject *parent)
diff --git a/messageviewer/src/scamdetection/scamdetectiondetailsdialog.h b/messageviewer/src/scamdetection/scamdetectiondetailsdialog.h
index 24b7164..ba58d7d 100644
--- a/messageviewer/src/scamdetection/scamdetectiondetailsdialog.h
+++ b/messageviewer/src/scamdetection/scamdetectiondetailsdialog.h
@@ -41,7 +41,7 @@ private:
void slotSaveAs();
void writeConfig();
void readConfig();
- KPIMTextEdit::RichTextEditorWidget *mDetails;
+ KPIMTextEdit::RichTextEditorWidget *mDetails = nullptr;
};
}
diff --git a/messageviewer/src/scamdetection/scamexpandurljob.cpp b/messageviewer/src/scamdetection/scamexpandurljob.cpp
index c7dde5b..489e52b 100644
--- a/messageviewer/src/scamdetection/scamexpandurljob.cpp
+++ b/messageviewer/src/scamdetection/scamexpandurljob.cpp
@@ -36,7 +36,6 @@ class MessageViewer::ScamExpandUrlJobPrivate
{
public:
ScamExpandUrlJobPrivate()
- : mNetworkAccessManager(nullptr)
{
}
@@ -44,7 +43,7 @@ public:
{
}
- QNetworkAccessManager *mNetworkAccessManager;
+ QNetworkAccessManager *mNetworkAccessManager = nullptr;
};
ScamExpandUrlJob::ScamExpandUrlJob(QObject *parent)
diff --git a/messageviewer/src/settings/messageviewersettings.h b/messageviewer/src/settings/messageviewersettings.h
index ebd6b22..cfd4bf1 100644
--- a/messageviewer/src/settings/messageviewersettings.h
+++ b/messageviewer/src/settings/messageviewersettings.h
@@ -50,7 +50,7 @@ private:
virtual ~MessageViewerSettings();
static MessageViewerSettings *mSelf;
- QTimer *mConfigSyncTimer;
+ QTimer *mConfigSyncTimer = nullptr;
};
}
diff --git a/messageviewer/src/viewer/bodypartformatterfactory.cpp b/messageviewer/src/viewer/bodypartformatterfactory.cpp
index 7a56b61..672768e 100644
--- a/messageviewer/src/viewer/bodypartformatterfactory.cpp
+++ b/messageviewer/src/viewer/bodypartformatterfactory.cpp
@@ -73,7 +73,7 @@ void BodyPartFormatterFactory::loadPlugins()
<< "is not valid!";
continue;
}
- const MimeTreeParser::Interface::BodyPartFormatter *bfp;
+ const MimeTreeParser::Interface::BodyPartFormatter *bfp = nullptr;
for (int i = 0; (bfp = plugin->bodyPartFormatter(i)); ++i) {
const char *type = plugin->type(i);
if (!type || !*type) {
@@ -92,7 +92,7 @@ void BodyPartFormatterFactory::loadPlugins()
qCDebug(MESSAGEVIEWER_LOG) << "plugin for " << type << subtype;
insert(type, subtype, bfp);
}
- const MimeTreeParser::Interface::BodyPartURLHandler *handler;
+ const MimeTreeParser::Interface::BodyPartURLHandler *handler = nullptr;
for (int i = 0; (handler = plugin->urlHandler(i)); ++i) {
URLHandlerManager::instance()->registerHandler(handler);
}
diff --git a/messageviewer/src/viewer/csshelperbase.h b/messageviewer/src/viewer/csshelperbase.h
index 9440974..1d0e276 100644
--- a/messageviewer/src/viewer/csshelperbase.h
+++ b/messageviewer/src/viewer/csshelperbase.h
@@ -130,7 +130,7 @@ private:
QString commonCssDefinitions() const;
private:
- const QPaintDevice *mPaintDevice;
+ const QPaintDevice *mPaintDevice = nullptr;
};
}
diff --git a/messageviewer/src/viewer/editorwatcher.h b/messageviewer/src/viewer/editorwatcher.h
index e8d4eae..7b7c41f 100644
--- a/messageviewer/src/viewer/editorwatcher.h
+++ b/messageviewer/src/viewer/editorwatcher.h
@@ -76,8 +76,8 @@ private:
QTimer mTimer;
QTime mEditTime;
- KProcess *mEditor;
- QWidget *mParentWidget;
+ KProcess *mEditor = nullptr;
+ QWidget *mParentWidget = nullptr;
int mInotifyFd;
int mInotifyWatch;
diff --git a/messageviewer/src/viewer/mimeparttree/mimeparttreeview.h b/messageviewer/src/viewer/mimeparttree/mimeparttreeview.h
index b4443dc..c2e62b3 100644
--- a/messageviewer/src/viewer/mimeparttree/mimeparttreeview.h
+++ b/messageviewer/src/viewer/mimeparttree/mimeparttreeview.h
@@ -43,7 +43,7 @@ private:
void slotMimePartDestroyed();
void saveMimePartTreeConfig();
void restoreMimePartTreeConfig();
- MimeTreeModel *mMimePartModel;
+ MimeTreeModel *mMimePartModel = nullptr;
};
}
diff --git a/messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp b/messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp
index 08e5589..386572e 100644
--- a/messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp
+++ b/messageviewer/src/viewer/mimeparttree/mimetreemodel.cpp
@@ -135,7 +135,7 @@ public:
}
QList<QTemporaryDir *> tempDirs;
- KMime::Content *root;
+ KMime::Content *root = nullptr;
QMimeDatabase m_mimeDb;
};
diff --git a/messageviewer/src/viewer/objecttreeviewersource.h b/messageviewer/src/viewer/objecttreeviewersource.h
index ea0bfa0..a2264fe 100644
--- a/messageviewer/src/viewer/objecttreeviewersource.h
+++ b/messageviewer/src/viewer/objecttreeviewersource.h
@@ -53,7 +53,7 @@ public:
MimeTreeParser::Interface::MessagePartPtr msgPart) override;
bool isPrinting() const override;
private:
- ViewerPrivate *mViewer;
+ ViewerPrivate *mViewer = nullptr;
};
}
diff --git a/messageviewer/src/viewer/urlhandlermanager.h b/messageviewer/src/viewer/urlhandlermanager.h
index 7122b06..6cf5331 100644
--- a/messageviewer/src/viewer/urlhandlermanager.h
+++ b/messageviewer/src/viewer/urlhandlermanager.h
@@ -84,7 +84,7 @@ private:
typedef QVector<const MimeTreeParser::URLHandler *> HandlerList;
HandlerList mHandlers;
class BodyPartURLHandlerManager;
- BodyPartURLHandlerManager *mBodyPartURLHandlerManager;
+ BodyPartURLHandlerManager *mBodyPartURLHandlerManager = nullptr;
};
}
diff --git a/messageviewer/src/viewer/viewer_p.h b/messageviewer/src/viewer/viewer_p.h
index 9c0c013..456a635 100644
--- a/messageviewer/src/viewer/viewer_p.h
+++ b/messageviewer/src/viewer/viewer_p.h
@@ -600,7 +600,7 @@ private:
void slotCheckedUrlFinished(const QUrl &url,
WebEngineViewer::CheckPhishingUrlUtil::UrlStatus status);
- MimeTreeParser::NodeHelper *mNodeHelper;
+ MimeTreeParser::NodeHelper *mNodeHelper = nullptr;
void slotDelayPrintPreview();
public:
bool mHtmlMailGlobalSetting;
@@ -609,16 +609,16 @@ public:
KMime::Message::Ptr mMessage; //the current message, if it was set manually
Akonadi::Item mMessageItem; //the message item from Akonadi
// widgets:
- QSplitter *mSplitter;
- QWidget *mBox;
- HtmlStatusBar *mColorBar;
+ QSplitter *mSplitter = nullptr;
+ QWidget *mBox = nullptr;
+ HtmlStatusBar *mColorBar = nullptr;
#ifndef QT_NO_TREEVIEW
- MimePartTreeView *mMimePartTree;
+ MimePartTreeView *mMimePartTree = nullptr;
#endif
- MailWebEngineView *mViewer;
- WebEngineViewer::FindBarWebEngineView *mFindBar;
+ MailWebEngineView *mViewer = nullptr;
+ WebEngineViewer::FindBarWebEngineView *mFindBar = nullptr;
- const MimeTreeParser::AttachmentStrategy *mAttachmentStrategy;
+ const MimeTreeParser::AttachmentStrategy *mAttachmentStrategy = nullptr;
QTimer mUpdateReaderWinTimer;
QTimer mResizeTimer;
QString mOverrideEncoding;
@@ -629,32 +629,32 @@ public:
/// the splash/busy page is displayed.
bool mMsgDisplay;
- CSSHelper *mCSSHelper;
+ CSSHelper *mCSSHelper = nullptr;
bool mUseFixedFont;
bool mPrinting;
- QWidget *mMainWindow;
- KActionCollection *mActionCollection;
- QAction *mCopyAction;
- QAction *mCopyURLAction;
- QAction *mUrlOpenAction;
- QAction *mSelectAllAction;
- QAction *mScrollUpAction;
- QAction *mScrollDownAction;
- QAction *mScrollUpMoreAction;
- QAction *mScrollDownMoreAction;
- QAction *mViewSourceAction;
- QAction *mSaveMessageAction;
- QAction *mFindInMessageAction;
- QAction *mSaveMessageDisplayFormat;
- QAction *mResetMessageDisplayFormat;
- KToggleAction *mDisableEmoticonAction;
- KToggleAction *mHeaderOnlyAttachmentsAction;
- KSelectAction *mSelectEncodingAction;
- KToggleAction *mToggleFixFontAction;
- KToggleAction *mToggleDisplayModeAction;
- KToggleAction *mToggleMimePartTreeAction;
- QAction *mSpeakTextAction;
- QAction *mCopyImageLocation;
+ QWidget *mMainWindow = nullptr;
+ KActionCollection *mActionCollection = nullptr;
+ QAction *mCopyAction = nullptr;
+ QAction *mCopyURLAction = nullptr;
+ QAction *mUrlOpenAction = nullptr;
+ QAction *mSelectAllAction = nullptr;
+ QAction *mScrollUpAction = nullptr;
+ QAction *mScrollDownAction = nullptr;
+ QAction *mScrollUpMoreAction = nullptr;
+ QAction *mScrollDownMoreAction = nullptr;
+ QAction *mViewSourceAction = nullptr;
+ QAction *mSaveMessageAction = nullptr;
+ QAction *mFindInMessageAction = nullptr;
+ QAction *mSaveMessageDisplayFormat = nullptr;
+ QAction *mResetMessageDisplayFormat = nullptr;
+ KToggleAction *mDisableEmoticonAction = nullptr;
+ KToggleAction *mHeaderOnlyAttachmentsAction = nullptr;
+ KSelectAction *mSelectEncodingAction = nullptr;
+ KToggleAction *mToggleFixFontAction = nullptr;
+ KToggleAction *mToggleDisplayModeAction = nullptr;
+ KToggleAction *mToggleMimePartTreeAction = nullptr;
+ QAction *mSpeakTextAction = nullptr;
+ QAction *mCopyImageLocation = nullptr;
QUrl mHoveredUrl;
QUrl mClickedUrl;
QUrl mImageUrl;
@@ -671,34 +671,34 @@ public:
bool mShowAttachmentQuicklist;
bool mForceEmoticons;
int mRecursionCountForDisplayMessage;
- KMime::Content *mCurrentContent;
- KMime::Content *mMessagePartNode;
+ KMime::Content *mCurrentContent = nullptr;
+ KMime::Content *mMessagePartNode = nullptr;
QString mMessagePath;
QColor mForegroundError;
QColor mBackgroundError;
Viewer *const q;
- Akonadi::Session *mSession;
+ Akonadi::Session *mSession = nullptr;
Akonadi::Monitor mMonitor;
QSet<AbstractMessageLoadedHandler *> mMessageLoadedHandlers;
Akonadi::Item::Id mPreviouslyViewedItem;
- MessageViewer::ScamDetectionWarningWidget *mScamDetectionWarning;
- MessageViewer::OpenAttachmentFolderWidget *mOpenAttachmentFolderWidget;
- MessageViewer::SubmittedFormWarningWidget *mSubmittedFormWarning;
- KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget;
+ MessageViewer::ScamDetectionWarningWidget *mScamDetectionWarning = nullptr;
+ MessageViewer::OpenAttachmentFolderWidget *mOpenAttachmentFolderWidget = nullptr;
+ MessageViewer::SubmittedFormWarningWidget *mSubmittedFormWarning = nullptr;
+ KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
Viewer::DisplayFormatMessage mDisplayFormatMessageOverwrite;
- KPIMTextEdit::SlideContainer *mSliderContainer;
- PimCommon::ShareServiceUrlManager *mShareServiceManager;
- KActionMenu *mShareServiceUrlMenu;
- MessageViewer::HeaderStylePlugin *mHeaderStylePlugin;
- MessageViewer::HeaderStyleMenuManager *mHeaderStyleMenuManager;
- MessageViewer::ViewerPluginToolManager *mViewerPluginToolManager;
- WebEngineViewer::ZoomActionMenu *mZoomActionMenu;
- QPrinter *mCurrentPrinter;
+ KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
+ PimCommon::ShareServiceUrlManager *mShareServiceManager = nullptr;
+ KActionMenu *mShareServiceUrlMenu = nullptr;
+ MessageViewer::HeaderStylePlugin *mHeaderStylePlugin = nullptr;
+ MessageViewer::HeaderStyleMenuManager *mHeaderStyleMenuManager = nullptr;
+ MessageViewer::ViewerPluginToolManager *mViewerPluginToolManager = nullptr;
+ WebEngineViewer::ZoomActionMenu *mZoomActionMenu = nullptr;
+ QPrinter *mCurrentPrinter = nullptr;
QList<QPointer<MessageViewer::MailSourceWebEngineViewer> > mListMailSourceViewer;
- WebEngineViewer::LocalDataBaseManager *mPhishingDatabase;
+ WebEngineViewer::LocalDataBaseManager *mPhishingDatabase = nullptr;
};
}
diff --git a/messageviewer/src/viewer/webengine/mailwebengineview.cpp b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
index 2b7172f..429bb79 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineview.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
@@ -67,25 +67,18 @@ class MessageViewer::MailWebEngineViewPrivate
{
public:
MailWebEngineViewPrivate()
- : mScamDetection(nullptr)
- , mWebViewAccessKey(nullptr)
- , mExternalReference(nullptr)
- , mPageEngine(nullptr)
- , mNetworkAccessManager(nullptr)
- , mViewer(nullptr)
- , mCanStartDrag(false)
{
}
QUrl mHoveredUrl;
QPoint mLastClickPosition;
- ScamDetectionWebEngine *mScamDetection;
- WebEngineViewer::WebEngineAccessKey *mWebViewAccessKey;
- MessageViewer::LoadExternalReferencesUrlInterceptor *mExternalReference;
- MailWebEnginePage *mPageEngine;
- WebEngineViewer::InterceptorManager *mNetworkAccessManager;
- MessageViewer::ViewerPrivate *mViewer;
- bool mCanStartDrag;
+ ScamDetectionWebEngine *mScamDetection = nullptr;
+ WebEngineViewer::WebEngineAccessKey *mWebViewAccessKey = nullptr;
+ MessageViewer::LoadExternalReferencesUrlInterceptor *mExternalReference = nullptr;
+ MailWebEnginePage *mPageEngine = nullptr;
+ WebEngineViewer::InterceptorManager *mNetworkAccessManager = nullptr;
+ MessageViewer::ViewerPrivate *mViewer = nullptr;
+ bool mCanStartDrag = false;
};
MailWebEngineView::MailWebEngineView(KActionCollection *ac, QWidget *parent)
diff --git a/messageviewer/src/viewer/webengine/tests/testjquerysupportmailwebengine.h b/messageviewer/src/viewer/webengine/tests/testjquerysupportmailwebengine.h
index 1d2639c..3d93788 100644
--- a/messageviewer/src/viewer/webengine/tests/testjquerysupportmailwebengine.h
+++ b/messageviewer/src/viewer/webengine/tests/testjquerysupportmailwebengine.h
@@ -39,8 +39,8 @@ private Q_SLOTS:
private:
KMime::Message::Ptr readAndParseMail(const QString &mailFile);
- MessageViewer::Viewer *viewer;
- QTextEdit *mEditor;
+ MessageViewer::Viewer *viewer = nullptr;
+ QTextEdit *mEditor = nullptr;
};
#endif
diff --git a/messageviewer/src/viewerplugins/viewerpluginmanager.cpp b/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
index 3e5073b..7c85c4e 100644
--- a/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
+++ b/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
@@ -35,16 +35,14 @@ class ViewerPluginInfo
{
public:
ViewerPluginInfo()
- : plugin(nullptr)
- , isEnabled(false)
{
}
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
- MessageViewer::ViewerPlugin *plugin;
- bool isEnabled;
+ MessageViewer::ViewerPlugin *plugin = nullptr;
+ bool isEnabled = false;
};
class MessageViewer::ViewerPluginManagerPrivate
diff --git a/messageviewer/src/viewerplugins/viewerplugintoolmanager.cpp b/messageviewer/src/viewerplugins/viewerplugintoolmanager.cpp
index 39fb264..30b2e55 100644
--- a/messageviewer/src/viewerplugins/viewerplugintoolmanager.cpp
+++ b/messageviewer/src/viewerplugins/viewerplugintoolmanager.cpp
@@ -47,9 +47,9 @@ public:
void updateActions(const Akonadi::Item &messageItem);
QList<QAction *> actionList(ViewerPluginInterface::SpecificFeatureTypes features) const;
QList<MessageViewer::ViewerPluginInterface *> mListInterface;
- KActionCollection *mActionCollection;
- QWidget *mParentWidget;
- ViewerPluginToolManager *q;
+ KActionCollection *mActionCollection = nullptr;
+ QWidget *mParentWidget = nullptr;
+ ViewerPluginToolManager *q = nullptr;
};
void ViewerPluginToolManagerPrivate::setServiceTypeName(const QString &serviceName)
diff --git a/messageviewer/src/widgets/configurewidget.cpp b/messageviewer/src/widgets/configurewidget.cpp
index ca40fa5..d58f8a4 100644
--- a/messageviewer/src/widgets/configurewidget.cpp
+++ b/messageviewer/src/widgets/configurewidget.cpp
@@ -34,7 +34,6 @@ class MessageViewer::ConfigureWidgetPrivate
{
public:
ConfigureWidgetPrivate()
- : mSettingsUi(nullptr)
{
}
@@ -44,7 +43,7 @@ public:
mSettingsUi = nullptr;
}
- Ui_Settings *mSettingsUi;
+ Ui_Settings *mSettingsUi = nullptr;
};
ConfigureWidget::ConfigureWidget(QWidget *parent)
diff --git a/messageviewer/src/widgets/invitationsettings.cpp b/messageviewer/src/widgets/invitationsettings.cpp
index 5f26852..dd7f121 100644
--- a/messageviewer/src/widgets/invitationsettings.cpp
+++ b/messageviewer/src/widgets/invitationsettings.cpp
@@ -50,7 +50,7 @@ public:
mInvitationUi = nullptr;
}
- Ui_InvitationSettings *mInvitationUi;
+ Ui_InvitationSettings *mInvitationUi = nullptr;
};
InvitationSettings::InvitationSettings(QWidget *parent)
diff --git a/messageviewer/src/widgets/printingsettings.cpp b/messageviewer/src/widgets/printingsettings.cpp
index 1827484..f1d6ba9 100644
--- a/messageviewer/src/widgets/printingsettings.cpp
+++ b/messageviewer/src/widgets/printingsettings.cpp
@@ -36,7 +36,7 @@ public:
delete mPrintingUi;
}
- Ui_PrintingSettings *mPrintingUi;
+ Ui_PrintingSettings *mPrintingUi = nullptr;
};
PrintingSettings::PrintingSettings(QWidget *parent)
diff --git a/messageviewer/src/widgets/vcardviewer.h b/messageviewer/src/widgets/vcardviewer.h
index 55cbc61..d66cc06 100644
--- a/messageviewer/src/widgets/vcardviewer.h
+++ b/messageviewer/src/widgets/vcardviewer.h
@@ -41,12 +41,12 @@ private:
void slotUser3();
void readConfig();
void writeConfig();
- KAddressBookGrantlee::GrantleeContactViewer *mContactViewer;
KContacts::Addressee::List mAddresseeList;
int mAddresseeListIndex;
- QPushButton *mUser2Button;
- QPushButton *mUser3Button;
+ KAddressBookGrantlee::GrantleeContactViewer *mContactViewer = nullptr;
+ QPushButton *mUser2Button = nullptr;
+ QPushButton *mUser3Button = nullptr;
};
}
diff --git a/mimetreeparser/autotests/setupenv.h b/mimetreeparser/autotests/setupenv.h
index 8c72f4a..aaba7a7 100644
--- a/mimetreeparser/autotests/setupenv.h
+++ b/mimetreeparser/autotests/setupenv.h
@@ -155,13 +155,13 @@ public:
return false;
}
private:
- MimeTreeParser::HtmlWriter *mWriter;
+ MimeTreeParser::HtmlWriter *mWriter = nullptr;
QString mAttachmentStrategy;
BodyPartFormatterBaseFactory mBodyPartFormatterBaseFactory;
MimeTreeParser::Util::HtmlMode mPreferredMode;
- bool mHtmlLoadExternal;
- bool mDecryptMessage;
- bool mShowSignatureDetails;
+ bool mHtmlLoadExternal = false;
+ bool mDecryptMessage = false;
+ bool mShowSignatureDetails = false;
};
}
diff --git a/mimetreeparser/src/htmlwriter/queuehtmlwriter.h b/mimetreeparser/src/htmlwriter/queuehtmlwriter.h
index 608ba01..c014b54 100644
--- a/mimetreeparser/src/htmlwriter/queuehtmlwriter.h
+++ b/mimetreeparser/src/htmlwriter/queuehtmlwriter.h
@@ -67,7 +67,7 @@ public:
void replay();
private:
- HtmlWriter *mBase;
+ HtmlWriter *mBase = nullptr;
QVector<Command> mQueue;
};
diff --git a/mimetreeparser/src/interfaces/bodypartformatter.cpp b/mimetreeparser/src/interfaces/bodypartformatter.cpp
index 54fe096..2e64082 100644
--- a/mimetreeparser/src/interfaces/bodypartformatter.cpp
+++ b/mimetreeparser/src/interfaces/bodypartformatter.cpp
@@ -69,9 +69,9 @@ public:
return mHtmlWriter;
}
- MimeTreeParser::HtmlWriter *mHtmlWriter;
- const BodyPart *mPart;
- MessagePart *mParentPart;
+ MimeTreeParser::HtmlWriter *mHtmlWriter = nullptr;
+ const BodyPart *mPart = nullptr;
+ MessagePart *mParentPart = nullptr;
bool mCreatedWriter;
};
diff --git a/mimetreeparser/src/job/qgpgmejobexecutor.h b/mimetreeparser/src/job/qgpgmejobexecutor.h
index 8a81b07..dcebacf 100644
--- a/mimetreeparser/src/job/qgpgmejobexecutor.h
+++ b/mimetreeparser/src/job/qgpgmejobexecutor.h
@@ -72,7 +72,7 @@ private Q_SLOTS:
void importResult(const GpgME::ImportResult &result);
private:
- QEventLoop *mEventLoop;
+ QEventLoop *mEventLoop = nullptr;
GpgME::VerificationResult mVerificationResult;
GpgME::DecryptionResult mDecryptResult;
GpgME::ImportResult mImportResult;
diff --git a/mimetreeparser/src/viewer/messagepart.h b/mimetreeparser/src/viewer/messagepart.h
index 41608d4..99dc857 100644
--- a/mimetreeparser/src/viewer/messagepart.h
+++ b/mimetreeparser/src/viewer/messagepart.h
@@ -113,13 +113,13 @@ protected:
QString renderInternalText() const;
QString mText;
- ObjectTreeParser *mOtp;
+ ObjectTreeParser *mOtp = nullptr;
PartMetaData mMetaData;
private:
QVector<Interface::MessagePart::Ptr> mBlocks;
- KMime::Content *mAttachmentNode;
+ KMime::Content *mAttachmentNode = nullptr;
bool mRoot;
};
@@ -183,7 +183,7 @@ public:
bool showTextFrame() const;
protected:
- KMime::Content *mNode;
+ KMime::Content *mNode = nullptr;
private:
void parseContent();
@@ -366,7 +366,7 @@ protected:
bool mNoSecKey;
const QGpgME::Protocol *mCryptoProto;
QString mFromAddress;
- KMime::Content *mNode;
+ KMime::Content *mNode = nullptr;
bool mDecryptMessage;
QByteArray mVerifiedText;
std::vector<GpgME::DecryptionResult::Recipient> mDecryptRecipients;
@@ -415,7 +415,7 @@ private:
protected:
const QGpgME::Protocol *mCryptoProto;
QString mFromAddress;
- KMime::Content *mNode;
+ KMime::Content *mNode = nullptr;
QByteArray mVerifiedText;
friend EncryptedMessagePart;
diff --git a/mimetreeparser/src/viewer/nodehelper.h b/mimetreeparser/src/viewer/nodehelper.h
index 80c7dae..4a1c012 100644
--- a/mimetreeparser/src/viewer/nodehelper.h
+++ b/mimetreeparser/src/viewer/nodehelper.h
@@ -277,12 +277,12 @@ private:
QMap<const KMime::Content *, KMMsgSignatureState> mSignatureState;
QSet<KMime::Content *> mDisplayEmbeddedNodes;
QSet<KMime::Content *> mDisplayHiddenNodes;
- QTextCodec *mLocalCodec;
+ QTextCodec *mLocalCodec = nullptr;
QMap<KMime::Content *, const QTextCodec *> mOverrideCodecs;
QMap<QString, QMap<QByteArray, Interface::BodyPartMemento *> > mBodyPartMementoMap;
QMap<KMime::Content *, PartMetaData> mPartMetaDatas;
QMap<KMime::Message::Content *, QList<KMime::Content *> > mExtraContents;
- AttachmentTemporaryFilesDirs *mAttachmentFilesDir;
+ AttachmentTemporaryFilesDirs *mAttachmentFilesDir = nullptr;
friend class NodeHelperTest;
};
diff --git a/mimetreeparser/src/viewer/partnodebodypart.h b/mimetreeparser/src/viewer/partnodebodypart.h
index 84bd6c9..b5cdfb2 100644
--- a/mimetreeparser/src/viewer/partnodebodypart.h
+++ b/mimetreeparser/src/viewer/partnodebodypart.h
@@ -96,12 +96,12 @@ public:
Interface::ObjectTreeSource *source() const override;
private:
- KMime::Content *mTopLevelContent;
- KMime::Content *mContent;
+ KMime::Content *mTopLevelContent = nullptr;
+ KMime::Content *mContent = nullptr;
BodyPart::Display mDefaultDisplay;
- NodeHelper *mNodeHelper;
- ObjectTreeParser *mObjectTreeParser;
- ProcessResult *mProcessResult;
+ NodeHelper *mNodeHelper = nullptr;
+ ObjectTreeParser *mObjectTreeParser = nullptr;
+ ProcessResult *mProcessResult = nullptr;
};
}
diff --git a/templateparser/src/customtemplates.h b/templateparser/src/customtemplates.h
index 09e79b9..4e25bc6 100644
--- a/templateparser/src/customtemplates.h
+++ b/templateparser/src/customtemplates.h
@@ -87,7 +87,7 @@ private:
/// templates, which changes the UI without user action
bool mBlockChangeSignal;
- Ui_CustomTemplatesBase *mUi;
+ Ui_CustomTemplatesBase *mUi = nullptr;
};
class CustomTemplateItem : public QTreeWidgetItem
diff --git a/templateparser/src/customtemplatesmenu.cpp b/templateparser/src/customtemplatesmenu.cpp
index a93cce0..b94b49a 100644
--- a/templateparser/src/customtemplatesmenu.cpp
+++ b/templateparser/src/customtemplatesmenu.cpp
@@ -54,20 +54,20 @@ public:
delete mCustomReplyAllMapper;
delete mCustomForwardMapper;
}
- KActionCollection *mOwnerActionCollection;
+ KActionCollection *mOwnerActionCollection = nullptr;
QStringList mCustomTemplates;
QList<QAction *> mCustomTemplateActions;
// Custom template actions menu
- KActionMenu *mCustomReplyActionMenu;
- KActionMenu *mCustomReplyAllActionMenu;
- KActionMenu *mCustomForwardActionMenu;
+ KActionMenu *mCustomReplyActionMenu = nullptr;
+ KActionMenu *mCustomReplyAllActionMenu = nullptr;
+ KActionMenu *mCustomForwardActionMenu = nullptr;
// Signal mappers for custom template actions
- QSignalMapper *mCustomReplyMapper;
- QSignalMapper *mCustomReplyAllMapper;
- QSignalMapper *mCustomForwardMapper;
+ QSignalMapper *mCustomReplyMapper = nullptr;
+ QSignalMapper *mCustomReplyAllMapper = nullptr;
+ QSignalMapper *mCustomForwardMapper = nullptr;
};
CustomTemplatesMenu::CustomTemplatesMenu(QWidget *owner, KActionCollection *ac)
diff --git a/templateparser/src/templateparserjob.cpp b/templateparser/src/templateparserjob.cpp
index 76bf593..57e06b8 100644
--- a/templateparser/src/templateparserjob.cpp
+++ b/templateparser/src/templateparserjob.cpp
@@ -58,7 +58,7 @@ static QTextCodec *selectCharset(const QStringList &charsets, const QString &tex
// We use KCharsets::codecForName() instead of QTextCodec::codecForName() here, because
// the former knows us-ascii is latin1.
bool ok = true;
- QTextCodec *codec;
+ QTextCodec *codec = nullptr;
if (name == QLatin1String("locale")) {
codec = QTextCodec::codecForLocale();
} else {
diff --git a/templateparser/src/templatesconfiguration.cpp b/templateparser/src/templatesconfiguration.cpp
index dbb18a4..7880d36 100644
--- a/templateparser/src/templatesconfiguration.cpp
+++ b/templateparser/src/templatesconfiguration.cpp
@@ -356,7 +356,7 @@ void TemplatesConfiguration::saveToFolder(const QString &id)
QPlainTextEdit *TemplatesConfiguration::currentTextEdit() const
{
- QPlainTextEdit *edit;
+ QPlainTextEdit *edit = nullptr;
const int toolboxCurrentIndex(toolBox1->currentIndex());
if (toolBox1->widget(toolboxCurrentIndex) == page_new) {
diff --git a/templateparser/src/templatesinsertcommand.cpp b/templateparser/src/templatesinsertcommand.cpp
index 0aa873f..d83d225 100644
--- a/templateparser/src/templatesinsertcommand.cpp
+++ b/templateparser/src/templatesinsertcommand.cpp
@@ -416,7 +416,7 @@ TemplatesInsertCommand::TemplatesInsertCommand(QWidget *parent, const QString &n
setObjectName(name);
setText(i18n("&Insert Command"));
- KActionMenu *menu;
+ KActionMenu *menu = nullptr;
QMap< QString, Command > commandMap;
QSignalMapper *mapper = new QSignalMapper(this);
diff --git a/webengineviewer/src/checkphishingurl/backoffmodemanager.cpp b/webengineviewer/src/checkphishingurl/backoffmodemanager.cpp
index 25cc77f..ce0b2d1 100644
--- a/webengineviewer/src/checkphishingurl/backoffmodemanager.cpp
+++ b/webengineviewer/src/checkphishingurl/backoffmodemanager.cpp
@@ -53,7 +53,7 @@ public:
int mNumberOfHttpFailed;
bool isInOffMode;
- QTimer *mTimer;
+ QTimer *mTimer = nullptr;
BackOffModeManager *q;
};
diff --git a/webengineviewer/src/checkphishingurl/checkphishingurljob.cpp b/webengineviewer/src/checkphishingurl/checkphishingurljob.cpp
index 68194e5..9e721ce 100644
--- a/webengineviewer/src/checkphishingurl/checkphishingurljob.cpp
+++ b/webengineviewer/src/checkphishingurl/checkphishingurljob.cpp
@@ -38,7 +38,7 @@ public:
}
QUrl mUrl;
- QNetworkAccessManager *mNetworkAccessManager;
+ QNetworkAccessManager *mNetworkAccessManager = nullptr;
};
CheckPhishingUrlJob::CheckPhishingUrlJob(QObject *parent)
diff --git a/webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp b/webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp
index f3ed2d4..dadfdbe 100644
--- a/webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp
+++ b/webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp
@@ -47,7 +47,7 @@ public:
QString mDataBaseState;
CreatePhishingUrlDataBaseJob::ContraintsCompressionType mContraintsCompressionType;
CreatePhishingUrlDataBaseJob::DataBaseDownloadType mDataBaseDownloadNeeded;
- QNetworkAccessManager *mNetworkAccessManager;
+ QNetworkAccessManager *mNetworkAccessManager = nullptr;
};
CreatePhishingUrlDataBaseJob::CreatePhishingUrlDataBaseJob(QObject *parent)
diff --git a/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp b/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
index 8510396..0b11e0b 100644
--- a/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
+++ b/webengineviewer/src/checkphishingurl/searchfullhashjob.cpp
@@ -43,7 +43,7 @@ public:
QHash<QByteArray, QByteArray> mHashs;
QUrl mUrl;
QStringList mDatabaseHashes;
- QNetworkAccessManager *mNetworkAccessManager;
+ QNetworkAccessManager *mNetworkAccessManager = nullptr;
};
SearchFullHashJob::SearchFullHashJob(QObject *parent)
diff --git a/webengineviewer/src/checkphishingurl/tests/webengineviewwithsafebrowsingsupport.h b/webengineviewer/src/checkphishingurl/tests/webengineviewwithsafebrowsingsupport.h
index 0c2c215..f2bf336 100644
--- a/webengineviewer/src/checkphishingurl/tests/webengineviewwithsafebrowsingsupport.h
+++ b/webengineviewer/src/checkphishingurl/tests/webengineviewwithsafebrowsingsupport.h
@@ -40,8 +40,8 @@ private Q_SLOTS:
void slotCheckedUrlFinished(const QUrl &url, WebEngineViewer::CheckPhishingUrlUtil::UrlStatus status);
private:
- QPlainTextEdit *mDebug;
- WebEngineViewer::WebEngineView *pageView;
+ QPlainTextEdit *mDebug = nullptr;
+ WebEngineViewer::WebEngineView *pageView = nullptr;
};
#endif // CHECKPHISHINGURLGUI_H
diff --git a/webengineviewer/src/findbar/findbarwebengineview.cpp b/webengineviewer/src/findbar/findbarwebengineview.cpp
index 509c788..e258040 100644
--- a/webengineviewer/src/findbar/findbarwebengineview.cpp
+++ b/webengineviewer/src/findbar/findbarwebengineview.cpp
@@ -27,11 +27,10 @@ class WebEngineViewer::FindBarWebEngineViewPrivate
{
public:
FindBarWebEngineViewPrivate()
- : mView(nullptr)
{
}
- QWebEngineView *mView;
+ QWebEngineView *mView = nullptr;
};
FindBarWebEngineView::FindBarWebEngineView(QWebEngineView *view, QWidget *parent)
diff --git a/webengineviewer/src/networkmanager/interceptormanager.cpp b/webengineviewer/src/networkmanager/interceptormanager.cpp
index c3498e2..55d14d3 100644
--- a/webengineviewer/src/networkmanager/interceptormanager.cpp
+++ b/webengineviewer/src/networkmanager/interceptormanager.cpp
@@ -34,8 +34,8 @@ public:
{
}
- WebEngineViewer::NetworkUrlInterceptorManager *mManager;
- WebEngineViewer::NetworkUrlInterceptor *mNetworkUrlInterceptor;
+ WebEngineViewer::NetworkUrlInterceptorManager *mManager = nullptr;
+ WebEngineViewer::NetworkUrlInterceptor *mNetworkUrlInterceptor = nullptr;
};
InterceptorManager::InterceptorManager(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent)
diff --git a/webengineviewer/src/tests/testdndwebengine.h b/webengineviewer/src/tests/testdndwebengine.h
index f77e523..399ffe0 100644
--- a/webengineviewer/src/tests/testdndwebengine.h
+++ b/webengineviewer/src/tests/testdndwebengine.h
@@ -47,8 +47,8 @@ public:
explicit TestDndWebEngine(QWidget *parent = nullptr);
~TestDndWebEngine();
private:
- WebEngineViewer::WebEngineView *pageView;
- WebEngineViewBase *webEngineView;
+ WebEngineViewer::WebEngineView *pageView = nullptr;
+ WebEngineViewBase *webEngineView = nullptr;
};
#endif // TestDndWebEngine_H
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
index f0a6c9a..3d78383 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
@@ -42,7 +42,7 @@ public:
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
- WebEngineViewer::NetworkPluginUrlInterceptor *plugin;
+ WebEngineViewer::NetworkPluginUrlInterceptor *plugin = nullptr;
bool isEnabled;
};
diff --git a/webengineviewer/src/webengineaccesskey/autotests/webengineaccesskeyanchorfromhtmltest.h b/webengineviewer/src/webengineaccesskey/autotests/webengineaccesskeyanchorfromhtmltest.h
index c6fd436..fc185e9 100644
--- a/webengineviewer/src/webengineaccesskey/autotests/webengineaccesskeyanchorfromhtmltest.h
+++ b/webengineviewer/src/webengineaccesskey/autotests/webengineaccesskeyanchorfromhtmltest.h
@@ -40,7 +40,7 @@ Q_SIGNALS:
void accessKeySearchFinished(const QVector<WebEngineViewer::WebEngineAccessKeyAnchor> &var);
private:
- QWebEngineView *mEngineView;
+ QWebEngineView *mEngineView = nullptr;
};
class WebEngineAccessKeyAnchorFromHtmlTest : public QObject