diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-04 22:30:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-04 22:31:52 -0700 |
commit | eca96ee8b7cb59bad69569dee1cbee9c4cafe6bb (patch) | |
tree | c51b56de526e9d815566983562e1384a47186a98 /qt-ui/kmessagewidget.cpp | |
parent | 3fd8e50044c76143d5d401c5274e03bff498a713 (diff) | |
download | subsurface-eca96ee8b7cb59bad69569dee1cbee9c4cafe6bb.tar.gz |
Revert two incorrect commits
Revert "Don't add a close button to KMessageWidget"
This reverts commit 75c9bcd72668f5b5524e29291cce2a908fddcdaa.
Revert "Remove unused variable"
This reverts commit 9edee3477a1fa3945717512e591f30af9c3ca468.
I was fixing the wrong problem... instead of removing the handling of the
Close button I should have figured out why the close button was
incorrectly shown in the first place.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/kmessagewidget.cpp')
-rw-r--r-- | qt-ui/kmessagewidget.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/kmessagewidget.cpp b/qt-ui/kmessagewidget.cpp index 017fa1085..e03d10c75 100644 --- a/qt-ui/kmessagewidget.cpp +++ b/qt-ui/kmessagewidget.cpp @@ -101,9 +101,10 @@ 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(); QHBoxLayout *layout = new QHBoxLayout(content); layout->addWidget(iconLabel); layout->addWidget(textLabel); @@ -113,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); }; |