summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 06:34:54 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 06:34:54 (GMT)
commitb7b1ffd6f24f3d632aba3512c1ad81cc1887f4d9 (patch)
tree277ffde406fa6cd53e9a2803cdc2f2c8ffd91c8c
parent82277b9c7d284367c76ae1013161869529ab03c0 (diff)
Fix some clazy warning
-rw-r--r--messagecomposer/src/followupreminder/followupremindercreatejob.cpp2
-rw-r--r--messagecomposer/src/helper/messagefactory.cpp7
-rw-r--r--messagecore/autotests/attachmentpropertiesdialogtest.cpp6
-rw-r--r--messagecore/autotests/attachmentpropertiesdialogtest.h2
-rw-r--r--messagelist/src/core/delegate.h1
-rw-r--r--messagelist/src/core/widgets/quicksearchline.h2
-rw-r--r--messageviewer/src/messagepartthemes/default/defaultrenderer.cpp6
-rw-r--r--mimetreeparser/src/viewer/messagepart.cpp2
-rw-r--r--webengineviewer/src/webenginescript.cpp10
9 files changed, 21 insertions, 17 deletions
diff --git a/messagecomposer/src/followupreminder/followupremindercreatejob.cpp b/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
index 225557b..098b076 100644
--- a/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
+++ b/messagecomposer/src/followupreminder/followupremindercreatejob.cpp
@@ -89,7 +89,7 @@ void FollowupReminderCreateJob::start()
if (d->mInfo->isValid()) {
if (d->mCollection.isValid()) {
KCalCore::Todo::Ptr todo(new KCalCore::Todo);
- todo->setSummary(i18n("Wait answer from \"%1\" send to \"%2\"").arg(d->mInfo->subject()).arg(d->mInfo->to()));
+ todo->setSummary(i18n("Wait answer from \"%1\" send to \"%2\"").arg(d->mInfo->subject(), d->mInfo->to()));
Akonadi::Item newTodoItem;
newTodoItem.setMimeType(KCalCore::Todo::todoMimeType());
newTodoItem.setPayload<KCalCore::Todo::Ptr>(todo);
diff --git a/messagecomposer/src/helper/messagefactory.cpp b/messagecomposer/src/helper/messagefactory.cpp
index ad2bbaa..39175c6 100644
--- a/messagecomposer/src/helper/messagefactory.cpp
+++ b/messagecomposer/src/helper/messagefactory.cpp
@@ -534,14 +534,11 @@ KMime::Message::Ptr MessageFactory::createRedirect(const QString &toStr, const Q
// X-KMail-Redirect-From: content
const QString strByWayOf = QString::fromLocal8Bit("%1 (by way of %2 <%3>)")
- .arg(m_origMsg->from()->asUnicodeString())
- .arg(ident.fullName())
- .arg(ident.primaryEmailAddress());
+ .arg(m_origMsg->from()->asUnicodeString(), ident.fullName(), ident.primaryEmailAddress());
// Resent-From: content
const QString strFrom = QString::fromLocal8Bit("%1 <%2>")
- .arg(ident.fullName())
- .arg(ident.primaryEmailAddress());
+ .arg(ident.fullName(), ident.primaryEmailAddress());
// format the current date to be used in Resent-Date:
// FIXME: generate datetime the same way as KMime, otherwise we get inconsistency
diff --git a/messagecore/autotests/attachmentpropertiesdialogtest.cpp b/messagecore/autotests/attachmentpropertiesdialogtest.cpp
index 78c97d6..14be92d 100644
--- a/messagecore/autotests/attachmentpropertiesdialogtest.cpp
+++ b/messagecore/autotests/attachmentpropertiesdialogtest.cpp
@@ -36,6 +36,12 @@ using namespace MessageCore;
QTEST_MAIN(AttachmentPropertiesDialogTest)
+AttachmentPropertiesDialogTest::AttachmentPropertiesDialogTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
void AttachmentPropertiesDialogTest::testAttachmentPartReadWrite()
{
// Sample data.
diff --git a/messagecore/autotests/attachmentpropertiesdialogtest.h b/messagecore/autotests/attachmentpropertiesdialogtest.h
index 8949eec..a5c278c 100644
--- a/messagecore/autotests/attachmentpropertiesdialogtest.h
+++ b/messagecore/autotests/attachmentpropertiesdialogtest.h
@@ -25,6 +25,8 @@
class AttachmentPropertiesDialogTest : public QObject
{
Q_OBJECT
+public:
+ explicit AttachmentPropertiesDialogTest(QObject *parent = Q_NULLPTR);
private Q_SLOTS:
void testAttachmentPartReadWrite();
void testAttachmentPartReadOnly();
diff --git a/messagelist/src/core/delegate.h b/messagelist/src/core/delegate.h
index 7ad68fc..5470306 100644
--- a/messagelist/src/core/delegate.h
+++ b/messagelist/src/core/delegate.h
@@ -33,6 +33,7 @@ class View;
class Delegate : public ThemeDelegate
{
+ Q_OBJECT
public:
explicit Delegate(View *pParent);
~Delegate();
diff --git a/messagelist/src/core/widgets/quicksearchline.h b/messagelist/src/core/widgets/quicksearchline.h
index 8d23ebb..996d5f8 100644
--- a/messagelist/src/core/widgets/quicksearchline.h
+++ b/messagelist/src/core/widgets/quicksearchline.h
@@ -48,7 +48,7 @@ public:
SearchAgainstTo = 32
};
- Q_ENUMS(SearchOption)
+ Q_ENUM(SearchOption)
Q_DECLARE_FLAGS(SearchOptions, SearchOption)
SearchOptions searchOptions() const;
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
index cdaaaa1..26096d6 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
@@ -418,9 +418,8 @@ public:
class MimeTreeParser::DefaultRendererPrivate
{
public:
- DefaultRendererPrivate(DefaultRenderer *qPtr, const Interface::MessagePart::Ptr &msgPart, CSSHelperBase *cssHelper)
+ DefaultRendererPrivate(const Interface::MessagePart::Ptr &msgPart, CSSHelperBase *cssHelper)
: mMsgPart(msgPart)
- , q(qPtr)
, mOldWriter(msgPart->htmlWriter())
, mCSSHelper(cssHelper)
{
@@ -1389,14 +1388,13 @@ public:
QString mHtml;
Interface::MessagePart::Ptr mMsgPart;
private:
- DefaultRenderer *q;
HtmlWriter *mOldWriter;
CSSHelperBase *mCSSHelper;
};
DefaultRenderer::DefaultRenderer(const MimeTreeParser::Interface::MessagePart::Ptr &msgPart, CSSHelperBase *cssHelper)
- : d(new MimeTreeParser::DefaultRendererPrivate(this, msgPart, cssHelper))
+ : d(new MimeTreeParser::DefaultRendererPrivate(msgPart, cssHelper))
{
}
diff --git a/mimetreeparser/src/viewer/messagepart.cpp b/mimetreeparser/src/viewer/messagepart.cpp
index b6b07af..3e858ad 100644
--- a/mimetreeparser/src/viewer/messagepart.cpp
+++ b/mimetreeparser/src/viewer/messagepart.cpp
@@ -603,7 +603,7 @@ AlternativeMessagePart::AlternativeMessagePart(ObjectTreeParser *otp, KMime::Con
return;
}
- foreach (const auto name, mChildNodes.keys()) {
+ foreach (const auto &name, mChildNodes.keys()) {
mChildParts[name] = MimeMessagePart::Ptr(new MimeMessagePart(mOtp, mChildNodes[name], true));
}
}
diff --git a/webengineviewer/src/webenginescript.cpp b/webengineviewer/src/webenginescript.cpp
index 1d00de0..fa74045 100644
--- a/webengineviewer/src/webenginescript.cpp
+++ b/webengineviewer/src/webenginescript.cpp
@@ -23,7 +23,7 @@ using namespace WebEngineViewer;
QString WebEngineScript::findAllImages()
{
- const QString source = QLatin1String("(function() {"
+ const QString source = QStringLiteral("(function() {"
"var out = [];"
"var imgs = document.getElementsByTagName('img');"
"for (var i = 0; i < imgs.length; ++i) {"
@@ -40,7 +40,7 @@ QString WebEngineScript::findAllImages()
QString WebEngineScript::findAllScripts()
{
- const QString source = QLatin1String("(function() {"
+ const QString source = QStringLiteral("(function() {"
"var out = [];"
"var scripts = document.getElementsByTagName('script');"
"for (var i = 0; i < scripts.length; ++i) {"
@@ -57,7 +57,7 @@ QString WebEngineScript::findAllScripts()
QString WebEngineScript::findAllAnchors()
{
- const QString source = QLatin1String("(function() {"
+ const QString source = QStringLiteral("(function() {"
"var out = [];"
"var anchors = document.getElementsByTagName('a');"
"for (var i = 0; i < anchors.length; ++i) {"
@@ -76,7 +76,7 @@ QString WebEngineScript::findAllAnchors()
QString WebEngineScript::findAllAnchorsAndForms()
{
- const QString source = QLatin1String("(function() {"
+ const QString source = QStringLiteral("(function() {"
"var res = [];"
"var out = [];"
"var anchors = document.getElementsByTagName('a');"
@@ -166,7 +166,7 @@ QString WebEngineScript::setStyleToElement(const QString &elementStr, const QStr
const QString source = QString::fromLatin1("var element = document.getElementById('%1'); "
"if (element) { "
" element.style = '%2';"
- "}").arg(elementStr).arg(style);
+ "}").arg(elementStr, style);
return source;
}