From 94cf203f36deb5b46d47197d31b780de5f464937 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 13 Jul 2017 17:19:49 +0200 Subject: Use QSharedPointer::create() more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/corelib/io/largefile/tst_largefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/corelib/io/largefile/tst_largefile.cpp') 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(new QTemporaryDir); + m_tempDir = QSharedPointer::create(); QVERIFY2(!m_tempDir.isNull(), qPrintable("Could not create temporary directory.")); QVERIFY2(QDir::setCurrent(m_tempDir->path()), qPrintable("Could not switch current directory")); -- cgit v1.2.3