summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-22 06:36:31 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-22 06:36:31 (GMT)
commit0d3880497a77d6c2bf5fc43e07cd1a05c7149b9a (patch)
treee7724ba35b09b0334b57506fc95d14bb37e86886
parent911391a27fe6330a4bd512fe07080b707ef50015 (diff)
Astyle kdelibs
-rw-r--r--messagecomposer/autotests/messagefactorytest.cpp1
-rw-r--r--messagecomposer/autotests/recipientseditortest.cpp15
-rw-r--r--messagecomposer/src/composer/composerviewbase.cpp1
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h1
-rw-r--r--messagecomposer/src/recipient/recipientseditor.cpp8
-rw-r--r--messagecore/src/attachment/attachmentpropertiesdialog.cpp2
-rw-r--r--messageviewer/autotests/viewertest.cpp2
-rw-r--r--messageviewer/src/header/grantleeheaderformatter.cpp1
-rw-r--r--messageviewer/src/messagepartthemes/default/autotests/setupenv.h6
-rw-r--r--messageviewer/src/messagepartthemes/default/defaultrenderer.cpp4
-rw-r--r--messageviewer/src/viewer/objecttreeviewersource.cpp18
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp22
-rw-r--r--messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp18
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineview.cpp1
-rw-r--r--messageviewer/src/widgets/htmlstatusbar.cpp2
-rw-r--r--messageviewer/src/widgets/mailsourcewebengineviewer.cpp1
-rw-r--r--mimetreeparser/autotests/setupenv.h6
-rw-r--r--mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp4
-rw-r--r--mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp8
-rw-r--r--mimetreeparser/src/bodyformatter/multipartalternative.cpp2
-rw-r--r--mimetreeparser/src/bodyformatter/multipartencrypted.cpp4
-rw-r--r--mimetreeparser/src/interfaces/bodypartformatter.cpp1
-rw-r--r--mimetreeparser/src/viewer/messagepart.cpp20
-rw-r--r--mimetreeparser/src/viewer/messagepart.h14
-rw-r--r--mimetreeparser/src/viewer/objecttreeparser.h4
-rw-r--r--webengineviewer/src/print/printpreviewpagewidget.cpp62
-rw-r--r--webengineviewer/src/tests/testdndwebengine.h3
-rw-r--r--webengineviewer/src/webenginemanagescript.cpp2
-rw-r--r--webengineviewer/src/webenginepage.cpp1
-rw-r--r--webengineviewer/src/webengineview.cpp3
30 files changed, 114 insertions, 123 deletions
diff --git a/messagecomposer/autotests/messagefactorytest.cpp b/messagecomposer/autotests/messagefactorytest.cpp
index 45fef85..4fe05ff 100644
--- a/messagecomposer/autotests/messagefactorytest.cpp
+++ b/messagecomposer/autotests/messagefactorytest.cpp
@@ -63,7 +63,6 @@ void initLocale()
Q_CONSTRUCTOR_FUNCTION(initLocale)
#endif
-
namespace
{
template <typename String>
diff --git a/messagecomposer/autotests/recipientseditortest.cpp b/messagecomposer/autotests/recipientseditortest.cpp
index 403f083..5f09ac3 100644
--- a/messagecomposer/autotests/recipientseditortest.cpp
+++ b/messagecomposer/autotests/recipientseditortest.cpp
@@ -37,9 +37,8 @@ public:
{
}
- KPIM::MultiplyingLine *newLine(QWidget *parent) Q_DECL_OVERRIDE
- {
- auto line = qobject_cast<MessageComposer::RecipientLineNG*>(
+ KPIM::MultiplyingLine *newLine(QWidget *parent) Q_DECL_OVERRIDE {
+ auto line = qobject_cast<MessageComposer::RecipientLineNG *>(
MessageComposer::RecipientLineFactory::newLine(parent));
line->setEnableAkonadiSearch(false);
line->setEnableIndexSearch(false);
@@ -47,8 +46,6 @@ public:
}
};
-
-
class RecipientsEditorTest : public QObject
{
Q_OBJECT
@@ -59,7 +56,6 @@ private Q_SLOTS:
void test_splitPastedListToLines();
};
-
void RecipientsEditorTest::test_addLineOnCommaPress()
{
MessageComposer::RecipientsEditor editor(new RecipientsLineTestFactory());
@@ -68,7 +64,7 @@ void RecipientsEditorTest::test_addLineOnCommaPress()
QCOMPARE(editor.recipients().size(), 0);
- auto lineEdit = editor.lines().first()->findChild<MessageComposer::RecipientLineEdit*>();
+ auto lineEdit = editor.lines().first()->findChild<MessageComposer::RecipientLineEdit *>();
lineEdit->setFocus();
// Simulate typing email address
@@ -79,7 +75,7 @@ void RecipientsEditorTest::test_addLineOnCommaPress()
QTest::keyClick(lineEdit, Qt::Key_Comma, Qt::NoModifier, 0);
- lineEdit = editor.lines().at(1)->findChild<MessageComposer::RecipientLineEdit*>();
+ lineEdit = editor.lines().at(1)->findChild<MessageComposer::RecipientLineEdit *>();
QVERIFY(lineEdit->hasFocus());
QTest::keyClicks(lineEdit, QStringLiteral("test@example.test"), Qt::NoModifier, 10);
@@ -113,8 +109,7 @@ void RecipientsEditorTest::test_splitPastedListToLines()
clipboard->setText(QStringLiteral("test@example.com, \"Vrátil, Daniel\" <dvratil@kde.org>"));
-
- auto lineEdit = editor.lines().at(0)->findChild<MessageComposer::RecipientLineEdit*>();
+ auto lineEdit = editor.lines().at(0)->findChild<MessageComposer::RecipientLineEdit *>();
// paste() is protected in KPIM::AddresseeLineEdit
QMetaObject::invokeMethod(lineEdit, "paste");
diff --git a/messagecomposer/src/composer/composerviewbase.cpp b/messagecomposer/src/composer/composerviewbase.cpp
index 338fdb7..9b8f7e8 100644
--- a/messagecomposer/src/composer/composerviewbase.cpp
+++ b/messagecomposer/src/composer/composerviewbase.cpp
@@ -608,7 +608,6 @@ QList< MessageComposer::Composer * > MessageComposer::ComposerViewBase::generate
encryptChainCertNearExpiryWarningThresholdInDays(),
signingChainCertNearExpiryWarningThresholdInDays());
-
QStringList encryptToSelfKeys;
QStringList signKeys;
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
index c6fd481..925100e 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
@@ -49,7 +49,6 @@ public:
void setIdentityManagement(KIdentityManagement::IdentityManager *identityManagement);
KIdentityManagement::IdentityManager *identityManagement() const;
-
void setParameters(const MessageComposer::PluginEditorCheckBeforeSendParams &params);
MessageComposer::PluginEditorCheckBeforeSendParams parameters() const;
diff --git a/messagecomposer/src/recipient/recipientseditor.cpp b/messagecomposer/src/recipient/recipientseditor.cpp
index 7b769e6..bd87e77 100644
--- a/messagecomposer/src/recipient/recipientseditor.cpp
+++ b/messagecomposer/src/recipient/recipientseditor.cpp
@@ -304,14 +304,14 @@ void RecipientsEditor::slotLineDeleted(int pos)
bool RecipientsEditor::eventFilter(QObject *object, QEvent *event)
{
- if (event->type() == QEvent::KeyPress && qobject_cast<RecipientLineEdit*>(object)) {
- auto ke = static_cast<QKeyEvent*>(event);
+ if (event->type() == QEvent::KeyPress && qobject_cast<RecipientLineEdit *>(object)) {
+ auto ke = static_cast<QKeyEvent *>(event);
// Treats comma or semicolon as email separator, will automatically move focus
// to a new line, basically preventing user from inputting more than one
// email address per line, which breaks our opportunistic crypto in composer
if (ke->key() == Qt::Key_Comma || (
- ke->key() == Qt::Key_Semicolon && MessageComposerSettings::self()->allowSemicolonAsAddressSeparator())) {
- auto line = qobject_cast<RecipientLineNG*>(object->parent());
+ ke->key() == Qt::Key_Semicolon && MessageComposerSettings::self()->allowSemicolonAsAddressSeparator())) {
+ auto line = qobject_cast<RecipientLineNG *>(object->parent());
const auto split = KEmailAddress::splitAddressList(line->rawData() + QLatin1String(", "));
if (split.size() > 1) {
addRecipient(QString(), line->recipientType());
diff --git a/messagecore/src/attachment/attachmentpropertiesdialog.cpp b/messagecore/src/attachment/attachmentpropertiesdialog.cpp
index 239d4e6..c9fba32 100644
--- a/messagecore/src/attachment/attachmentpropertiesdialog.cpp
+++ b/messagecore/src/attachment/attachmentpropertiesdialog.cpp
@@ -396,7 +396,7 @@ void AttachmentPropertiesDialog::accept()
void AttachmentPropertiesDialog::slotHelp()
{
- PimCommon::Util::invokeHelp(QStringLiteral("kmail/the-composer-window.html"),QStringLiteral("attachments"));
+ PimCommon::Util::invokeHelp(QStringLiteral("kmail/the-composer-window.html"), QStringLiteral("attachments"));
}
#include "moc_attachmentpropertiesdialog.cpp"
diff --git a/messageviewer/autotests/viewertest.cpp b/messageviewer/autotests/viewertest.cpp
index 597fbea..f7ccd9e 100644
--- a/messageviewer/autotests/viewertest.cpp
+++ b/messageviewer/autotests/viewertest.cpp
@@ -72,7 +72,7 @@ void ViewerTest::shouldHaveDefaultValuesOnCreation()
void ViewerTest::shouldDisplayMessage()
{
- QByteArray data =
+ QByteArray data =
"From: Konqui <konqui@kde.org>\n"
"To: Friends <friends@kde.org>\n"
"Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)\n"
diff --git a/messageviewer/src/header/grantleeheaderformatter.cpp b/messageviewer/src/header/grantleeheaderformatter.cpp
index bebbe3b..c56fe5e 100644
--- a/messageviewer/src/header/grantleeheaderformatter.cpp
+++ b/messageviewer/src/header/grantleeheaderformatter.cpp
@@ -165,7 +165,6 @@ QString GrantleeHeaderFormatter::format(const QString &absolutePath, const Grant
headerObject.insert(QStringLiteral("listid"), message->headerByType("List-Id")->asUnicodeString());
}
-
const QString spamHtml = d->headerStyleUtil.spamStatus(message);
if (!spamHtml.isEmpty()) {
headerObject.insert(QStringLiteral("spamstatusi18n"), i18n("Spam Status:"));
diff --git a/messageviewer/src/messagepartthemes/default/autotests/setupenv.h b/messageviewer/src/messagepartthemes/default/autotests/setupenv.h
index bb928dc..090f1b9 100644
--- a/messageviewer/src/messagepartthemes/default/autotests/setupenv.h
+++ b/messageviewer/src/messagepartthemes/default/autotests/setupenv.h
@@ -129,11 +129,13 @@ public:
Q_UNUSED(availableModes);
}
- MimeTreeParser::Util::HtmlMode preferredMode() const Q_DECL_OVERRIDE {
+ MimeTreeParser::Util::HtmlMode preferredMode() const Q_DECL_OVERRIDE
+ {
return mPreferredMode;
}
- void setPreferredMode(MimeTreeParser::Util::HtmlMode mode) {
+ void setPreferredMode(MimeTreeParser::Util::HtmlMode mode)
+ {
mPreferredMode = mode;
}
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
index 5b00ed3..d3dda1e 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
@@ -1220,7 +1220,7 @@ public:
}
return htmlWriter->html;
}
-
+
QString render(const EncryptedMessagePart::Ptr &mp)
{
auto htmlWriter = QSharedPointer<CacheHtmlWriter>(new CacheHtmlWriter(mOldWriter));
@@ -1263,7 +1263,7 @@ public:
auto mode = mp->preferredMode();
if (mode == MimeTreeParser::Util::MultipartPlain && mp->text().trimmed().isEmpty()) {
- foreach(const auto m, mp->availableModes()) {
+ foreach (const auto m, mp->availableModes()) {
if (m != MimeTreeParser::Util::MultipartPlain) {
mode = m;
break;
diff --git a/messageviewer/src/viewer/objecttreeviewersource.cpp b/messageviewer/src/viewer/objecttreeviewersource.cpp
index 9b955b8..ae60770 100644
--- a/messageviewer/src/viewer/objecttreeviewersource.cpp
+++ b/messageviewer/src/viewer/objecttreeviewersource.cpp
@@ -63,15 +63,15 @@ void MailViewerSource::setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QL
MimeTreeParser::Util::HtmlMode MailViewerSource::preferredMode() const
{
switch (mViewer->displayFormatMessageOverwrite()) {
- case MessageViewer::Viewer::UseGlobalSetting:
- case MessageViewer::Viewer::Unknown:
- return mViewer->htmlMailGlobalSetting() ? MimeTreeParser::Util::Html : MimeTreeParser::Util::Normal;
- case MessageViewer::Viewer::Html:
- return MimeTreeParser::Util::MultipartHtml;
- case MessageViewer::Viewer::Text:
- return MimeTreeParser::Util::MultipartPlain;
- case MessageViewer::Viewer::ICal:
- return MimeTreeParser::Util::MultipartIcal;
+ case MessageViewer::Viewer::UseGlobalSetting:
+ case MessageViewer::Viewer::Unknown:
+ return mViewer->htmlMailGlobalSetting() ? MimeTreeParser::Util::Html : MimeTreeParser::Util::Normal;
+ case MessageViewer::Viewer::Html:
+ return MimeTreeParser::Util::MultipartHtml;
+ case MessageViewer::Viewer::Text:
+ return MimeTreeParser::Util::MultipartPlain;
+ case MessageViewer::Viewer::ICal:
+ return MimeTreeParser::Util::MultipartIcal;
}
Q_ASSERT(true);
return MimeTreeParser::Util::Html;
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index f340acf..5b5c726 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -2015,17 +2015,17 @@ void ViewerPrivate::slotLoadExternalReference()
Viewer::DisplayFormatMessage translateToDisplayFormat(MimeTreeParser::Util::HtmlMode mode)
{
- switch(mode) {
- case MimeTreeParser::Util::Normal:
- return Viewer::Unknown;
- case MimeTreeParser::Util::Html:
- return Viewer::Html;
- case MimeTreeParser::Util::MultipartPlain:
- return Viewer::Text;
- case MimeTreeParser::Util::MultipartHtml:
- return Viewer::Html;
- case MimeTreeParser::Util::MultipartIcal:
- return Viewer::ICal;
+ switch (mode) {
+ case MimeTreeParser::Util::Normal:
+ return Viewer::Unknown;
+ case MimeTreeParser::Util::Html:
+ return Viewer::Html;
+ case MimeTreeParser::Util::MultipartPlain:
+ return Viewer::Text;
+ case MimeTreeParser::Util::MultipartHtml:
+ return Viewer::Html;
+ case MimeTreeParser::Util::MultipartIcal:
+ return Viewer::ICal;
}
return Viewer::Unknown;
}
diff --git a/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp
index a17605f..0a65cb0 100644
--- a/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp
+++ b/messageviewer/src/viewer/webengine/autotests/mailwebenginescripttest.cpp
@@ -48,15 +48,15 @@ void MailWebEngineScriptTest::shouldReplaceInnerHtml()
void MailWebEngineScriptTest::shouldManageShowHideAttachments()
{
const QString result = QString::fromLatin1("qt.jQuery('#kmailshowattachment').click(function(){"
- "qt.jQuery('#kmailshowattachment').hide();"
- "qt.jQuery(\"#kmailhideattachment\").show();"
- "qt.jQuery(\"#attachmentid\").hide()}"
- ");"
- "qt.jQuery('#kmailhideattachment').click(function(){"
- "qt.jQuery(\"#kmailhideattachment\").hide();"
- "qt.jQuery(\"#kmailshowattachment\").show();"
- "qt.jQuery(\"#attachmentid\").show()}"
- ");");
+ "qt.jQuery('#kmailshowattachment').hide();"
+ "qt.jQuery(\"#kmailhideattachment\").show();"
+ "qt.jQuery(\"#attachmentid\").hide()}"
+ ");"
+ "qt.jQuery('#kmailhideattachment').click(function(){"
+ "qt.jQuery(\"#kmailhideattachment\").hide();"
+ "qt.jQuery(\"#kmailshowattachment\").show();"
+ "qt.jQuery(\"#attachmentid\").show()}"
+ ");");
QCOMPARE(MessageViewer::MailWebEngineScript::manageShowHideAttachments(), result);
}
diff --git a/messageviewer/src/viewer/webengine/mailwebengineview.cpp b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
index 7f5033d..8d5ea9e 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineview.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
@@ -107,7 +107,6 @@ MailWebEngineView::~MailWebEngineView()
delete d;
}
-
void MailWebEngineView::initializeScripts()
{
initializeJQueryScript();
diff --git a/messageviewer/src/widgets/htmlstatusbar.cpp b/messageviewer/src/widgets/htmlstatusbar.cpp
index 6eaf0b4..5370af9 100644
--- a/messageviewer/src/widgets/htmlstatusbar.cpp
+++ b/messageviewer/src/widgets/htmlstatusbar.cpp
@@ -114,7 +114,7 @@ void HtmlStatusBar::setAvailableModes(const QList<MimeTreeParser::Util::HtmlMode
mAvailableModes = availableModes;
}
-const QList< MimeTreeParser::Util::HtmlMode >& HtmlStatusBar::availableModes()
+const QList< MimeTreeParser::Util::HtmlMode > &HtmlStatusBar::availableModes()
{
return mAvailableModes;
}
diff --git a/messageviewer/src/widgets/mailsourcewebengineviewer.cpp b/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
index 5a35eab..063555a 100644
--- a/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
+++ b/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
@@ -50,7 +50,6 @@ MailSourceWebEngineViewer::MailSourceWebEngineViewer(QWidget *parent)
setAttribute(Qt::WA_DeleteOnClose);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
-
mRawBrowser = new MailSourceViewTextBrowserWidget(this);
#ifndef NDEBUG
diff --git a/mimetreeparser/autotests/setupenv.h b/mimetreeparser/autotests/setupenv.h
index 3550429..4bb81a6 100644
--- a/mimetreeparser/autotests/setupenv.h
+++ b/mimetreeparser/autotests/setupenv.h
@@ -122,11 +122,13 @@ public:
Q_UNUSED(availableModes);
}
- MimeTreeParser::Util::HtmlMode preferredMode() const Q_DECL_OVERRIDE {
+ MimeTreeParser::Util::HtmlMode preferredMode() const Q_DECL_OVERRIDE
+ {
return mPreferredMode;
}
- void setPreferredMode( MimeTreeParser::Util::HtmlMode mode) {
+ void setPreferredMode(MimeTreeParser::Util::HtmlMode mode)
+ {
mPreferredMode = mode;
}
diff --git a/mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp b/mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp
index 025c4f3..417c520 100644
--- a/mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp
+++ b/mimetreeparser/src/bodyformatter/applicationpgpencrypted.cpp
@@ -75,8 +75,8 @@ Interface::MessagePart::Ptr ApplicationPGPEncryptedBodyPartFormatter::process(In
part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
EncryptedMessagePart::Ptr mp(new EncryptedMessagePart(part.objectTreeParser(),
- data->decodedText(), Kleo::CryptoBackendFactory::instance()->openpgp(),
- NodeHelper::fromAsString(data), node));
+ data->decodedText(), Kleo::CryptoBackendFactory::instance()->openpgp(),
+ NodeHelper::fromAsString(data), node));
mp->setIsEncrypted(true);
mp->setDecryptMessage(part.source()->decryptMessage());
PartMetaData *messagePart(mp->partMetaData());
diff --git a/mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp b/mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp
index 8b9c26b..a296f00 100644
--- a/mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp
+++ b/mimetreeparser/src/bodyformatter/applicationpkcs7mime.cpp
@@ -98,8 +98,8 @@ Interface::MessagePart::Ptr ApplicationPkcs7MimeBodyPartFormatter::process(Inter
}
auto _mp = EncryptedMessagePart::Ptr(new EncryptedMessagePart(part.objectTreeParser(),
- node->decodedText(), smimeCrypto,
- NodeHelper::fromAsString(node), node));
+ node->decodedText(), smimeCrypto,
+ NodeHelper::fromAsString(node), node));
mp = _mp;
_mp->setIsEncrypted(true);
_mp->setDecryptMessage(part.source()->decryptMessage());
@@ -149,8 +149,8 @@ Interface::MessagePart::Ptr ApplicationPkcs7MimeBodyPartFormatter::process(Inter
const QTextCodec *aCodec(part.objectTreeParser()->codecFor(signTestNode));
const QByteArray signaturetext = signTestNode->decodedContent();
auto _mp = SignedMessagePart::Ptr(new SignedMessagePart(part.objectTreeParser(),
- aCodec->toUnicode(signaturetext), smimeCrypto,
- NodeHelper::fromAsString(node), signTestNode));
+ aCodec->toUnicode(signaturetext), smimeCrypto,
+ NodeHelper::fromAsString(node), signTestNode));
mp = _mp;
//mp->setDecryptMessage(part.source()->decryptMessage());
PartMetaData *messagePart(mp->partMetaData());
diff --git a/mimetreeparser/src/bodyformatter/multipartalternative.cpp b/mimetreeparser/src/bodyformatter/multipartalternative.cpp
index ed3f218..77871c3 100644
--- a/mimetreeparser/src/bodyformatter/multipartalternative.cpp
+++ b/mimetreeparser/src/bodyformatter/multipartalternative.cpp
@@ -79,7 +79,7 @@ Interface::MessagePart::Ptr MultiPartAlternativeBodyPartFormatter::process(Inter
}
preferredMode = Util::MultipartIcal;
} else if ((dataHtml && (preferredMode == Util::MultipartHtml || preferredMode == Util::Html)) ||
- (dataHtml && dataPlain && dataPlain->body().isEmpty())) {
+ (dataHtml && dataPlain && dataPlain->body().isEmpty())) {
if (dataPlain) {
part.nodeHelper()->setNodeProcessed(dataPlain, false);
}
diff --git a/mimetreeparser/src/bodyformatter/multipartencrypted.cpp b/mimetreeparser/src/bodyformatter/multipartencrypted.cpp
index 1e80c0c..a66f6f1 100644
--- a/mimetreeparser/src/bodyformatter/multipartencrypted.cpp
+++ b/mimetreeparser/src/bodyformatter/multipartencrypted.cpp
@@ -88,8 +88,8 @@ Interface::MessagePart::Ptr MultiPartEncryptedBodyPartFormatter::process(Interfa
part.nodeHelper()->setEncryptionState(node, KMMsgFullyEncrypted);
EncryptedMessagePart::Ptr mp(new EncryptedMessagePart(part.objectTreeParser(),
- data->decodedText(), useThisCryptProto,
- NodeHelper::fromAsString(data), node));
+ data->decodedText(), useThisCryptProto,
+ NodeHelper::fromAsString(data), node));
mp->setIsEncrypted(true);
mp->setDecryptMessage(part.source()->decryptMessage());
PartMetaData *messagePart(mp->partMetaData());
diff --git a/mimetreeparser/src/interfaces/bodypartformatter.cpp b/mimetreeparser/src/interfaces/bodypartformatter.cpp
index 5a38116..fd2dbe4 100644
--- a/mimetreeparser/src/interfaces/bodypartformatter.cpp
+++ b/mimetreeparser/src/interfaces/bodypartformatter.cpp
@@ -36,7 +36,6 @@
#include "htmlwriter/queuehtmlwriter.h"
#include "viewer/objecttreeparser.h"
-
using namespace MimeTreeParser::Interface;
namespace MimeTreeParser
diff --git a/mimetreeparser/src/viewer/messagepart.cpp b/mimetreeparser/src/viewer/messagepart.cpp
index 2913fec..3524bbd 100644
--- a/mimetreeparser/src/viewer/messagepart.cpp
+++ b/mimetreeparser/src/viewer/messagepart.cpp
@@ -347,7 +347,7 @@ bool TextMessagePart::showTextFrame() const
//-----AttachmentMessageBlock----------------------
-AttachmentMessagePart::AttachmentMessagePart(ObjectTreeParser* otp, KMime::Content* node, bool drawFrame, bool showLink, bool decryptMessage)
+AttachmentMessagePart::AttachmentMessagePart(ObjectTreeParser *otp, KMime::Content *node, bool drawFrame, bool showLink, bool decryptMessage)
: TextMessagePart(otp, node, drawFrame, showLink, decryptMessage)
, mIsImage(false)
, mNeverDisplayInline(false)
@@ -419,11 +419,11 @@ IconType AttachmentMessagePart::asIcon() const
return MimeTreeParser::NoIcon;
} else {
if (isImage() && isHtmlPreferred &&
- mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
+ mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
return MimeTreeParser::IconInline;
}
- if(defaultHidden && !showOnlyOneMimePart && mNode->parent()) {
+ if (defaultHidden && !showOnlyOneMimePart && mNode->parent()) {
return MimeTreeParser::IconInline;
}
@@ -474,7 +474,7 @@ bool AttachmentMessagePart::isHidden() const
hidden = defaultHidden && !showOnlyOneMimePart;
} else {
if (isImage() && isHtmlPreferred &&
- mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
+ mNode->parent() && mNode->parent()->contentType()->subType() == "related") {
hidden = true;
} else {
hidden = defaultHidden && !showOnlyOneMimePart && mNode->parent();
@@ -602,7 +602,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));
}
}
@@ -988,7 +988,7 @@ void SignedMessagePart::setVerificationResult(const CryptoBodyPartMemento *m, KM
if (!mVerifiedText.isEmpty()) {
parseInternal(textNode, false);
}
- } else {
+ } else {
mOtp->mNodeHelper->setPartMetaData(mNode, mMetaData);
if (!mVerifiedText.isEmpty()) {
@@ -1028,10 +1028,10 @@ QString SignedMessagePart::htmlContent() const
//-----CryptMessageBlock---------------------
EncryptedMessagePart::EncryptedMessagePart(ObjectTreeParser *otp,
- const QString &text,
- const Kleo::CryptoBackend::Protocol *cryptoProto,
- const QString &fromAddress,
- KMime::Content *node)
+ const QString &text,
+ const Kleo::CryptoBackend::Protocol *cryptoProto,
+ const QString &fromAddress,
+ KMime::Content *node)
: MessagePart(otp, text)
, mPassphraseError(false)
, mNoSecKey(false)
diff --git a/mimetreeparser/src/viewer/messagepart.h b/mimetreeparser/src/viewer/messagepart.h
index e054476..98ef0c9 100644
--- a/mimetreeparser/src/viewer/messagepart.h
+++ b/mimetreeparser/src/viewer/messagepart.h
@@ -239,7 +239,7 @@ class MIMETREEPARSER_EXPORT AlternativeMessagePart : public MessagePart
Q_OBJECT
public:
typedef QSharedPointer<AlternativeMessagePart> Ptr;
- AlternativeMessagePart(MimeTreeParser::ObjectTreeParser* otp, KMime::Content* node, Util::HtmlMode preferredMode);
+ AlternativeMessagePart(MimeTreeParser::ObjectTreeParser *otp, KMime::Content *node, Util::HtmlMode preferredMode);
virtual ~AlternativeMessagePart();
QString text() const Q_DECL_OVERRIDE;
@@ -314,10 +314,10 @@ class MIMETREEPARSER_EXPORT EncryptedMessagePart : public MessagePart
public:
typedef QSharedPointer<EncryptedMessagePart> Ptr;
EncryptedMessagePart(ObjectTreeParser *otp,
- const QString &text,
- const Kleo::CryptoBackend::Protocol *cryptoProto,
- const QString &fromAddress,
- KMime::Content *node);
+ const QString &text,
+ const Kleo::CryptoBackend::Protocol *cryptoProto,
+ const QString &fromAddress,
+ KMime::Content *node);
virtual ~EncryptedMessagePart();
@@ -363,7 +363,7 @@ class MIMETREEPARSER_EXPORT SignedMessagePart : public MessagePart
{
Q_OBJECT
Q_PROPERTY(bool isSigned READ isSigned)
- public:
+public:
typedef QSharedPointer<SignedMessagePart> Ptr;
SignedMessagePart(ObjectTreeParser *otp,
const QString &text,
@@ -401,7 +401,7 @@ protected:
QString mFromAddress;
KMime::Content *mNode;
QByteArray mVerifiedText;
-
+
friend EncryptedMessagePart;
friend class DefaultRendererPrivate;
};
diff --git a/mimetreeparser/src/viewer/objecttreeparser.h b/mimetreeparser/src/viewer/objecttreeparser.h
index da6a94b..0b1df0c 100644
--- a/mimetreeparser/src/viewer/objecttreeparser.h
+++ b/mimetreeparser/src/viewer/objecttreeparser.h
@@ -350,9 +350,9 @@ private:
* top-level content.
*/
MessagePartPtr parseObjectTreeInternal(KMime::Content *node, bool mOnlyOneMimePart);
- bool processType(KMime::Content* node, MimeTreeParser::ProcessResult& processResult, const QByteArray& mediaType, const QByteArray& subType, Interface::MessagePartPtr& mpRet, bool onlyOneMimePart);
+ bool processType(KMime::Content *node, MimeTreeParser::ProcessResult &processResult, const QByteArray &mediaType, const QByteArray &subType, Interface::MessagePartPtr &mpRet, bool onlyOneMimePart);
- Interface::MessagePartPtr defaultHandling(KMime::Content* node, MimeTreeParser::ProcessResult& result, bool onlyOneMimePart);
+ Interface::MessagePartPtr defaultHandling(KMime::Content *node, MimeTreeParser::ProcessResult &result, bool onlyOneMimePart);
private:
diff --git a/webengineviewer/src/print/printpreviewpagewidget.cpp b/webengineviewer/src/print/printpreviewpagewidget.cpp
index b7164fe..20b6ee8 100644
--- a/webengineviewer/src/print/printpreviewpagewidget.cpp
+++ b/webengineviewer/src/print/printpreviewpagewidget.cpp
@@ -141,7 +141,7 @@ void PrintPreviewPageWidget::print(const QList<int> &pages)
#if 0
Poppler::PSConverter *psConverter = mDoc->psConverter();
QTemporaryFile tf(QDir::tempPath() + QLatin1String("/kmail_XXXXXX.ps"));
- if ( !tf.open() ) {
+ if (!tf.open()) {
}
psConverter->setPageList(pages);
@@ -150,50 +150,50 @@ void PrintPreviewPageWidget::print(const QList<int> &pages)
psConverter->setLeftMargin(0);
psConverter->setTopMargin(0);
psConverter->setStrictMargins(false);
- psConverter->setPSOptions(psConverter->psOptions() | Poppler::PSConverter::HideAnnotations );
+ psConverter->setPSOptions(psConverter->psOptions() | Poppler::PSConverter::HideAnnotations);
if (psConverter->convert()) {
- if ( !QStandardPaths::findExecutable(QStringLiteral("lpr-cups")).isEmpty() ) {
+ if (!QStandardPaths::findExecutable(QStringLiteral("lpr-cups")).isEmpty()) {
exe = QStringLiteral("lpr-cups");
- } else if ( !QStandardPaths::findExecutable(QStringLiteral("lpr.cups")).isEmpty() ) {
+ } else if (!QStandardPaths::findExecutable(QStringLiteral("lpr.cups")).isEmpty()) {
exe = QStringLiteral("lpr.cups");
- } else if ( !QStandardPaths::findExecutable(QStringLiteral("lpr")).isEmpty() ) {
+ } else if (!QStandardPaths::findExecutable(QStringLiteral("lpr")).isEmpty()) {
exe = QStringLiteral("lpr");
- } else if ( !QStandardPaths::findExecutable(QStringLiteral("lp")).isEmpty() ) {
+ } else if (!QStandardPaths::findExecutable(QStringLiteral("lp")).isEmpty()) {
exe = QStringLiteral("lp");
} else {
- }
- delete psConverter;
+ }
+ delete psConverter;
#else
qDebug() << " void PrintPreviewPageWidget::print(const QList<int> &page) not implemented";
#endif
- //TODO
-}
+ //TODO
+ }
-void PrintPreviewPageWidget::slotReloadPage()
-{
- const int currentIndex = mPageComboBox->currentIndex();
- showPage(currentIndex == -1 ? 0 : currentIndex);
-}
+ void PrintPreviewPageWidget::slotReloadPage()
+ {
+ const int currentIndex = mPageComboBox->currentIndex();
+ showPage(currentIndex == -1 ? 0 : currentIndex);
+ }
-void PrintPreviewPageWidget::slotPageDown()
-{
- const int currentIndex = mPageComboBox->currentIndex();
- if (currentIndex != -1) {
- const int newIndex = currentIndex + 1;
- if (newIndex < mPageComboBox->count()) {
- mPageComboBox->setCurrentIndex(newIndex);
+ void PrintPreviewPageWidget::slotPageDown()
+ {
+ const int currentIndex = mPageComboBox->currentIndex();
+ if (currentIndex != -1) {
+ const int newIndex = currentIndex + 1;
+ if (newIndex < mPageComboBox->count()) {
+ mPageComboBox->setCurrentIndex(newIndex);
+ }
}
}
-}
-void PrintPreviewPageWidget::slotPageUp()
-{
- const int currentIndex = mPageComboBox->currentIndex();
- if (currentIndex != -1) {
- const int newIndex = currentIndex - 1;
- if (newIndex >= 0) {
- mPageComboBox->setCurrentIndex(newIndex);
+ void PrintPreviewPageWidget::slotPageUp()
+ {
+ const int currentIndex = mPageComboBox->currentIndex();
+ if (currentIndex != -1) {
+ const int newIndex = currentIndex - 1;
+ if (newIndex >= 0) {
+ mPageComboBox->setCurrentIndex(newIndex);
+ }
}
}
-}
diff --git a/webengineviewer/src/tests/testdndwebengine.h b/webengineviewer/src/tests/testdndwebengine.h
index 1f0b4c5..c5c1fef 100644
--- a/webengineviewer/src/tests/testdndwebengine.h
+++ b/webengineviewer/src/tests/testdndwebengine.h
@@ -22,7 +22,8 @@
#include <QWidget>
-namespace WebEngineViewer {
+namespace WebEngineViewer
+{
class WebEngineView;
}
class QWebEngineView;
diff --git a/webengineviewer/src/webenginemanagescript.cpp b/webengineviewer/src/webenginemanagescript.cpp
index 5934585..4fe46a5 100644
--- a/webengineviewer/src/webenginemanagescript.cpp
+++ b/webengineviewer/src/webenginemanagescript.cpp
@@ -57,6 +57,6 @@ void WebEngineManageScript::addScript(QWebEngineProfile *profile, const QString
}
script.setSourceCode(source);
profile->scripts()->insert(script);
- qCDebug(WEBENGINEVIEWER_LOG)<<" void WebEngineManageScript::addScript profile:"<< profile;
+ qCDebug(WEBENGINEVIEWER_LOG) << " void WebEngineManageScript::addScript profile:" << profile;
}
}
diff --git a/webengineviewer/src/webenginepage.cpp b/webengineviewer/src/webenginepage.cpp
index b12a38c..ea5f8d2 100644
--- a/webengineviewer/src/webenginepage.cpp
+++ b/webengineviewer/src/webenginepage.cpp
@@ -86,7 +86,6 @@ void WebEnginePage::saveHtml(QWebEngineDownloadItem *download)
#endif
}
-
QVariant WebEnginePage::execJavaScript(const QString &scriptSource, int timeout)
{
QVariant result;
diff --git a/webengineviewer/src/webengineview.cpp b/webengineviewer/src/webengineview.cpp
index 0b051cf..103cf97 100644
--- a/webengineviewer/src/webengineview.cpp
+++ b/webengineviewer/src/webengineview.cpp
@@ -26,7 +26,6 @@
#include <QMouseEvent>
#include <QWheelEvent>
-
using namespace WebEngineViewer;
class WebEngineViewer::WebEngineViewPrivate
@@ -202,7 +201,7 @@ void WebEngineView::saveRelativePosition()
qreal WebEngineView::relativePosition() const
{
- qCDebug(WEBENGINEVIEWER_LOG) << "Relative Position"<< d->mSavedRelativePosition;
+ qCDebug(WEBENGINEVIEWER_LOG) << "Relative Position" << d->mSavedRelativePosition;
return d->mSavedRelativePosition;
}