Commit 74c81905 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 3dfa4cb3
......@@ -17,7 +17,6 @@
02110-1301, USA.
*/
#ifndef COMPOSERWEBENGINEWIDGETTEST_H
#define COMPOSERWEBENGINEWIDGETTEST_H
......
......@@ -18,7 +18,6 @@
*/
#include "composereditorscript.h"
using namespace ComposerEditorWebEngine;
......
......@@ -17,7 +17,6 @@
02110-1301, USA.
*/
#include "composerwebengine.h"
#include "private/composerwebengine_p.h"
#include "composereditorwebengine_debug.h"
......@@ -350,7 +349,7 @@ void ComposerWebEngine::forwardMousePressEvent(QMouseEvent *event)
} else {
d->hideImageResizeWidget();
}
// KWebView::mousePressEvent(event);
// KWebView::mousePressEvent(event);
#endif
}
......@@ -622,5 +621,4 @@ QMap<QString, QString> ComposerWebEngine::localImages() const
return d->localImages();
}
#include "moc_composerwebengine.cpp"
......@@ -51,7 +51,6 @@ public:
bool richTextEnabled;
};
void ComposerWebEngineWidgetPrivate::initialize()
{
QVBoxLayout *vbox = new QVBoxLayout(q);
......
......@@ -620,7 +620,7 @@ void ComposerEditorWebEnginePrivate::_k_setTextBackgroundColor()
QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)
{
qDebug()<<" QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)"<<command;
qDebug() << " QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)" << command;
q->page()->runJavaScript(command);
return QVariant();
//TODO fix me return value.
......@@ -687,7 +687,7 @@ void ComposerEditorWebEnginePrivate::_k_insertLink()
void ComposerEditorWebEnginePrivate::_k_slotEditLink()
{
#if 0
#if 0
ComposerWebEngine::ComposerLinkDialog dlg(contextMenuResult.linkElement(), q);
dlg.exec();
#endif
......@@ -695,7 +695,7 @@ void ComposerEditorWebEnginePrivate::_k_slotEditLink()
void ComposerEditorWebEnginePrivate::_k_slotOpenLink()
{
#if 0
#if 0
const QString href = contextMenuResult.linkElement().attribute(QStringLiteral("href"));
if (!href.isEmpty()) {
new KRun(QUrl(href), 0);
......@@ -919,7 +919,6 @@ void ComposerEditorWebEnginePrivate::saveHtml(QWebEnginePage *page, const QStrin
}
}
void ComposerEditorWebEnginePrivate::_k_slotSaveAs()
{
QString fn = QFileDialog::getSaveFileName(q, i18nc("@title:window", "Save as"), QString(), i18n("HTML Files (*.htm *.html);;All Files (*)"));
......@@ -936,7 +935,7 @@ void ComposerEditorWebEnginePrivate::_k_slotSaveAs()
void ComposerEditorWebEnginePrivate::_k_slotPrint()
{
qDebug()<<" void ComposerEditorWebEnginePrivate::_k_slotPrint() not implemented";
qDebug() << " void ComposerEditorWebEnginePrivate::_k_slotPrint() not implemented";
}
void ComposerEditorWebEnginePrivate::_k_slotPrintPreview()
......@@ -1044,7 +1043,7 @@ void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd, const QStri
bool ComposerEditorWebEnginePrivate::queryCommandState(const QString &cmd)
{
#if 0
#if 0
QWebFrame *frame = q->page()->mainFrame();
QString js = QStringLiteral("document.queryCommandState(\"%1\", false, null)").arg(cmd);
const QVariant result = frame->evaluateJavaScript(js);
......@@ -1058,7 +1057,7 @@ void ComposerEditorWebEnginePrivate::_k_slotSpeakText()
{
QString text = q->selectedText();
if (text.isEmpty()) {
q->page()->toHtml([](const QString &html) {
q->page()->toHtml([](const QString & html) {
KPIMTextEdit::TextToSpeech::self()->say(html);
});
}
......@@ -1099,7 +1098,7 @@ void ComposerEditorWebEnginePrivate::_k_slotInsertAnchor()
QMap<QString, QString> ComposerEditorWebEnginePrivate::localImages() const
{
QMap<QString, QString> lst;
#if 0
#if 0
QWebElementCollection images = q->page()->mainFrame()->findAllElements(QStringLiteral("img"));
Q_FOREACH (const QWebElement &elm, images) {
if (elm.attribute(QStringLiteral("src")).startsWith(QStringLiteral("file://"))) {
......@@ -1113,4 +1112,3 @@ QMap<QString, QString> ComposerEditorWebEnginePrivate::localImages() const
}
......@@ -235,7 +235,6 @@ QString PostEntry::htmlContent() const
return d->htmlEditor->document()->text();
}
void PostEntry::setHtmlContent(const QString &content)
{
d->wysiwygEditor->editor()->setHtmlContent(content);
......
......@@ -422,7 +422,6 @@ MainWidget::~MainWidget()
delete mFormatter;
delete mGroupFormatter;
Settings::self()->save();
}
......@@ -750,7 +749,9 @@ void MainWidget::printPreview()
QPrintPreviewDialog previewdlg(&printer, this);
KABPrinting::PrintingWizard wizard(&printer, mItemView->selectionModel(), this);
wizard.setDefaultAddressBook(currentAddressBook());
connect(&previewdlg, &QPrintPreviewDialog::paintRequested, this, [&wizard]() { wizard.print(); });
connect(&previewdlg, &QPrintPreviewDialog::paintRequested, this, [&wizard]() {
wizard.print();
});
const int result = wizard.exec();
if (result) {
......
......@@ -32,8 +32,10 @@
#include <KPIMTextEdit/RichTextComposerEmailQuoteHighlighter>
#include <sonnet/dictionarycombobox.h>
namespace {
inline QString textSnippetMimeType() {
namespace
{
inline QString textSnippetMimeType()
{
return QStringLiteral("text/x-kmail-textsnippet");
}
}
......
......@@ -49,8 +49,7 @@ void KActionMenuTransport::updateTransportMenu()
const QList<MailTransport::Transport *> transports = MailTransport::TransportManager::self()->transports();
QMap<QString, int> menuTransportLst;
Q_FOREACH (MailTransport::Transport *transport, transports) {
Q_FOREACH (MailTransport::Transport *transport, transports) {
const QString name = transport->name().replace(QLatin1Char('&'), QStringLiteral("&&"));
menuTransportLst.insert(name, transport->id());
}
......
......@@ -695,16 +695,16 @@ class DummyNodeManager : public ReparentingModel::NodeManager
public:
DummyNodeManager(ReparentingModel &m) : ReparentingModel::NodeManager(m) {}
private:
void checkSourceIndex(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE
{
if (sourceIndex.data().toString() == QLatin1String("personfolder")) {
void checkSourceIndex(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE {
if (sourceIndex.data().toString() == QLatin1String("personfolder"))
{
model.addNode(ReparentingModel::Node::Ptr(new DummyNode(model, QStringLiteral("personnode"))));
}
}
void checkSourceIndexRemoval(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE
{
if (sourceIndex.data().toString() == QLatin1String("personfolder")) {
void checkSourceIndexRemoval(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE {
if (sourceIndex.data().toString() == QLatin1String("personfolder"))
{
model.removeNode(DummyNode(model, QStringLiteral("personnode")));
}
}
......
......@@ -85,7 +85,6 @@ public Q_SLOTS:
void slotPrintPreview();
void slotPrint();
Q_SIGNALS:
void updateButtons(bool newScriptAction, bool editScriptAction, bool deleteScriptAction, bool desactivateScriptAction);
void updateScriptList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment