diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-01-21 09:28:41 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-21 22:19:21 (GMT) |
commit | 9b40f9dffff0d34362aa12d62fd8c470357e2837 (patch) | |
tree | c3e89f3426c91779837036db6a1d0205700ce6a2 /tests | |
parent | 5f0c513f919a8d0a539fca4b5eb50ce125af8514 (diff) | |
download | Qt-9b40f9dffff0d34362aa12d62fd8c470357e2837.zip Qt-9b40f9dffff0d34362aa12d62fd8c470357e2837.tar.gz Qt-9b40f9dffff0d34362aa12d62fd8c470357e2837.tar.bz2 |
Fix temporary file leak in tst_qfileinfo.
Change-Id: I0d679638d5a9564f612ae5e70717f164b74aefb0
Reviewed-by: David Faure (KDE) <faure@kde.org>
(cherry picked from qtbase/52e14e05fa83f19f64cedda2291b3a055bdead06)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 42c5fcf..681b665 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -255,10 +255,9 @@ static QFileInfoPrivate* getPrivate(QFileInfo &info) void tst_QFileInfo::copy() { - QTemporaryFile *t; - t = new QTemporaryFile; - t->open(); - QFileInfo info(t->fileName()); + QTemporaryFile t; + t.open(); + QFileInfo info(t.fileName()); QVERIFY(info.exists()); //copy constructor |