summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-30 21:36:30 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-30 21:36:30 (GMT)
commit1e1e7572f174b389177818eeb51398081e30abef (patch)
tree5d1b80435dbba9240628207d5905be40964cde54
parent0c8c5f6be4ba4ed28494eb91b59730c8a1b18190 (diff)
Astyle kdelibs
-rw-r--r--messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp16
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposerng.cpp3
-rw-r--r--messagecomposer/src/plugineditor/plugineditormanager.cpp1
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h1
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendmanager.cpp1
-rw-r--r--messageviewer/src/header/headerstyleplugin.h1
-rw-r--r--messageviewer/src/header/headerstylepluginmanager.cpp2
-rw-r--r--messageviewer/src/htmlwriter/autotests/webengineparthtmlwritertest.cpp5
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp7
-rw-r--r--messageviewer/src/viewer/viewer_p.h1
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineview.cpp4
-rw-r--r--messageviewer/src/viewerplugins/viewerpluginmanager.cpp2
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp1
13 files changed, 18 insertions, 27 deletions
diff --git a/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp b/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
index 2528808..2b707db 100644
--- a/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
+++ b/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
@@ -379,10 +379,10 @@ void RichTextComposerNgTest::shouldLoadSignatureFromFile_data()
QTest::addColumn<KIdentityManagement::Signature::AddedTextFlag>("signatureaddtext");
QTest::newRow("signature1") << QStringLiteral("signature1.txt") << QStringLiteral("\n")
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
QTest::newRow("signature2") << QStringLiteral("signature2.txt") << QStringLiteral("\n")
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
}
void RichTextComposerNgTest::shouldLoadSignatureFromFile()
@@ -453,19 +453,19 @@ void RichTextComposerNgTest::shouldLoadSignatureFromCommand_data()
QTest::addColumn<KIdentityManagement::Signature::AddedTextFlag>("signatureaddtext");
QTest::newRow("command1") << QStringLiteral("echo \"foo\"") << QStringLiteral("\n")
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
QTest::newRow("command2") << QStringLiteral("echo \"foo\"") << QStringLiteral("foo ddd \n")
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
QTest::newRow("command3") << QStringLiteral("echo \"foo\"") << QString()
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
QTest::newRow("command4") << QStringLiteral("echo \"foo\nsss\"") << QString()
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
QTest::newRow("command5") << QStringLiteral("echo \"foo\nsss\n\"") << QStringLiteral("foo ddd \n")
- << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::End << KIdentityManagement::Signature::AddSeparator;
//Start
QTest::newRow("command6") << QStringLiteral("echo \"foo\nsss\n\"") << QStringLiteral("foo ddd \n")
- << KIdentityManagement::Signature::Start << KIdentityManagement::Signature::AddSeparator;
+ << KIdentityManagement::Signature::Start << KIdentityManagement::Signature::AddSeparator;
//Failed
//QTest::newRow("command7") << QStringLiteral("echo \"foo\nsss\n\"") << QStringLiteral("foo ddd \n")
diff --git a/messagecomposer/src/composer-ng/richtextcomposerng.cpp b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
index 4cc8e6f..3649c18 100644
--- a/messagecomposer/src/composer-ng/richtextcomposerng.cpp
+++ b/messagecomposer/src/composer-ng/richtextcomposerng.cpp
@@ -370,8 +370,9 @@ QString RichTextComposerNg::toCleanHtml() const
void RichTextComposerNg::forceAutoCorrection(bool selectedText)
{
- if (document()->isEmpty())
+ if (document()->isEmpty()) {
return;
+ }
if (d->autoCorrection && d->autoCorrection->isEnabledAutoCorrection()) {
const bool richText = (textMode() == RichTextComposer::Rich);
const int initialPosition = textCursor().position();
diff --git a/messagecomposer/src/plugineditor/plugineditormanager.cpp b/messagecomposer/src/plugineditor/plugineditormanager.cpp
index 0b83073..2297600 100644
--- a/messagecomposer/src/plugineditor/plugineditormanager.cpp
+++ b/messagecomposer/src/plugineditor/plugineditormanager.cpp
@@ -232,4 +232,3 @@ PluginEditor *PluginEditorManager::pluginFromIdentifier(const QString &id)
return d->pluginFromIdentifier(id);
}
-
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
index cc9754a..c59c4cd 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
@@ -52,7 +52,6 @@ public:
void setIsEnabled(bool enabled);
bool isEnabled() const;
-
Q_SIGNALS:
void configChanged();
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendmanager.cpp b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendmanager.cpp
index 65f0f35..d7c4b20 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendmanager.cpp
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendmanager.cpp
@@ -180,7 +180,6 @@ PluginEditorCheckBeforeSend *PluginEditorCheckBeforeSendManagerPrivate::pluginFr
return {};
}
-
PluginEditorCheckBeforeSendManager::PluginEditorCheckBeforeSendManager(QObject *parent)
: QObject(parent),
d(new MessageComposer::PluginEditorCheckBeforeSendManagerPrivate(this))
diff --git a/messageviewer/src/header/headerstyleplugin.h b/messageviewer/src/header/headerstyleplugin.h
index c5e2328..2eecf39 100644
--- a/messageviewer/src/header/headerstyleplugin.h
+++ b/messageviewer/src/header/headerstyleplugin.h
@@ -47,7 +47,6 @@ public:
virtual QString alignment() const;
virtual int elidedTextSize() const;
-
void setIsEnabled(bool enabled);
bool isEnabled() const;
diff --git a/messageviewer/src/header/headerstylepluginmanager.cpp b/messageviewer/src/header/headerstylepluginmanager.cpp
index 9be74d1..799eeec 100644
--- a/messageviewer/src/header/headerstylepluginmanager.cpp
+++ b/messageviewer/src/header/headerstylepluginmanager.cpp
@@ -107,7 +107,6 @@ QString HeaderStylePluginManagerPrivate::configPrefixSettingKey() const
return QStringLiteral("PluginHeaderStyle");
}
-
void HeaderStylePluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("messageviewer"), [](const KPluginMetaData & md) {
@@ -199,7 +198,6 @@ MessageViewer::HeaderStylePlugin *HeaderStylePluginManagerPrivate::pluginFromIde
return {};
}
-
HeaderStylePluginManager *HeaderStylePluginManager::self()
{
return sInstance->headerStylePluginManager;
diff --git a/messageviewer/src/htmlwriter/autotests/webengineparthtmlwritertest.cpp b/messageviewer/src/htmlwriter/autotests/webengineparthtmlwritertest.cpp
index 2e8b023..d868e3d 100644
--- a/messageviewer/src/htmlwriter/autotests/webengineparthtmlwritertest.cpp
+++ b/messageviewer/src/htmlwriter/autotests/webengineparthtmlwritertest.cpp
@@ -56,7 +56,6 @@ void WebEnginePartHtmlWriterTest::removeScriptInHtml_data()
QTest::newRow("scriptwithspace-insensitive") << QStringLiteral("<a>boo<SCRIPT type=\"foo\" >alert(1)</SCRIPT ></a>") << QStringLiteral("<a>boo</a>");
QTest::newRow("scriptwithremoveaccess-insensitive") << QStringLiteral("<a>boo<SCRIPT src=\"http://foo\"/></a>") << QStringLiteral("<a>boo</a>");
-
//MultiLine insensitive
QTest::newRow("multiline-insensitive") << QStringLiteral("<a>boo<sCript>\nalert(1)</Script></a>") << QStringLiteral("<a>boo</a>");
QTest::newRow("multiline-scriptwithspace-insensitive") << QStringLiteral("<a>boo<SCRipT type=\"foo\" >\nalert(1)\n</script ></a>") << QStringLiteral("<a>boo</a>");
@@ -66,8 +65,8 @@ void WebEnginePartHtmlWriterTest::removeScriptInHtml_data()
void WebEnginePartHtmlWriterTest::removeScriptInHtml()
{
- QFETCH (QString, input);
- QFETCH (QString, output);
+ QFETCH(QString, input);
+ QFETCH(QString, output);
QCOMPARE(MessageViewer::WebEnginePartHtmlWriter::removeJscripts(input), output);
}
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index 6f3f233..d3105df 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -163,7 +163,8 @@ template<typename Arg, typename R, typename C>
struct InvokeWrapper {
R *receiver;
void (C::*memberFun)(Arg);
- void operator()(Arg result) {
+ void operator()(Arg result)
+ {
(receiver->*memberFun)(result);
}
};
@@ -2267,8 +2268,9 @@ void ViewerPrivate::slotPrintMessage()
return;
}
#ifdef WEBENGINEVIEWER_PRINT_SUPPORT
- if (mCurrentPrinter)
+ if (mCurrentPrinter) {
return;
+ }
mCurrentPrinter = new QPrinter();
QPointer<QPrintDialog> dialog = new QPrintDialog(mCurrentPrinter, mMainWindow);
dialog->setWindowTitle(i18n("Print Document"));
@@ -2291,7 +2293,6 @@ void ViewerPrivate::slotHandlePagePrinted(bool result)
mCurrentPrinter = Q_NULLPTR;
}
-
void ViewerPrivate::slotSetEncoding()
{
if (mSelectEncodingAction) {
diff --git a/messageviewer/src/viewer/viewer_p.h b/messageviewer/src/viewer/viewer_p.h
index cfa4a0b..a5070f8 100644
--- a/messageviewer/src/viewer/viewer_p.h
+++ b/messageviewer/src/viewer/viewer_p.h
@@ -423,7 +423,6 @@ public:
QList<QAction *> viewerPluginActionList(MessageViewer::ViewerPluginInterface::SpecificFeatureTypes features);
QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
-
void setPrintElementBackground(bool printElementBackground);
private Q_SLOTS:
diff --git a/messageviewer/src/viewer/webengine/mailwebengineview.cpp b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
index 6f1a7f2..aa20ea9 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineview.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
@@ -240,8 +240,8 @@ void MailWebEngineView::hideAccessKeys()
bool MailWebEngineView::isScrolledToBottom() const
{
#if QT_VERSION >= 0x050700
- qDebug()<<" page position " << page()->scrollPosition().y();
- qDebug()<<" content size " << page()->contentsSize().height();
+ qDebug() << " page position " << page()->scrollPosition().y();
+ qDebug() << " content size " << page()->contentsSize().height();
#endif
qDebug() << "bool MailWebEngineView::isScrolledToBottom() const not implemented";
//Convert as async
diff --git a/messageviewer/src/viewerplugins/viewerpluginmanager.cpp b/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
index de6bf17..25fad56 100644
--- a/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
+++ b/messageviewer/src/viewerplugins/viewerpluginmanager.cpp
@@ -21,7 +21,6 @@
#include "viewerplugin.h"
#include "messageviewer_debug.h"
-
#include <KSharedConfig>
#include <kpluginmetadata.h>
#include <KPluginLoader>
@@ -203,7 +202,6 @@ ViewerPlugin *ViewerPluginManagerPrivate::pluginFromIdentifier(const QString &id
return {};
}
-
ViewerPluginManager::ViewerPluginManager(QObject *parent)
: QObject(parent),
d(new MessageViewer::ViewerPluginManagerPrivate(this))
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
index 4dc2a7e..384108f 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
@@ -190,7 +190,6 @@ NetworkUrlInterceptorPluginManager *NetworkUrlInterceptorPluginManager::self()
return sInstance->mailNetworkUrlInterceptorPluginManager;
}
-
NetworkUrlInterceptorPluginManager::NetworkUrlInterceptorPluginManager(QObject *parent)
: QObject(parent),
d(new NetworkUrlInterceptorPluginManagerPrivate(this))