Commit df57c290 authored by Laurent Montel's avatar Laurent Montel
Browse files

Add parent, remove setLayout method

parent 9561f421
Pipeline #205713 passed with stage
in 7 minutes and 3 seconds
......@@ -18,8 +18,7 @@ KigCoordinatePrecisionDialog::KigCoordinatePrecisionDialog(bool isUserSpecified,
ui = new Ui::KigCoordinatePrecisionDialog();
QWidget *mainWidget = new QWidget(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
mainLayout->addWidget( buttonBox );
ui->setupUi(mainWidget);
......
......@@ -27,8 +27,7 @@ EditType::EditType( QWidget* parent, const QString& name, const QString& desc,
setWindowTitle( i18nc("@title:window", "Edit Type") );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Help);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
......
......@@ -26,18 +26,15 @@ HistoryDialog::HistoryDialog( QUndoStack* kch, QWidget* parent )
setWindowTitle( i18nc("@title:window", "History Browser") );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
//PORTING SCRIPT: WARNING mainLayout->addWidget(buttonBox) must be last item in layout. Please move it.
mainLayout->addWidget(buttonBox);
QWidget* main = new QWidget( this );
mwidget = new Ui_HistoryWidget();
mwidget->setupUi( main );
//PORTING: Verify that widget was added to mainLayout setMainWidget( main );
mtotalsteps = mch->count() + 1;
......
Supports Markdown
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