diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2011-08-09 11:30:03 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-09 12:00:51 +0200 |
commit | ad9f5c7e938b1d80b455acdfd0809448f2b5e1db (patch) | |
tree | aebaf4392689880196a264015177cdd6e65cf8b5 /src/corelib/io/qfileinfo.cpp | |
parent | 92d88e475518b9f34dd068803d439892bdeaba9a (diff) |
Remove all non-const operator==
We had to leave the non-const operator== for binary compatibility.
Remove them all, just leave the const version in there. 100% source
compatible.
Change-Id: Ib7a70fb441fe51d5164d9cbf495cbeda0f48fafe
Reviewed-on: http://codereview.qt.nokia.com/2773
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Diffstat (limited to 'src/corelib/io/qfileinfo.cpp')
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index f54818e0a6..c83c39195a 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -366,7 +366,7 @@ QFileInfo::~QFileInfo() } /*! - \fn bool QFileInfo::operator!=(const QFileInfo &fileinfo) + \fn bool QFileInfo::operator!=(const QFileInfo &fileinfo) const Returns true if this QFileInfo object refers to a different file than the one specified by \a fileinfo; otherwise returns false. @@ -380,7 +380,19 @@ QFileInfo::~QFileInfo() */ /*! - \overload + Returns true if this QFileInfo object refers to a file in the same + location as \a fileinfo; otherwise returns false. + + Note that the result of comparing two empty QFileInfo objects, + containing no file references, is undefined. + + \warning This will not compare two different symbolic links + pointing to the same file. + + \warning Long and short file names that refer to the same file on Windows + are treated as if they referred to different files. + + \sa operator!=() */ bool QFileInfo::operator==(const QFileInfo &fileinfo) const { @@ -410,26 +422,6 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const } /*! - Returns true if this QFileInfo object refers to a file in the same - location as \a fileinfo; otherwise returns false. - - Note that the result of comparing two empty QFileInfo objects, - containing no file references, is undefined. - - \warning This will not compare two different symbolic links - pointing to the same file. - - \warning Long and short file names that refer to the same file on Windows - are treated as if they referred to different files. - - \sa operator!=() -*/ -bool QFileInfo::operator==(const QFileInfo &fileinfo) -{ - return const_cast<const QFileInfo *>(this)->operator==(fileinfo); -} - -/*! Makes a copy of the given \a fileinfo and assigns it to this QFileInfo. */ QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo) |