tst_QPointer: fix memleak

Benign, but easy to avoid by using automatic storage.

Change-Id: I60a1a2e85d8c1b2d91f3f33973374afae8876340
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2014-10-16 14:19:20 +02:00
parent 9dcc38b566
commit bcda685be9

View File

@ -345,7 +345,8 @@ void tst_QPointer::threadSafety()
void tst_QPointer::qvariantCast()
{
QPointer<QFile> tracking = new QFile;
QFile file;
QPointer<QFile> tracking = &file;
tracking->setObjectName("A test name");
QVariant v = QVariant::fromValue(tracking);