Don't add a close button to KMessageWidget

Commit 77a55db9d3 ("Use QDialogButtonBox in KMessageWidget") added a
close button to all our uses of that widget.

As much as I stare at the code I can't figure out why. For now I'll simply
brute-force disable them...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-04 07:44:48 -07:00
parent 77a55db9d3
commit 75c9bcd726

View file

@ -101,7 +101,7 @@ void KMessageWidgetPrivate::createLayout()
button->show();
buttonLayout->addButton(button, QDialogButtonBox::QDialogButtonBox::AcceptRole);
}
buttonLayout->addButton(closeButton, QDialogButtonBox::RejectRole);
//buttonLayout->addButton(closeButton, QDialogButtonBox::RejectRole);
layout->addWidget(buttonLayout, 1, 0, 1, 2, Qt::AlignHCenter | Qt::AlignTop);
} else {
bool closeButtonVisible = closeButton->isVisible();
@ -114,9 +114,9 @@ void KMessageWidgetPrivate::createLayout()
buttonLayout->addButton(button, QDialogButtonBox::QDialogButtonBox::AcceptRole);
}
buttonLayout->addButton(closeButton, QDialogButtonBox::RejectRole);
//buttonLayout->addButton(closeButton, QDialogButtonBox::RejectRole);
// Something gets changed when added to the buttonLayout
closeButton->setVisible(closeButtonVisible);
//closeButton->setVisible(closeButtonVisible);
layout->addWidget(buttonLayout);
};