Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 965e63bb authored by Laurent Montel's avatar Laurent Montel 😁

Assign parent directly

parent 53260b8b
......@@ -29,8 +29,7 @@
ConfigureCustomSettingDialog::ConfigureCustomSettingDialog(QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
setWindowTitle(i18n("Add custom rule"));
mCustomSettingWidget = new ConfigureCustomSettingWidget;
......
......@@ -32,8 +32,7 @@
ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout;
setLayout(vbox);
QVBoxLayout *vbox = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Category:"));
lab->setObjectName(QStringLiteral("category_label"));
......
......@@ -33,8 +33,7 @@
CustomDebugSettingsPage::CustomDebugSettingsPage(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *mainLayout = new QHBoxLayout;
setLayout(mainLayout);
QHBoxLayout *mainLayout = new QHBoxLayout(this);
QVBoxLayout *vbox = new QVBoxLayout;
mainLayout->addLayout(vbox);
......
......@@ -27,11 +27,10 @@
EnvironmentSettingsRulesPage::EnvironmentSettingsRulesPage(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QLabel *lab = new QLabel(i18n("Rules:"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Rules:"), this);
lab->setObjectName(QStringLiteral("label"));
mPlainTextEdit = new EnvironmentPlainTextEdit;
mPlainTextEdit = new EnvironmentPlainTextEdit(this);
mPlainTextEdit->setReadOnly(true);
mPlainTextEdit->setObjectName(QStringLiteral("plaintext"));
mainLayout->addWidget(lab);
......
......@@ -30,10 +30,9 @@
KDEApplicationDebugSettingPage::KDEApplicationDebugSettingPage(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mTreeListWidget = new KDEApplicationTreeListWidget;
mTreeListWidget = new KDEApplicationTreeListWidget(this);
mTreeListWidget->setObjectName(QStringLiteral("listwidget"));
mTreeListWidgetSearchLine = new KTreeWidgetSearchLine(this, mTreeListWidget);
......@@ -47,12 +46,12 @@ KDEApplicationDebugSettingPage::KDEApplicationDebugSettingPage(QWidget *parent)
QHBoxLayout *buttonLayout = new QHBoxLayout;
mainLayout->addLayout(buttonLayout);
mEnableDebug = new QPushButton(i18n("Enable All Debug"));
mEnableDebug = new QPushButton(i18n("Enable All Debug"), this);
mEnableDebug->setObjectName(QStringLiteral("selectall"));
buttonLayout->addWidget(mEnableDebug);
connect(mEnableDebug, &QAbstractButton::clicked, this, &KDEApplicationDebugSettingPage::slotSelectAll);
mTurnOffDebug = new QPushButton(i18n("Turn Off Debug"));
mTurnOffDebug = new QPushButton(i18n("Turn Off Debug"), this);
mTurnOffDebug->setObjectName(QStringLiteral("deselectall"));
buttonLayout->addWidget(mTurnOffDebug);
connect(mTurnOffDebug, &QAbstractButton::clicked, this, &KDEApplicationDebugSettingPage::slotDeselectAll);
......
......@@ -46,8 +46,7 @@
KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mCategoryWarning = new CategoryWarning(this);
mCategoryWarning->setObjectName(QStringLiteral("categorywarning"));
......
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