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

Catch return key. + add missing widget parent

parent 6f11b97b
Pipeline #50169 passed with stage
in 20 minutes and 26 seconds
......@@ -6,6 +6,7 @@
#include "sieveactionaddheader.h"
#include "autocreatescripts/autocreatescriptutil_p.h"
#include "widgets/selectaddheaderpositioncombobox.h"
#include <Libkdepim/LineEditCatchReturnKey>
#include <KLocalizedString>
#include <QLineEdit>
......@@ -40,6 +41,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 1);
auto headerEdit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(headerEdit, w);
connect(headerEdit, &QLineEdit::textChanged, this, &SieveActionAddHeader::valueChanged);
headerEdit->setObjectName(QStringLiteral("headeredit"));
grid->addWidget(headerEdit, 0, 2);
......@@ -48,6 +50,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 1);
auto valueEdit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(valueEdit, w);
connect(valueEdit, &QLineEdit::textChanged, this, &SieveActionAddHeader::valueChanged);
valueEdit->setObjectName(QStringLiteral("valueedit"));
grid->addWidget(valueEdit, 1, 2);
......
......@@ -8,6 +8,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -32,6 +33,7 @@ QWidget *SieveActionBreak::createParamWidget(QWidget *parent) const
lay->addWidget(lab);
auto subject = new QLineEdit;
new KPIM::LineEditCatchReturnKey(subject, w);
subject->setObjectName(QStringLiteral("name"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionBreak::valueChanged);
lay->addWidget(subject);
......
......@@ -9,6 +9,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -40,6 +41,7 @@ QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 1);
auto headerEdit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(headerEdit, w);
headerEdit->setObjectName(QStringLiteral("headeredit"));
connect(headerEdit, &QLineEdit::textChanged, this, &SieveActionDeleteHeader::valueChanged);
grid->addWidget(headerEdit, 0, 2);
......@@ -48,6 +50,7 @@ QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 1);
auto valueEdit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(valueEdit, w);
valueEdit->setObjectName(QStringLiteral("valueedit"));
connect(valueEdit, &QLineEdit::textChanged, this, &SieveActionDeleteHeader::valueChanged);
grid->addWidget(valueEdit, 1, 2);
......
......@@ -9,6 +9,7 @@
#include "widgets/multilineedit.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -33,6 +34,7 @@ QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 0);
auto subject = new QLineEdit;
new KPIM::LineEditCatchReturnKey(subject, w);
subject->setObjectName(QStringLiteral("subject"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionEnclose::valueChanged);
grid->addWidget(subject, 0, 1);
......@@ -41,6 +43,7 @@ QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto headers = new QLineEdit;
new KPIM::LineEditCatchReturnKey(headers, w);
headers->setObjectName(QStringLiteral("headers"));
connect(headers, &QLineEdit::textChanged, this, &SieveActionEnclose::valueChanged);
grid->addWidget(headers, 1, 1);
......
......@@ -7,6 +7,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -42,6 +43,7 @@ QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto variableName = new QLineEdit;
new KPIM::LineEditCatchReturnKey(variableName, w);
connect(variableName, &QLineEdit::textChanged, this, &SieveActionExtractText::valueChanged);
variableName->setObjectName(QStringLiteral("variablename"));
grid->addWidget(variableName, 1, 1);
......
......@@ -9,6 +9,7 @@
#include "widgets/selectimportancecombobox.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -39,6 +40,7 @@ QWidget *SieveActionNotify::createParamWidget(QWidget *parent) const
lay->addWidget(lab);
auto message = new QLineEdit;
new KPIM::LineEditCatchReturnKey(message, w);
message->setObjectName(QStringLiteral("message"));
connect(message, &QLineEdit::textChanged, this, &SieveActionNotify::valueChanged);
lay->addWidget(message);
......@@ -47,6 +49,7 @@ QWidget *SieveActionNotify::createParamWidget(QWidget *parent) const
lay->addWidget(lab);
auto method = new QLineEdit;
new KPIM::LineEditCatchReturnKey(method, w);
method->setObjectName(QStringLiteral("method"));
lay->addWidget(method);
connect(method, &QLineEdit::textChanged, this, &SieveActionNotify::valueChanged);
......
......@@ -9,6 +9,7 @@
#include "widgets/multilineedit.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -35,6 +36,7 @@ QWidget *SieveActionReplace::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 0);
auto subject = new QLineEdit;
new KPIM::LineEditCatchReturnKey(subject, w);
subject->setObjectName(QStringLiteral("subject"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionReplace::valueChanged);
grid->addWidget(subject, 0, 1);
......
......@@ -10,6 +10,7 @@
#include "widgets/selectvariablemodifiercombobox.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -48,6 +49,7 @@ QWidget *SieveActionSetVariable::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto value = new QLineEdit;
new KPIM::LineEditCatchReturnKey(value, w);
value->setObjectName(QStringLiteral("value"));
connect(value, &QLineEdit::textChanged, this, &SieveActionSetVariable::valueChanged);
grid->addWidget(value, 1, 1);
......@@ -56,6 +58,7 @@ QWidget *SieveActionSetVariable::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 2, 0);
auto variable = new QLineEdit;
new KPIM::LineEditCatchReturnKey(variable, w);
variable->setObjectName(QStringLiteral("variable"));
connect(variable, &QLineEdit::textChanged, this, &SieveActionSetVariable::valueChanged);
grid->addWidget(variable, 2, 1);
......
......@@ -11,6 +11,7 @@
#include "widgets/selectvacationcombobox.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -57,6 +58,7 @@ QWidget *SieveActionVacation::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto subject = new QLineEdit;
new KPIM::LineEditCatchReturnKey(subject, w);
subject->setObjectName(QStringLiteral("subject"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionVacation::valueChanged);
grid->addWidget(subject, 1, 1);
......
......@@ -6,6 +6,7 @@
#include "addresslineedit.h"
#include <KColorScheme>
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QHBoxLayout>
using namespace KSieveUi;
......@@ -16,6 +17,7 @@ AddressLineEdit::AddressLineEdit(QWidget *parent)
auto mainLayout = new QHBoxLayout(this);
mainLayout->setContentsMargins({});
mLineEdit = new QLineEdit(this);
new KPIM::LineEditCatchReturnKey(mLineEdit, this);
mainLayout->addWidget(mLineEdit);
mLineEdit->setClearButtonEnabled(true);
mLineEdit->setPlaceholderText(i18n("Define Email Address..."));
......
......@@ -9,6 +9,7 @@
#include <KConfigGroup>
#include <KLocalizedString>
#include <KSharedConfig>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include <QDialogButtonBox>
......@@ -130,6 +131,7 @@ SelectFlagsWidget::SelectFlagsWidget(QWidget *parent)
auto lay = new QHBoxLayout(this);
lay->setContentsMargins({});
mEdit = new QLineEdit(this);
new KPIM::LineEditCatchReturnKey(mEdit, this);
mEdit->setReadOnly(true);
mEdit->setPlaceholderText(i18n("Click on button for selecting flags..."));
connect(mEdit, &QLineEdit::textChanged, this, &SelectFlagsWidget::valueChanged);
......
......@@ -10,6 +10,7 @@
#include "widgets/selectdatewidget.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -42,6 +43,7 @@ QWidget *SieveConditionDate::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 0);
auto header = new QLineEdit;
new KPIM::LineEditCatchReturnKey(header, w);
connect(header, &QLineEdit::textChanged, this, &SieveConditionDate::valueChanged);
header->setObjectName(QStringLiteral("header"));
grid->addWidget(header, 0, 1);
......
......@@ -8,6 +8,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -33,6 +34,7 @@ QWidget *SieveConditionEnvironment::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 0);
auto item = new QLineEdit;
new KPIM::LineEditCatchReturnKey(item, w);
QStringList itemList;
itemList << QStringLiteral("domain") << QStringLiteral("host") << QStringLiteral("location") << QStringLiteral("name") << QStringLiteral("phase")
<< QStringLiteral("remote-host") << QStringLiteral("remote-ip") << QStringLiteral("version");
......@@ -48,6 +50,7 @@ QWidget *SieveConditionEnvironment::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto value = new QLineEdit;
new KPIM::LineEditCatchReturnKey(value, w);
connect(value, &QLineEdit::textChanged, this, &SieveConditionEnvironment::valueChanged);
value->setObjectName(QStringLiteral("value"));
grid->addWidget(value, 1, 1);
......
......@@ -10,6 +10,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -46,6 +47,7 @@ QWidget *SieveConditionHasFlag::createParamWidget(QWidget *parent) const
grid->addWidget(lab, row, 0);
auto variableName = new QLineEdit;
new KPIM::LineEditCatchReturnKey(variableName, w);
variableName->setObjectName(QStringLiteral("variablename"));
connect(variableName, &QLineEdit::textChanged, this, &SieveConditionHasFlag::valueChanged);
grid->addWidget(variableName, row, 1);
......
......@@ -8,6 +8,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -29,6 +30,7 @@ QWidget *SieveConditionIhave::createParamWidget(QWidget *parent) const
w->setLayout(lay);
auto edit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(edit, w);
connect(edit, &QLineEdit::textChanged, this, &SieveConditionIhave::valueChanged);
edit->setPlaceholderText(i18n("Use \",\" to separate capabilities"));
edit->setClearButtonEnabled(true);
......
......@@ -7,6 +7,7 @@
#include "autocreatescripts/autocreatescriptutil_p.h"
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -28,6 +29,7 @@ QWidget *SieveConditionMailboxExists::createParamWidget(QWidget *parent) const
w->setLayout(lay);
auto edit = new QLineEdit;
new KPIM::LineEditCatchReturnKey(edit, w);
connect(edit, &QLineEdit::textChanged, this, &SieveConditionMailboxExists::valueChanged);
edit->setClearButtonEnabled(true);
lay->addWidget(edit);
......
......@@ -13,6 +13,7 @@
#include "libksieve_debug.h"
#include <KSieveUi/AbstractMoveImapFolderWidget>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QHBoxLayout>
#include <QLabel>
#include <QWidget>
......@@ -54,6 +55,7 @@ QWidget *SieveConditionMetaData::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto annotation = new QLineEdit;
new KPIM::LineEditCatchReturnKey(annotation, w);
connect(annotation, &QLineEdit::textChanged, this, &SieveConditionMetaData::valueChanged);
annotation->setObjectName(QStringLiteral("annotation"));
grid->addWidget(annotation, 1, 1);
......
......@@ -12,6 +12,7 @@
#include "libksieve_debug.h"
#include <KSieveUi/AbstractMoveImapFolderWidget>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QGridLayout>
#include <QLabel>
#include <QXmlStreamReader>
......@@ -42,6 +43,7 @@ QWidget *SieveConditionMetaDataExists::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto value = new QLineEdit;
new KPIM::LineEditCatchReturnKey(value, w);
connect(value, &QLineEdit::textChanged, this, &SieveConditionMetaDataExists::valueChanged);
value->setObjectName(QStringLiteral("value"));
grid->addWidget(value, 1, 1);
......
......@@ -9,6 +9,7 @@
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -43,6 +44,7 @@ QWidget *SieveConditionServerMetaData::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 0, 0);
auto mailbox = new QLineEdit;
new KPIM::LineEditCatchReturnKey(mailbox, w);
mailbox->setObjectName(QStringLiteral("mailbox"));
connect(mailbox, &QLineEdit::textChanged, this, &SieveConditionServerMetaData::valueChanged);
grid->addWidget(mailbox, 0, 1);
......@@ -51,6 +53,7 @@ QWidget *SieveConditionServerMetaData::createParamWidget(QWidget *parent) const
grid->addWidget(lab, 1, 0);
auto annotation = new QLineEdit;
new KPIM::LineEditCatchReturnKey(annotation, w);
connect(annotation, &QLineEdit::textChanged, this, &SieveConditionServerMetaData::valueChanged);
annotation->setObjectName(QStringLiteral("annotation"));
grid->addWidget(annotation, 1, 1);
......
......@@ -7,6 +7,7 @@
#include "autocreatescripts/autocreatescriptutil_p.h"
#include "editor/sieveeditorutil.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QLineEdit>
#include "libksieve_debug.h"
......@@ -31,6 +32,7 @@ QWidget *SieveConditionServerMetaDataExists::createParamWidget(QWidget *parent)
lay->addWidget(lab);
auto value = new QLineEdit;
new KPIM::LineEditCatchReturnKey(value, w);
value->setObjectName(QStringLiteral("value"));
connect(value, &QLineEdit::textChanged, this, &SieveConditionServerMetaDataExists::valueChanged);
lay->addWidget(value);
......
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