diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-12-15 16:15:38 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-12-15 16:15:38 +0100 |
commit | 387984c5373c31957dd3302a92b1052918c0f734 (patch) | |
tree | 9ff44376dc508d4a528b415ac27f25c9e43ebc32 /src/walletwidget.cpp | |
parent | Simpler web classes (but no more friends :) (diff) | |
parent | create walletwidget only when necessary (diff) | |
download | rekonq-387984c5373c31957dd3302a92b1052918c0f734.tar.xz |
Merge commit 'refs/merge-requests/71' of git://gitorious.org/rekonq/mainline into m71
Diffstat (limited to 'src/walletwidget.cpp')
-rw-r--r-- | src/walletwidget.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/walletwidget.cpp b/src/walletwidget.cpp index 56188c95..156a3ba5 100644 --- a/src/walletwidget.cpp +++ b/src/walletwidget.cpp @@ -59,7 +59,6 @@ WalletWidget::WalletWidget(QWidget *parent) // layout QGridLayout *layout = new QGridLayout(this); - layout->setMargin(0); layout->addWidget(closeButton,0,0); layout->addWidget(m_label,0,1); layout->addWidget(rememberButton,0,2); @@ -79,6 +78,7 @@ WalletWidget::~WalletWidget() void WalletWidget::rememberData() { emit saveFormDataAccepted(m_key); + destroy(); } @@ -92,6 +92,16 @@ void WalletWidget::neverRememberData() void WalletWidget::notNowRememberData() { emit saveFormDataRejected (m_key); + destroy(); +} + +void WalletWidget::destroy() +{ + if (parentWidget() && parentWidget()->layout()) + { + parentWidget()->layout()->removeWidget(this); + } + this->deleteLater(); } |