diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-10 11:39:34 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-11 09:44:39 +0200 |
commit | a0ed019e4ccb7505d10fc5977bc4b52b677cc8f5 (patch) | |
tree | 33936e7c4217ef1bdad67ea7561fb0456e88aa4e | |
parent | bed3d7b000a0ce84523fa79ab29731716bb8ed3b (diff) |
AssimpIOSystem: use std::unique_ptr instead of QScopedPointer
... because QScopedPointer::take() is deprecated.
Task-number: QTBUG-105513
Pick-to: 6.4 6.3 6.2
Change-Id: I494088950a3f6791a6512ecbf230cd1d85ad7395
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | src/plugins/sceneparsers/assimp/assimphelpers.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimphelpers.cpp b/src/plugins/sceneparsers/assimp/assimphelpers.cpp index 2b9639cf0..58b429959 100644 --- a/src/plugins/sceneparsers/assimp/assimphelpers.cpp +++ b/src/plugins/sceneparsers/assimp/assimphelpers.cpp @@ -9,6 +9,8 @@ #include <QtCore/QDir> #include <QtCore/QDebug> +#include <memory> + QT_BEGIN_NAMESPACE namespace Qt3DRender { @@ -172,9 +174,9 @@ Assimp::IOStream *AssimpIOSystem::Open(const char *pFile, const char *pMode) const QLatin1String cleanedMode = QLatin1String{pMode}.trimmed(); if (const QIODevice::OpenMode openMode = openModeFromText(cleanedMode.data())) { - QScopedPointer<QFile> file(new QFile(fileName)); + auto file = std::make_unique<QFile>(fileName); if (file->open(openMode)) - return new AssimpIOStream(file.take()); + return new AssimpIOStream(file.release()); } return nullptr; } |