Commit e8f6c72a authored by Nikolai Krasheninnikov's avatar Nikolai Krasheninnikov Committed by Nate Graham
Browse files

Fixed broken SVN Commit dialog.

SVN commit dialog was showing incorrectly because QDialogBox buttons were not attached to the dialog window.
Also fixing memory leak on QDialogButtonBox creating.

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: #dolphin, elvisangelaccio, meven, ngraham

Subscribers: ngraham, meven

Differential Revision:
parent 92eb4b1f
......@@ -315,21 +315,21 @@ void FileViewSvnPlugin::commitFiles()
QDialog dialog(0, Qt::Dialog);
QWidget* boxWidget = new QWidget(&dialog);
QVBoxLayout* boxLayout = new QVBoxLayout(boxWidget);
QVBoxLayout* boxLayout = new QVBoxLayout(&dialog);
boxLayout->addWidget(new QLabel(i18nc("@label", "Description:"),
QPlainTextEdit* editor = new QPlainTextEdit(boxWidget);
QPlainTextEdit* editor = new QPlainTextEdit(&dialog);
dialog.setWindowTitle(i18nc("@title:window", "SVN Commit"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, &dialog);
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
auto okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setText(i18nc("@action:button", "Commit"));
KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"),
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