diff options
author | Montel Laurent <montel@kde.org> | 2012-11-12 09:36:55 +0100 |
---|---|---|
committer | Montel Laurent <montel@kde.org> | 2012-11-12 09:36:55 +0100 |
commit | 5ad25d5b64b3959f5b465b507623dd1307bbc23c (patch) | |
tree | cd3eee8224f324a61bf0eabe559fbd0534312d39 | |
parent | SVN_SILENT made messages (.desktop file) (diff) | |
download | rekonq-5ad25d5b64b3959f5b465b507623dd1307bbc23c.tar.xz |
Fix mem leak
-rw-r--r-- | src/webview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 5555eb87..36908017 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -790,7 +790,10 @@ void WebView::spellCheck() return; } - Sonnet::Dialog* spellDialog = new Sonnet::Dialog(new Sonnet::BackgroundChecker(this), this); + Sonnet::BackgroundChecker *backgroundSpellCheck = new Sonnet::BackgroundChecker; + Sonnet::Dialog* spellDialog = new Sonnet::Dialog(backgroundSpellCheck, this); + backgroundSpellCheck->setParent(spellDialog); + spellDialog->setAttribute(Qt::WA_DeleteOnClose, true); spellDialog->showSpellCheckCompletionMessage(true); connect(spellDialog, SIGNAL(replace(QString, int, QString)), this, SLOT(spellCheckerCorrected(QString, int, QString))); |