diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2009-12-14 21:50:39 +0100 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2009-12-14 21:50:39 +0100 |
commit | 2aaad7137a78b5eaff3d05891e2d830bdd2dae74 (patch) | |
tree | 5de3fa262c1538a70700b37d4917225666ad0a72 /src/walletwidget.cpp | |
parent | rekonq 0.3.21 (diff) | |
download | rekonq-2aaad7137a78b5eaff3d05891e2d830bdd2dae74.tar.xz |
create walletwidget only when necessary
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(); } |