summaryrefslogtreecommitdiff
path: root/src/walletwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-12-15 16:15:38 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-12-15 16:15:38 +0100
commit387984c5373c31957dd3302a92b1052918c0f734 (patch)
tree9ff44376dc508d4a528b415ac27f25c9e43ebc32 /src/walletwidget.cpp
parentSimpler web classes (but no more friends :) (diff)
parentcreate walletwidget only when necessary (diff)
downloadrekonq-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.cpp12
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();
}