summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 13:00:36 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 13:00:36 +0100
commit2eb26c170920d28213b71e549d5dac4663febb14 (patch)
tree8df5223ac114d758c2112a8fc787992175556418 /src/corelib/io
parent49ddae28e0dcd1c59dd5d742cffedd5290d1224a (diff)
parent81998b4e8e440076bd22a9164f0a93481c0e597a (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfile.cpp12
-rw-r--r--src/corelib/io/qfiledevice.cpp5
-rw-r--r--src/corelib/io/qloggingcategory.cpp23
3 files changed, 28 insertions, 12 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)
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 37503e032c..fef48a9040 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -61,13 +61,15 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\brief The QLoggingCategory class represents a category, or 'area' in the
logging infrastructure.
- QLoggingCategory represents a certain logging category - identified
- by a string - at runtime. Whether a category should be actually logged or
- not can be checked with the \l isEnabled() methods.
+ QLoggingCategory represents a certain logging category - identified by a
+ string - at runtime. A category can be configured to enable or disable
+ logging of messages per message type. Whether a message type is enabled or
+ not can be checked with the \l isDebugEnabled(), \l isWarningEnabled(), and
+ \l isCriticalEnabled() methods.
All objects are meant to be configured by a common registry (see also
\l{Configuring Categories}). Different objects can also represent the same
- category. It's therefore not recommended to export objects across module
+ category. It is therefore not recommended to export objects across module
boundaries, nor to manipulate the objects directly, nor to inherit from
QLoggingCategory.
@@ -110,8 +112,9 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\section2 Logging Rules
- Logging rules allow to enable or disable logging for categories in a flexible
- way. Rules are specified in text, where every line must have the format
+ Logging rules allow logging for categories to be enabled or disabled in a
+ flexible way. Rules are specified in text, where every line must have the
+ format
\code
<category>[.<type>] = true|false
@@ -120,12 +123,12 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\c <category> is the name of the category, potentially with \c{*} as a
wildcard symbol as the first or last character (or at both positions).
The optional \c <type> must be either \c debug, \c warning, or \c critical.
- Lines that do not fit to his scheme are ignored.
+ Lines that do not fit this scheme are ignored.
Rules are evaluated in text order, from first to last. That is, if two rules
apply to a category/type, the rule that comes later is applied.
- Rules can be set via \l setFilterRules(). Since Qt 5.3 logging rules can also
+ Rules can be set via \l setFilterRules(). Since Qt 5.3, logging rules can also
be set in the \c QT_LOGGING_RULES environment variable, and
are automatically loaded from the \c [Rules] section of a logging
configuration file. Such configuration files are looked up in the QtProject
@@ -168,13 +171,13 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
\section2 Installing a Custom Filter
- As a lower-level alternative to the text rules you can also implement a
+ As a lower-level alternative to the text rules, you can also implement a
custom filter via \l installFilter(). All filter rules are ignored in this
case.
\section1 Printing the Category
- Use the \c %{category} place holder to print the category in the default
+ Use the \c %{category} placeholder to print the category in the default
message handler:
\snippet qloggingcategory/main.cpp 3