summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-25 23:42:45 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-28 12:16:22 +0000
commit186bdec01a62dcc407e21873a6c6a0c484d5df62 (patch)
tree80ed8b5293ba2ec649c4109fccc2e81869e0b7ea /src/corelib/io/qdir_p.h
parent80d7ba4c49a6e1c9651695719d84e3952898f1d5 (diff)
Standardize on unique_ptr to hold QAbstractFileEngine
This will make it possible to return it from functions in an owner, as exemplified in the QFileInfoPrivate ctor, unlike QScopedPointer, which lacks move special member functions. Change-Id: I179ffa4f656e1b83c23e0f67d1542834460ff382 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qdir_p.h')
-rw-r--r--src/corelib/io/qdir_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/io/qdir_p.h b/src/corelib/io/qdir_p.h
index 42218e1ccf..af105de8db 100644
--- a/src/corelib/io/qdir_p.h
+++ b/src/corelib/io/qdir_p.h
@@ -54,6 +54,8 @@
#include "qfilesystementry_p.h"
#include "qfilesystemmetadata_p.h"
+#include <memory>
+
QT_BEGIN_NAMESPACE
class QDirPrivate : public QSharedData
@@ -98,7 +100,7 @@ public:
QDir::SortFlags sort;
QDir::Filters filters;
- QScopedPointer<QAbstractFileEngine> fileEngine;
+ std::unique_ptr<QAbstractFileEngine> fileEngine;
QFileSystemEntry dirEntry;
mutable QFileSystemEntry absoluteDirEntry;