aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2018-05-16 10:23:05 +0200
committerDavid Schulz <david.schulz@qt.io>2018-05-16 09:51:42 +0000
commit33aaf361388a0178f23f6152c8f2da0be660996f (patch)
tree534d310b824a9ece393cf4343b7ca3858598f957 /src
parent07d3f80b5456d5aa8a0d8b45a4adb70df12f2de2 (diff)
Utils: add hash function for MimeType
Change-Id: I4ba86887a4ed575e4aee0cbe1157254e8cd5abb8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/mimetypes/mimetype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/utils/mimetypes/mimetype.h b/src/libs/utils/mimetypes/mimetype.h
index 8b47696d7d..db17b43700 100644
--- a/src/libs/utils/mimetypes/mimetype.h
+++ b/src/libs/utils/mimetypes/mimetype.h
@@ -121,6 +121,8 @@ protected:
QExplicitlySharedDataPointer<Internal::MimeTypePrivate> d;
};
+inline uint QTCREATOR_UTILS_EXPORT qHash(const MimeType &mime) { return qHash(mime.name()); }
+
} // Utils
//Q_DECLARE_SHARED(Utils::MimeType)
@@ -131,3 +133,4 @@ class QDebug;
QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug debug, const Utils::MimeType &mime);
QT_END_NAMESPACE
#endif
+