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

Add missing parent + catch return value

parent c4c2ab27
Pipeline #50170 passed with stage
in 20 minutes and 5 seconds
......@@ -11,6 +11,7 @@
#include "editor/sieveeditorutil.h"
#include "sievescriptblockwidget.h"
#include "widgets/includefilelineedit.h"
#include <Libkdepim/LineEditCatchReturnKey>
#include <KLocalizedString>
#include <QIcon>
......@@ -129,25 +130,26 @@ void SieveIncludeActionWidget::initWidget()
mLayout = new QGridLayout(this);
mLayout->setContentsMargins({});
auto lab = new QLabel(i18n("Include:"));
auto lab = new QLabel(i18n("Include:"), this);
mLayout->addWidget(lab, 1, 0);
mLocation = new SieveIncludeLocation(this);
connect(mLocation, &SieveIncludeLocation::valueChanged, this, &SieveIncludeActionWidget::valueChanged);
mLayout->addWidget(mLocation, 1, 1);
lab = new QLabel(i18n("Name:"));
lab = new QLabel(i18n("Name:"), this);
mLayout->addWidget(lab, 1, 2);
mIncludeFileName = new IncludeFileLineEdit(this);
new KPIM::LineEditCatchReturnKey(mIncludeFileName, this);
mIncludeFileName->setClearButtonEnabled(true);
connect(mIncludeFileName, &QLineEdit::textChanged, this, &SieveIncludeActionWidget::valueChanged);
mLayout->addWidget(mIncludeFileName, 1, 3);
mOptional = new QCheckBox(i18n("Optional"));
mOptional = new QCheckBox(i18n("Optional"), this);
connect(mOptional, &QCheckBox::toggled, this, &SieveIncludeActionWidget::valueChanged);
mLayout->addWidget(mOptional, 1, 4);
mOnce = new QCheckBox(i18n("Once"));
mOnce = new QCheckBox(i18n("Once"), this);
connect(mOnce, &QCheckBox::toggled, this, &SieveIncludeActionWidget::valueChanged);
mLayout->addWidget(mOnce, 1, 5);
......
......@@ -31,7 +31,7 @@ SieveScriptBlockWidget::SieveScriptBlockWidget(SieveEditorGraphicalModeWidget *g
auto topLayout = new QVBoxLayout(this);
topLayout->setContentsMargins({});
mConditions = new QGroupBox(i18n("Conditions"));
mConditions = new QGroupBox(i18n("Conditions"), this);
auto vbox = new QVBoxLayout;
mAllMessageRBtn = new QRadioButton(i18n("Match all messages"), this);
......@@ -59,7 +59,7 @@ SieveScriptBlockWidget::SieveScriptBlockWidget(SieveEditorGraphicalModeWidget *g
topLayout->addWidget(mConditions, 0, Qt::AlignTop);
auto actions = new QGroupBox(i18n("Actions"));
auto actions = new QGroupBox(i18n("Actions"), this);
vbox = new QVBoxLayout;
actions->setLayout(vbox);
mScriptActionLister = new SieveActionWidgetLister(mSieveGraphicalModeWidget, this);
......@@ -70,12 +70,12 @@ SieveScriptBlockWidget::SieveScriptBlockWidget(SieveEditorGraphicalModeWidget *g
auto newBlockLayout = new QHBoxLayout;
auto lab = new QLabel(i18n("Add new block:"));
newBlockLayout->addWidget(lab);
mNewBlockType = new QComboBox;
mNewBlockType = new QComboBox(this);
newBlockLayout->addWidget(mNewBlockType);
mNewBlockType->addItem(i18n("\"elsif\" block"));
mNewBlockType->addItem(i18n("\"else\" block"));
mAddBlockType = new QPushButton;
mAddBlockType = new QPushButton(this);
mAddBlockType->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
mAddBlockType->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
newBlockLayout->addWidget(mAddBlockType);
......
......@@ -6,6 +6,7 @@
#include "moveimapfolderwidget.h"
#include <KLocalizedString>
#include <Libkdepim/LineEditCatchReturnKey>
#include <QHBoxLayout>
#include <QLineEdit>
using namespace KSieveUi;
......@@ -17,6 +18,7 @@ MoveImapFolderWidget::MoveImapFolderWidget(QWidget *parent)
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mLineEdit = new QLineEdit(this);
new KPIM::LineEditCatchReturnKey(mLineEdit, this);
mLineEdit->setObjectName(QStringLiteral("lineedit"));
mLineEdit->setClearButtonEnabled(true);
mLineEdit->setPlaceholderText(i18n("Define Folder"));
......
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