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 7a4a040d authored by Laurent Montel's avatar Laurent Montel 😁

Add parent

parent eb4fdc04
......@@ -50,7 +50,7 @@ public:
label->setFont(font);
label->setTextFormat(Qt::PlainText);
lay->addWidget(label);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
okButton->setText(i18nc("@action:button", "Insert"));
......
......@@ -35,14 +35,13 @@ public:
InsertImageDialogPrivate(InsertImageDialog *qq)
: q(qq)
{
QVBoxLayout *vbox = new QVBoxLayout;
q->setLayout(vbox);
QVBoxLayout *vbox = new QVBoxLayout(q);
q->setWindowTitle(i18n("Insert Image"));
imageWidget = new InsertImageWidget(q);
vbox->addWidget(imageWidget);
q->connect(imageWidget, &InsertImageWidget::enableButtonOk, q, [this](bool b) { _k_slotEnabledButtonChanged(b); });
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setText(i18n("Insert"));
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
......@@ -37,16 +37,15 @@ public:
: q(qq)
{
q->setWindowTitle(i18n("Insert Table"));
QVBoxLayout *mainLayout = new QVBoxLayout;
q->setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(q);
insertTableWidget = new InsertTableWidget;
insertTableWidget = new InsertTableWidget(q);
mainLayout->addWidget(insertTableWidget);
KSeparator *sep = new KSeparator;
KSeparator *sep = new KSeparator(q);
mainLayout->addWidget(sep);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setText(i18n("Insert"));
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
......@@ -41,7 +41,7 @@ public:
q, &SelectSpecialCharDialog::charSelected);
lay->addWidget(mCharSelect);
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
QPushButton *okButton = mButtonBox->button(QDialogButtonBox::Ok);
okButton->setText(i18n("Insert"));
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
......@@ -69,7 +69,7 @@ public:
backgroundColor->setEnabled(false);
q->connect(useBackgroundColor, &QCheckBox::toggled, backgroundColor, &KColorButton::setEnabled);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
buttonBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL | Qt::Key_Return);
q->connect(buttonBox, &QDialogButtonBox::accepted, q, &QDialog::accept);
q->connect(buttonBox, &QDialogButtonBox::rejected, q, &QDialog::reject);
......
......@@ -42,8 +42,7 @@ public:
: q(qq)
{
q->setWindowTitle(i18n("Table Format"));
QVBoxLayout *mainLayout = new QVBoxLayout;
q->setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(q);
QWidget *page = new QWidget(q);
QVBoxLayout *lay = new QVBoxLayout(page);
......@@ -106,7 +105,7 @@ public:
lay->addWidget(sep);
backgroundColor->setEnabled(false);
q->connect(useBackgroundColor, &QCheckBox::toggled, backgroundColor, &KColorButton::setEnabled);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, q);
connect(buttonBox, &QDialogButtonBox::accepted, q, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, q, &QDialog::reject);
......
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