summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 10:11:49 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 12:48:52 +0200
commit04d0a9626ce61b2e05a40f9562c2bcf12e234639 (patch)
treef1643f829aedc9ac51fcc260f7df2639dfe08360 /src/corelib/io
parent17f3451daa286b88a52f18c802d7b158dfb653b2 (diff)
parentbdc417b3828737334723eae23097c85f70c23a33 (diff)
Merge branch 'master' into refactor
Conflicts: src/gui/kernel/qapplication_qpa.cpp src/gui/kernel/qcursor_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.h src/gui/kernel/qwindowsysteminterface_qpa_p.h src/gui/text/qtextcontrol.cpp src/plugins/platforms/wayland/wayland.pro src/widgets/accessible/qaccessible2.h src/widgets/widgets/qwidgetlinecontrol_p.h Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfileinfo.cpp36
-rw-r--r--src/corelib/io/qfileinfo.h2
2 files changed, 14 insertions, 24 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)
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index 6ca0ae79e0..ab3d2dc847 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -75,9 +75,7 @@ public:
inline QFileInfo&operator=(QFileInfo &&other)
{ qSwap(d_ptr, other.d_ptr); return *this; }
#endif
- bool operator==(const QFileInfo &fileinfo); // 5.0 - remove me
bool operator==(const QFileInfo &fileinfo) const;
- inline bool operator!=(const QFileInfo &fileinfo) { return !(operator==(fileinfo)); } // 5.0 - remove me
inline bool operator!=(const QFileInfo &fileinfo) const { return !(operator==(fileinfo)); }
void setFile(const QString &file);