summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qabstractfileengine.cpp
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-10-22 13:39:52 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-12-04 01:27:08 +0100
commit56e13acf4eaaaff69156faa21d0a560fb93091d5 (patch)
treea455e0092d76561c1583e53356e4bafd690869f5 /src/corelib/io/qabstractfileengine.cpp
parent56bd1b76d2e81c58a80bf6b5d74219c6b1ab8499 (diff)
QAbstractFileEngine: Add permission argument to open()
The new argument allows atomic creation of files with non-default permissions. Task-number: QTBUG-79750 Change-Id: I4c49455b41f924ba87148302c8d0f77f5de0832b Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qabstractfileengine.cpp')
-rw-r--r--src/corelib/io/qabstractfileengine.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 063cee1071..d6b2b6a10e 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -383,10 +383,16 @@ QAbstractFileEngine::~QAbstractFileEngine()
The \a mode is an OR combination of QIODevice::OpenMode and
QIODevice::HandlingMode values.
+
+ If the file is created as a result of this call, its permissions are
+ set according to \a permissision. Null value means an implementation-
+ specific default.
*/
-bool QAbstractFileEngine::open(QIODevice::OpenMode openMode)
+bool QAbstractFileEngine::open(QIODevice::OpenMode openMode,
+ std::optional<QFile::Permissions> permissions)
{
Q_UNUSED(openMode);
+ Q_UNUSED(permissions);
return false;
}