diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-07-13 17:19:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-07-19 13:40:42 +0000 |
commit | 94cf203f36deb5b46d47197d31b780de5f464937 (patch) | |
tree | 7c66536f8fa075ed72b5aa3cf8fc208488a17779 /tests/auto/corelib/io/largefile | |
parent | ad68bf51e79f52c1ffa597b76edaecadafddbd06 (diff) |
Use QSharedPointer::create() more
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes:
- tst_qsharedpointer.cpp: not sure we want these replacements there
(→ separate change)
- tst_collations.cpp: hit in a template specialization that is
instantiated with both QSharedPointer and QSharedDataPointer.
Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/largefile')
-rw-r--r-- | tests/auto/corelib/io/largefile/tst_largefile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index 99e1d5a32f..5975303ca6 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -228,7 +228,7 @@ QByteArray const &tst_LargeFile::getDataBlock(int index, qint64 position) void tst_LargeFile::initTestCase() { m_previousCurrent = QDir::currentPath(); - m_tempDir = QSharedPointer<QTemporaryDir>(new QTemporaryDir); + m_tempDir = QSharedPointer<QTemporaryDir>::create(); QVERIFY2(!m_tempDir.isNull(), qPrintable("Could not create temporary directory.")); QVERIFY2(QDir::setCurrent(m_tempDir->path()), qPrintable("Could not switch current directory")); |