summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstorageinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qstorageinfo.h')
-rw-r--r--src/corelib/io/qstorageinfo.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/corelib/io/qstorageinfo.h b/src/corelib/io/qstorageinfo.h
index ec95ea3b23..d441915a9e 100644
--- a/src/corelib/io/qstorageinfo.h
+++ b/src/corelib/io/qstorageinfo.h
@@ -93,23 +93,22 @@ public:
private:
friend class QStorageInfoPrivate;
- friend bool operator==(const QStorageInfo &first, const QStorageInfo &second);
+ friend inline bool operator==(const QStorageInfo &first, const QStorageInfo &second)
+ {
+ if (first.d == second.d)
+ return true;
+ return first.device() == second.device() && first.rootPath() == second.rootPath();
+ }
+
+ friend inline bool operator!=(const QStorageInfo &first, const QStorageInfo &second)
+ {
+ return !(first == second);
+ }
+
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QStorageInfo &);
QExplicitlySharedDataPointer<QStorageInfoPrivate> d;
};
-inline bool operator==(const QStorageInfo &first, const QStorageInfo &second)
-{
- if (first.d == second.d)
- return true;
- return first.device() == second.device() && first.rootPath() == second.rootPath();
-}
-
-inline bool operator!=(const QStorageInfo &first, const QStorageInfo &second)
-{
- return !(first == second);
-}
-
inline bool QStorageInfo::isRoot() const
{ return *this == QStorageInfo::root(); }