summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@digia.com>2014-10-20 12:17:24 +0200
committerLeena Miettinen <riitta-leena.miettinen@digia.com>2014-10-24 12:00:37 +0200
commit88e7a4f661da166e81171a3188f6290c40a2f748 (patch)
tree2b13078d7aab332552e2b3186535f3a0336b2c7a /src
parentc4430ed02301c456dd591c88049ee22bc7dd9725 (diff)
Doc: QFileDevice and QFile::setPermissions do not manipulate ACLs
Task-number: QTBUG-41271 Change-Id: Id97add8a6fdb7ce59020e833f6dc11744c9aaa7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfile.cpp12
-rw-r--r--src/corelib/io/qfiledevice.cpp5
2 files changed, 15 insertions, 2 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 6fe4c2455b..d3411abf10 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -206,6 +206,13 @@ QAbstractFileEngine *QFilePrivate::engine() const
directory usually is not writable, but it is still possible to
create files in it.
+ Qt's understanding of file permissions is limited, which affects especially
+ the \l QFile::setPermissions() function. On Windows, Qt will set only the
+ legacy read-only flag, and that only when none of the Write* flags are
+ passed. Qt does not manipulate access control lists (ACLs), which makes this
+ function mostly useless for NTFS volumes. It may still be of use for USB
+ sticks that use VFAT file systems. POSIX ACLs are not manipulated, either.
+
\sa QTextStream, QDataStream, QFileInfo, QDir, {The Qt Resource System}
*/
@@ -1063,9 +1070,12 @@ QFile::permissions(const QString &fileName)
/*!
Sets the permissions for the file to the \a permissions specified.
- Returns \c true if successful, or false if the permissions cannot be
+ Returns \c true if successful, or \c false if the permissions cannot be
modified.
+ \warning This function does not manipulate ACLs, which may limit its
+ effectiveness.
+
\sa permissions(), setFileName()
*/
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index 8d1c59e159..598347a56f 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -648,9 +648,12 @@ QFile::Permissions QFileDevice::permissions() const
/*!
Sets the permissions for the file to the \a permissions specified.
- Returns \c true if successful, or false if the permissions cannot be
+ Returns \c true if successful, or \c false if the permissions cannot be
modified.
+ \warning This function does not manipulate ACLs, which may limit its
+ effectiveness.
+
\sa permissions()
*/
bool QFileDevice::setPermissions(Permissions permissions)