summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-08-02 09:20:55 (GMT)
committermread <qt-info@nokia.com>2011-08-02 09:25:32 (GMT)
commite3a22e7e91c0231acfaecfd8c2c77131c2930d96 (patch)
treed187595391cfa959e6d712743100782481b9848d /src/gui/dialogs
parent8e2dc4ac2ec35e9b2f57ade5af390c2d44765382 (diff)
downloadQt-e3a22e7e91c0231acfaecfd8c2c77131c2930d96.zip
Qt-e3a22e7e91c0231acfaecfd8c2c77131c2930d96.tar.gz
Qt-e3a22e7e91c0231acfaecfd8c2c77131c2930d96.tar.bz2
Fixed memory leak in QMessageBox::setInformativeText in Symbian
The Symbian implementation of QMessageBox::setInformativeText was taking the text from a QLabel and using it in a QTextBrowser, leaving the QLabel un-parented and therefore leaking. This is fixed by setting the QMessageBox as the QLabel's parent Task-number: QTBUG-20622 Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qmessagebox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index a2f086b..66e7216 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -2486,7 +2486,7 @@ void QMessageBox::setInformativeText(const QString &text)
}
if (!d->informativeLabel) {
- QLabel *label = new QLabel;
+ QLabel *label = new QLabel(this);
label->setObjectName(QLatin1String("qt_msgbox_informativelabel"));
label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this)));
label->setAlignment(Qt::AlignTop | Qt::AlignLeft);