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/qiodevice/tst_qiodevice.cpp | |
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/qiodevice/tst_qiodevice.cpp')
-rw-r--r-- | tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index 5cb532f76b..a76fd4703e 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -71,7 +71,7 @@ void tst_QIODevice::initTestCase() || QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp"))); #endif 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")); } |