Commit b61eb39c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: fix "auto *foo" -> "auto foo"

parent 2652ecfe
Pipeline #44885 passed with stage
in 21 minutes and 38 seconds
......@@ -44,7 +44,7 @@ SessionThread::SessionThread(Session *session, QObject *parent)
saslInitialized = true;
}
auto *thread = new QThread();
auto thread = new QThread();
moveToThread(thread);
thread->start();
QMetaObject::invokeMethod(this, "doInit");
......
......@@ -291,7 +291,7 @@ SieveJob *SieveJob::put(const QUrl &destination, const QString &script, bool mak
commands.push(Private::Put);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = destination;
job->d->mScript = script;
job->d->mCommands = commands;
......@@ -306,7 +306,7 @@ SieveJob *SieveJob::get(const QUrl &source)
commands.push(Private::Get);
commands.push(Private::SearchActive);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = source;
job->d->mCommands = commands;
......@@ -319,7 +319,7 @@ SieveJob *SieveJob::list(const QUrl &source)
QStack<Private::Command> commands;
commands.push(Private::List);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = source;
job->d->mCommands = commands;
......@@ -332,7 +332,7 @@ SieveJob *SieveJob::del(const QUrl &url)
QStack<Private::Command> commands;
commands.push(Private::Delete);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = url;
job->d->mCommands = commands;
......@@ -344,7 +344,7 @@ SieveJob *SieveJob::deactivate(const QUrl &url)
{
QStack<Private::Command> commands;
commands.push(Private::Deactivate);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = url;
job->d->mCommands = commands;
......@@ -357,7 +357,7 @@ SieveJob *SieveJob::rename(const QUrl &url, const QString &newName)
QStack<Private::Command> commands;
commands.push(Private::Rename);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = url;
job->d->mNewName = newName;
job->d->mCommands = commands;
......@@ -371,7 +371,7 @@ SieveJob *SieveJob::check(const QUrl &url, const QString &script)
QStack<Private::Command> commands;
commands.push(Private::Check);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = url;
job->d->mScript = script;
job->d->mCommands = commands;
......@@ -385,7 +385,7 @@ SieveJob *SieveJob::activate(const QUrl &url)
QStack<Private::Command> commands;
commands.push(Private::Activate);
auto *job = new SieveJob;
auto job = new SieveJob;
job->d->mUrl = url;
job->d->mCommands = commands;
......
......@@ -25,7 +25,7 @@ AutoCreateScriptDialog::AutoCreateScriptDialog(QWidget *parent)
, mEditor(new SieveEditorGraphicalModeWidget(this))
{
setWindowTitle(i18nc("@title:window", "Create Sieve Filter"));
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
......@@ -87,7 +87,7 @@ bool AutoCreateScriptDialog::event(QEvent *e)
{
const bool shortCutOverride = (e->type() == QEvent::ShortcutOverride);
if (shortCutOverride || e->type() == QEvent::KeyPress) {
auto *kev = static_cast<QKeyEvent * >(e);
auto kev = static_cast<QKeyEvent * >(e);
if (kev->key() == Qt::Key_Escape) {
e->ignore();
return true;
......
......@@ -18,10 +18,10 @@ RegexpEditorLineEditTest::RegexpEditorLineEditTest(QObject *parent)
void RegexpEditorLineEditTest::shouldHaveDefaultValue()
{
KSieveUi::RegexpEditorLineEdit w;
auto *mLineEdit = w.findChild<QLineEdit *>(QStringLiteral("lineedit"));
auto mLineEdit = w.findChild<QLineEdit *>(QStringLiteral("lineedit"));
QVERIFY(mLineEdit);
auto *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout"));
auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0));
}
......
......@@ -29,25 +29,25 @@ void SelectHeadersDialogTest::shouldHaveDefaultValue()
KSieveUi::SelectHeadersDialog dlg;
QVERIFY(!dlg.windowTitle().isEmpty());
auto *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
auto buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
QVERIFY(buttonBox);
auto *lay = dlg.findChild<QVBoxLayout *>(QStringLiteral("widgetlayout"));
auto lay = dlg.findChild<QVBoxLayout *>(QStringLiteral("widgetlayout"));
QVERIFY(lay);
QCOMPARE(lay->contentsMargins(), QMargins(0, 0, 0, 0));
auto *mListWidget = dlg.findChild<KSieveUi::SelectHeadersWidget *>(QStringLiteral("listwidget"));
auto mListWidget = dlg.findChild<KSieveUi::SelectHeadersWidget *>(QStringLiteral("listwidget"));
QVERIFY(mListWidget);
auto *lab = dlg.findChild<QLabel *>(QStringLiteral("label"));
auto lab = dlg.findChild<QLabel *>(QStringLiteral("label"));
QVERIFY(lab);
QVERIFY(!lab->text().isEmpty());
auto *mNewHeader = dlg.findChild<QLineEdit *>(QStringLiteral("newheader"));
auto mNewHeader = dlg.findChild<QLineEdit *>(QStringLiteral("newheader"));
QVERIFY(mNewHeader);
QVERIFY(mNewHeader->isClearButtonEnabled());
auto *mAddNewHeader = dlg.findChild<QPushButton *>(QStringLiteral("addnewheader"));
auto mAddNewHeader = dlg.findChild<QPushButton *>(QStringLiteral("addnewheader"));
QVERIFY(mAddNewHeader);
QVERIFY(!mAddNewHeader->isEnabled());
}
......
......@@ -19,11 +19,11 @@ void SievePreviewGeneratedCodeWidgetTest::shouldHaveDefaultValues()
{
KSieveUi::SievePreviewGeneratedCodeWidget w;
auto *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout"));
auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0));
auto *mTextEdit = w.findChild<QTextEdit *>(QStringLiteral("mTextEdit"));
auto mTextEdit = w.findChild<QTextEdit *>(QStringLiteral("mTextEdit"));
QVERIFY(mTextEdit);
QVERIFY(mTextEdit->isReadOnly());
}
......@@ -17,10 +17,10 @@ SieveScriptListBoxTest::SieveScriptListBoxTest(QObject *parent)
void SieveScriptListBoxTest::shouldHaveDefaultValues()
{
KSieveUi::SieveScriptListBox lst(QStringLiteral("foo"));
auto *layout = lst.findChild<QVBoxLayout *>(QStringLiteral("layout"));
auto layout = lst.findChild<QVBoxLayout *>(QStringLiteral("layout"));
QVERIFY(layout);
auto *mSieveListScript = lst.findChild<QListWidget *>(QStringLiteral("mSieveListScript"));
auto mSieveListScript = lst.findChild<QListWidget *>(QStringLiteral("mSieveListScript"));
QVERIFY(mSieveListScript);
QCOMPARE(mSieveListScript->dragDropMode(), QAbstractItemView::InternalMove);
}
......@@ -27,7 +27,7 @@ SieveHelpButton::~SieveHelpButton()
bool SieveHelpButton::event(QEvent *event)
{
if (event->type() == QEvent::WhatsThisClicked) {
auto *clicked = static_cast<QWhatsThisClickedEvent *>(event);
auto clicked = static_cast<QWhatsThisClickedEvent *>(event);
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl(clicked->href()));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->start();
......
......@@ -21,10 +21,10 @@ SieveActionAbstractFlags::SieveActionAbstractFlags(SieveEditorGraphicalModeWidge
QWidget *SieveActionAbstractFlags::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *lay = new QHBoxLayout;
auto lay = new QHBoxLayout;
lay->setContentsMargins({});
w->setLayout(lay);
auto *flagsWidget = new SelectFlagsWidget;
auto flagsWidget = new SelectFlagsWidget;
connect(flagsWidget, &SelectFlagsWidget::valueChanged, this, &SieveActionAbstractFlags::valueChanged);
flagsWidget->setObjectName(QStringLiteral("flagswidget"));
lay->addWidget(flagsWidget);
......@@ -36,10 +36,10 @@ void SieveActionAbstractFlags::setParamWidgetValue(QXmlStreamReader &element, QW
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
if (tagName == QLatin1String("list")) {
auto *flagsWidget = w->findChild<SelectFlagsWidget *>(QStringLiteral("flagswidget"));
auto flagsWidget = w->findChild<SelectFlagsWidget *>(QStringLiteral("flagswidget"));
flagsWidget->setFlags(AutoCreateScriptUtil::listValue(element));
} else if (tagName == QLatin1String("str")) {
auto *flagsWidget = w->findChild<SelectFlagsWidget *>(QStringLiteral("flagswidget"));
auto flagsWidget = w->findChild<SelectFlagsWidget *>(QStringLiteral("flagswidget"));
flagsWidget->setFlags(QStringList() << element.readElementText());
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......
......@@ -27,11 +27,11 @@ SieveActionAddHeader::SieveActionAddHeader(SieveEditorGraphicalModeWidget *sieve
QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *grid = new QGridLayout;
auto grid = new QGridLayout;
grid->setContentsMargins({});
w->setLayout(grid);
auto *combo = new SelectAddHeaderPositionCombobox;
auto combo = new SelectAddHeaderPositionCombobox;
combo->setObjectName(QStringLiteral("selectposition"));
connect(combo, &SelectAddHeaderPositionCombobox::valueChanged, this, &SieveActionAddHeader::valueChanged);
grid->addWidget(combo, 0, 0);
......@@ -39,7 +39,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
QLabel *lab = new QLabel(i18n("header:"));
grid->addWidget(lab, 0, 1);
auto *headerEdit = new QLineEdit;
auto headerEdit = new QLineEdit;
connect(headerEdit, &QLineEdit::textChanged, this, &SieveActionAddHeader::valueChanged);
headerEdit->setObjectName(QStringLiteral("headeredit"));
grid->addWidget(headerEdit, 0, 2);
......@@ -47,7 +47,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("value:"));
grid->addWidget(lab, 1, 1);
auto *valueEdit = new QLineEdit;
auto valueEdit = new QLineEdit;
connect(valueEdit, &QLineEdit::textChanged, this, &SieveActionAddHeader::valueChanged);
valueEdit->setObjectName(QStringLiteral("valueedit"));
grid->addWidget(valueEdit, 1, 2);
......@@ -61,14 +61,14 @@ void SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
if (tagName == QLatin1String("tag")) {
auto *combo = w->findChild<SelectAddHeaderPositionCombobox *>(QStringLiteral("selectposition"));
auto combo = w->findChild<SelectAddHeaderPositionCombobox *>(QStringLiteral("selectposition"));
combo->setCode(AutoCreateScriptUtil::tagValue(element.readElementText()), name(), error);
} else if (tagName == QLatin1String("str")) {
if (index == 0) {
auto *edit = w->findChild<QLineEdit *>(QStringLiteral("headeredit"));
auto edit = w->findChild<QLineEdit *>(QStringLiteral("headeredit"));
edit->setText(element.readElementText());
} else if (index == 1) {
auto *value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
auto value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
value->setText(AutoCreateScriptUtil::quoteStr(element.readElementText()));
} else {
tooManyArguments(tagName, index, 2, error);
......
......@@ -24,14 +24,14 @@ SieveActionBreak::SieveActionBreak(SieveEditorGraphicalModeWidget *sieveGraphica
QWidget *SieveActionBreak::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *lay = new QHBoxLayout;
auto lay = new QHBoxLayout;
lay->setContentsMargins({});
w->setLayout(lay);
QLabel *lab = new QLabel(i18n("Name (optional):"));
lay->addWidget(lab);
auto *subject = new QLineEdit;
auto subject = new QLineEdit;
subject->setObjectName(QStringLiteral("name"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionBreak::valueChanged);
lay->addWidget(subject);
......@@ -45,7 +45,7 @@ void SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w
if (tagName == QLatin1String("tag")) {
const QString tagValue = element.readElementText();
if (tagValue == QLatin1String("name")) {
auto *name = w->findChild<QLineEdit *>(QStringLiteral("name"));
auto name = w->findChild<QLineEdit *>(QStringLiteral("name"));
name->setText(AutoCreateScriptUtil::strValue(element));
} else {
unknownTagValue(tagValue, error);
......
......@@ -24,14 +24,14 @@ SieveActionConvert::SieveActionConvert(SieveEditorGraphicalModeWidget *sieveGrap
QWidget *SieveActionConvert::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *lay = new QGridLayout;
auto lay = new QGridLayout;
lay->setContentsMargins({});
w->setLayout(lay);
QLabel *lab = new QLabel(i18n("From:"));
lay->addWidget(lab, 0, 0);
auto *fromMimeType = new SelectMimeTypeComboBox;
auto fromMimeType = new SelectMimeTypeComboBox;
connect(fromMimeType, &SelectMimeTypeComboBox::valueChanged, this, &SieveActionConvert::valueChanged);
fromMimeType->setObjectName(QStringLiteral("from"));
lay->addWidget(fromMimeType, 0, 1);
......@@ -39,7 +39,7 @@ QWidget *SieveActionConvert::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("To:"));
lay->addWidget(lab, 0, 2);
auto *toMimeType = new SelectMimeTypeComboBox;
auto toMimeType = new SelectMimeTypeComboBox;
connect(toMimeType, &SelectMimeTypeComboBox::valueChanged, this, &SieveActionConvert::valueChanged);
toMimeType->setObjectName(QStringLiteral("to"));
lay->addWidget(toMimeType, 0, 3);
......@@ -47,7 +47,7 @@ QWidget *SieveActionConvert::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("Parameters:"));
lay->addWidget(lab, 1, 0);
auto *params = new SelectConvertParameterWidget;
auto params = new SelectConvertParameterWidget;
connect(params, &SelectConvertParameterWidget::valueChanged, this, &SieveActionConvert::valueChanged);
params->setObjectName(QStringLiteral("params"));
lay->addWidget(params, 1, 1, 2, 3);
......@@ -62,10 +62,10 @@ void SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget
const QStringRef tagName = element.name();
if (tagName == QLatin1String("str")) {
if (index == 0) {
auto *fromMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("from"));
auto fromMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("from"));
fromMimeType->setCode(element.readElementText(), name(), error);
} else if (index == 1) {
auto *toMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("to"));
auto toMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("to"));
toMimeType->setCode(element.readElementText(), name(), error);
} else {
tooManyArguments(tagName, index, 2, error);
......@@ -73,7 +73,7 @@ void SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget
}
++index;
} else if (tagName == QLatin1String("list")) {
auto *params = w->findChild<SelectConvertParameterWidget *>(QStringLiteral("params"));
auto params = w->findChild<SelectConvertParameterWidget *>(QStringLiteral("params"));
params->setCode(AutoCreateScriptUtil::listValue(element), error);
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......
......@@ -27,11 +27,11 @@ SieveActionDeleteHeader::SieveActionDeleteHeader(SieveEditorGraphicalModeWidget
QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *grid = new QGridLayout;
auto grid = new QGridLayout;
grid->setContentsMargins({});
w->setLayout(grid);
auto *matchType = new SelectMatchTypeComboBox(mSieveGraphicalModeWidget);
auto matchType = new SelectMatchTypeComboBox(mSieveGraphicalModeWidget);
matchType->setObjectName(QStringLiteral("matchtype"));
connect(matchType, &SelectMatchTypeComboBox::valueChanged, this, &SieveActionDeleteHeader::valueChanged);
grid->addWidget(matchType, 0, 0);
......@@ -39,7 +39,7 @@ QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
QLabel *lab = new QLabel(i18n("header:"));
grid->addWidget(lab, 0, 1);
auto *headerEdit = new QLineEdit;
auto headerEdit = new QLineEdit;
headerEdit->setObjectName(QStringLiteral("headeredit"));
connect(headerEdit, &QLineEdit::textChanged, this, &SieveActionDeleteHeader::valueChanged);
grid->addWidget(headerEdit, 0, 2);
......@@ -47,7 +47,7 @@ QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("value:"));
grid->addWidget(lab, 1, 1);
auto *valueEdit = new QLineEdit;
auto valueEdit = new QLineEdit;
valueEdit->setObjectName(QStringLiteral("valueedit"));
connect(valueEdit, &QLineEdit::textChanged, this, &SieveActionDeleteHeader::valueChanged);
grid->addWidget(valueEdit, 1, 2);
......@@ -69,14 +69,14 @@ void SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
element.skipCurrentElement();
return;
} else if (tagName == QLatin1String("tag")) {
auto *combo = w->findChild<SelectMatchTypeComboBox *>(QStringLiteral("matchtype"));
auto combo = w->findChild<SelectMatchTypeComboBox *>(QStringLiteral("matchtype"));
combo->setCode(AutoCreateScriptUtil::tagValueWithCondition(element.readElementText(), isNegative), name(), error);
} else if (tagName == QLatin1String("str")) {
if (index == 0) {
auto *edit = w->findChild<QLineEdit *>(QStringLiteral("headeredit"));
auto edit = w->findChild<QLineEdit *>(QStringLiteral("headeredit"));
edit->setText(element.readElementText());
} else if (index == 1) {
auto *value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
auto value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
value->setText(element.readElementText());
} else {
tooManyArguments(tagName, index, 2, error);
......
......@@ -25,14 +25,14 @@ SieveActionEnclose::SieveActionEnclose(SieveEditorGraphicalModeWidget *sieveGrap
QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *grid = new QGridLayout;
auto grid = new QGridLayout;
grid->setContentsMargins({});
w->setLayout(grid);
QLabel *lab = new QLabel(i18n("Subject:"));
grid->addWidget(lab, 0, 0);
auto *subject = new QLineEdit;
auto subject = new QLineEdit;
subject->setObjectName(QStringLiteral("subject"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionEnclose::valueChanged);
grid->addWidget(subject, 0, 1);
......@@ -40,7 +40,7 @@ QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("headers:"));
grid->addWidget(lab, 1, 0);
auto *headers = new QLineEdit;
auto headers = new QLineEdit;
headers->setObjectName(QStringLiteral("headers"));
connect(headers, &QLineEdit::textChanged, this, &SieveActionEnclose::valueChanged);
grid->addWidget(headers, 1, 1);
......@@ -48,7 +48,7 @@ QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("text:"));
grid->addWidget(lab, 2, 0);
auto *text = new MultiLineEdit;
auto text = new MultiLineEdit;
text->setObjectName(QStringLiteral("text"));
connect(text, &MultiLineEdit::valueChanged, this, &SieveActionEnclose::valueChanged);
grid->addWidget(text, 2, 1);
......@@ -65,13 +65,13 @@ void SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget
if (tagValue == QLatin1String("headers")) {
const QString strValue = AutoCreateScriptUtil::strValue(element);
if (!strValue.isEmpty()) {
auto *subject = w->findChild<QLineEdit *>(QStringLiteral("headers"));
auto subject = w->findChild<QLineEdit *>(QStringLiteral("headers"));
subject->setText(strValue);
}
} else if (tagValue == QLatin1String("subject")) {
const QString strValue = AutoCreateScriptUtil::strValue(element);
if (!strValue.isEmpty()) {
auto *headers = w->findChild<QLineEdit *>(QStringLiteral("subject"));
auto headers = w->findChild<QLineEdit *>(QStringLiteral("subject"));
headers->setText(strValue);
}
} else {
......@@ -79,7 +79,7 @@ void SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionEnclose::setParamWidgetValue unknown tag value:" << tagValue;
}
} else if (tagName == QLatin1String("str")) {
auto *edit = w->findChild<MultiLineEdit *>(QStringLiteral("text"));
auto edit = w->findChild<MultiLineEdit *>(QStringLiteral("text"));
edit->setPlainText(element.readElementText());
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......
......@@ -24,13 +24,13 @@ SieveActionEReject::SieveActionEReject(SieveEditorGraphicalModeWidget *sieveGrap
QWidget *SieveActionEReject::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *lay = new QHBoxLayout;
auto lay = new QHBoxLayout;
lay->setContentsMargins({});
w->setLayout(lay);
QLabel *lab = new QLabel(i18n("text:"));
lay->addWidget(lab);
auto *edit = new MultiLineEdit;
auto edit = new MultiLineEdit;
connect(edit, &MultiLineEdit::textChanged, this, &SieveActionEReject::valueChanged);
edit->setObjectName(QStringLiteral("rejectmessage"));
lay->addWidget(edit);
......@@ -43,7 +43,7 @@ void SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget
const QStringRef tagName = element.name();
if (tagName == QLatin1String("str")) {
const QString tagValue = element.readElementText();
auto *edit = w->findChild<MultiLineEdit *>(QStringLiteral("rejectmessage"));
auto edit = w->findChild<MultiLineEdit *>(QStringLiteral("rejectmessage"));
edit->setPlainText(tagValue);
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......
......@@ -24,14 +24,14 @@ SieveActionExtractText::SieveActionExtractText(SieveEditorGraphicalModeWidget *s
QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *grid = new QGridLayout;
auto grid = new QGridLayout;
grid->setContentsMargins({});
w->setLayout(grid);
QLabel *lab = new QLabel(i18n("Number of characters:"));
grid->addWidget(lab, 0, 0);
auto *nbCharacters = new QSpinBox;
auto nbCharacters = new QSpinBox;
nbCharacters->setMinimum(1);
nbCharacters->setMaximum(99999);
nbCharacters->setObjectName(QStringLiteral("numberOfCharacters"));
......@@ -41,7 +41,7 @@ QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
lab = new QLabel(i18n("Stored in variable name:"));
grid->addWidget(lab, 1, 0);
auto *variableName = new QLineEdit;
auto variableName = new QLineEdit;
connect(variableName, &QLineEdit::textChanged, this, &SieveActionExtractText::valueChanged);
variableName->setObjectName(QStringLiteral("variablename"));
grid->addWidget(variableName, 1, 1);
......@@ -58,10 +58,10 @@ void SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWid
element.skipCurrentElement();
//TODO ?
} else if (tagName == QLatin1String("num")) {
auto *numberOfCharacters = w->findChild<QSpinBox *>(QStringLiteral("numberOfCharacters"));
auto numberOfCharacters = w->findChild<QSpinBox *>(QStringLiteral("numberOfCharacters"));
numberOfCharacters->setValue(element.readElementText().toInt());
} else if (tagName == QLatin1String("str")) {
auto *variableName = w->findChild<QLineEdit *>(QStringLiteral("variablename"));
auto variableName = w->findChild<QLineEdit *>(QStringLiteral("variablename"));
variableName->setText(element.readElementText());
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......
......@@ -51,7 +51,7 @@ void SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
const QString tagValue = element.readElementText();
if (tagValue == QLatin1String("copy")) {
if (mHasCopySupport) {
auto *copy = w->findChild<QCheckBox *>(QStringLiteral("copy"));
auto copy = w->findChild<QCheckBox *>(QStringLiteral("copy"));
copy->setChecked(true);
} else {
error += i18n("Action \"fileinto\" has \"copy\" argument but current server does not support it") + QLatin1Char('\n');
......@@ -59,7 +59,7 @@ void SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
}
} else if (tagValue == QLatin1String("create")) {
if (mHasMailBoxSupport) {
auto *create = w->findChild<QCheckBox *>(QStringLiteral("create"));
auto create = w->findChild<QCheckBox *>(QStringLiteral("create"));
create->setChecked(true);
} else {
serverDoesNotSupportFeatures(QStringLiteral("create"), error);
......@@ -71,7 +71,7 @@ void SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
}
} else if (tagName == QLatin1String("str")) {
const QString tagValue = element.readElementText();
auto *edit = w->findChild<KSieveUi::AbstractMoveImapFolderWidget *>(QStringLiteral("fileintolineedit"));
auto edit = w->findChild<KSieveUi::AbstractMoveImapFolderWidget *>(QStringLiteral("fileintolineedit"));
edit->setText(AutoCreateScriptUtil::protectSlash(tagValue));
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
......@@ -89,7 +89,7 @@ void SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
QWidget *SieveActionFileInto::createParamWidget(QWidget *parent) const
{
QWidget *w = new QWidget(parent);
auto *lay = new QHBoxLayout(w);
auto lay = new QHBoxLayout(w);
lay->setContentsMargins({});
if (mHasCopySupport) {
......
......@@ -48,13 +48,13 @@ QWidget *SieveActionKeep::createParamWidget(QWidget *parent) const
{
if (mHasFlagSupport) {
QWidget *w = new QWidget(parent);
auto *lay = new QHBoxLayout;
auto lay = new QHBoxLayout;
lay->setContentsMargins({});
w->setLayout(lay);
QLabel *addFlags = new QLabel(i18n("Add flags:"));
lay->addWidget(addFlags);
auto *flagsWidget = new SelectFlagsWidget;
auto flagsWidget = new SelectFlagsWidget;