Commit c3291ac9 authored by Laurent Montel's avatar Laurent Montel 😁

Coding style

parent 7dff227f
......@@ -392,7 +392,8 @@ void SieveEditorTextModeWidget::printPreview()
bool restoreSpellCheck = mTextEdit->checkSpellingEnabled();
mTextEdit->setCheckSpellingEnabled(false);
QPointer<PimCommon::KPimPrintPreviewDialog> previewdlg = new PimCommon::KPimPrintPreviewDialog(this);
connect(previewdlg.data(), &QPrintPreviewDialog::paintRequested, this, [this](QPrinter *printer) { mTextEdit->print(printer);
connect(previewdlg.data(), &QPrintPreviewDialog::paintRequested, this, [this](QPrinter *printer) {
mTextEdit->print(printer);
});
previewdlg->exec();
delete previewdlg;
......
......@@ -85,7 +85,7 @@ SieveTextEdit::~SieveTextEdit()
void SieveTextEdit::updateHighLighter()
{
auto hlighter = dynamic_cast<KPIMTextEdit::PlainTextSyntaxSpellCheckingHighlighter*>(highlighter());
auto hlighter = dynamic_cast<KPIMTextEdit::PlainTextSyntaxSpellCheckingHighlighter *>(highlighter());
if (hlighter) {
hlighter->toggleSpellHighlighting(checkSpellingEnabled());
}
......@@ -103,8 +103,8 @@ void SieveTextEdit::createHighlighter()
highlighter->setCurrentLanguage(spellCheckingLanguage());
highlighter->setDefinition(d->mSyntaxRepo.definitionForName(QStringLiteral("Sieve")));
highlighter->setTheme((palette().color(QPalette::Base).lightness() < 128)
? d->mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::DarkTheme)
: d->mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::LightTheme));
? d->mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::DarkTheme)
: d->mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::LightTheme));
setHighlighter(highlighter);
}
......
......@@ -51,8 +51,8 @@ ParsingResultDialog::ParsingResultDialog(QWidget *parent)
auto highlighter = new KSyntaxHighlighting::SyntaxHighlighter(mTextEdit->editor()->document());
highlighter->setDefinition(mSyntaxRepo.definitionForName(QStringLiteral("XML")));
highlighter->setTheme((palette().color(QPalette::Base).lightness() < 128)
? mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::DarkTheme)
: mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::LightTheme));
? mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::DarkTheme)
: mSyntaxRepo.defaultTheme(KSyntaxHighlighting::Repository::LightTheme));
mTextEdit->setReadOnly(true);
mainLayout->addWidget(mTextEdit);
mainLayout->addWidget(buttonBox);
......
......@@ -267,7 +267,6 @@ void ManageSieveWidget::slotNewScript()
info.sieveImapAccountSettings = sieveimapaccountsettings;
info.scriptList = listscript;
Q_EMIT newScript(info);
}
......
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