summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-03-28 10:06:58 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2022-03-29 14:52:16 +0200
commit81dfb46bd381cbb0d5d1071c418846ab3ed97a9a (patch)
treeb6e4051f04f463d000320008f39c0c169fda7407
parentde5fb62f32cfd8585cf9d038bf95daa806070a4a (diff)
downloadqtwebengine-81dfb46bd381cbb0d5d1071c418846ab3ed97a9a.tar.gz
QPdfDocument: replace QScopedPointer with std::unique_ptr
As suggested by the warning, because take() is deprecated. Change-Id: Ib7372ee6119cc0bb07380e49f94b16e2993f353a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/pdf/qpdfdocument.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp
index 724bb02f0..2f8683b59 100644
--- a/src/pdf/qpdfdocument.cpp
+++ b/src/pdf/qpdfdocument.cpp
@@ -493,12 +493,12 @@ QPdfDocument::DocumentError QPdfDocument::load(const QString &fileName)
d->setStatus(QPdfDocument::Loading);
- QScopedPointer<QFile> f(new QFile(fileName));
+ std::unique_ptr<QFile> f(new QFile(fileName));
if (!f->open(QIODevice::ReadOnly)) {
d->lastError = FileNotFoundError;
d->setStatus(QPdfDocument::Error);
} else {
- d->load(f.take(), /*transfer ownership*/true);
+ d->load(f.release(), /*transfer ownership*/true);
}
return d->lastError;
}