summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@nokia.com>2012-05-22 16:27:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-23 14:18:34 +0200
commitbbafdf58124266db9c4285838f1a300e8afa0371 (patch)
treeb9f35a5c10f667932a117a49058c5baa0ce3aec9 /src/corelib/io
parent318d39ccafc6ca4fa643bbf0b4b10a7d97ff1716 (diff)
Clarified code documentation for QFileInfo::operator==.
QTBUG-4031 mentions that canonicalFilePath() will cause the operator to return true for the following comparison because it returns an empty string if the path is empty or non-existant: QFileInfo("") == QFileInfo("non_existant_file") I'm assuming that the reason for not checking whether one of the files exist is based on performance, and so I've updated the comments for the operator to explicitly state that the result of the above comparison is undefined. Task-number: QTBUG-4031 Change-Id: I9b34f189f1628f9362b3604445706abd2342fd6e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfileinfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index e533511a2b..4973ecb773 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -379,7 +379,8 @@ QFileInfo::~QFileInfo()
location as \a fileinfo; otherwise returns false.
Note that the result of comparing two empty QFileInfo objects,
- containing no file references, is undefined.
+ containing no file references (file paths that do not exist or
+ are empty), is undefined.
\warning This will not compare two different symbolic links
pointing to the same file.