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.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/corelib/io/qstorageinfo.h b/src/corelib/io/qstorageinfo.h
index d25eee1840..3784fe8e47 100644
--- a/src/corelib/io/qstorageinfo.h
+++ b/src/corelib/io/qstorageinfo.h
@@ -5,6 +5,7 @@
#define QSTORAGEINFO_H
#include <QtCore/qbytearray.h>
+#include <QtCore/qcompare.h>
#include <QtCore/qdir.h>
#include <QtCore/qlist.h>
#include <QtCore/qmetatype.h>
@@ -56,18 +57,10 @@ public:
static QStorageInfo root();
private:
+ explicit QStorageInfo(QStorageInfoPrivate &dd);
friend class QStorageInfoPrivate;
- 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 bool comparesEqual(const QStorageInfo &lhs, const QStorageInfo &rhs);
+ Q_DECLARE_EQUALITY_COMPARABLE(QStorageInfo)
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QStorageInfo &);
QExplicitlySharedDataPointer<QStorageInfoPrivate> d;