summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeysequence.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-04-08 19:44:48 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-05-26 17:51:42 +0000
commit10d53a3f0e09ec2ef437619bb1bb0dbb40f7ee8b (patch)
treebb482b1837a3a406089a2fb1f26b3d5e2a5d7461 /src/gui/kernel/qkeysequence.h
parentd1de6c521ea2114b3bb6dbe4a0bb302f0a3db434 (diff)
Add qHash(QKeySequence)
Key sequences can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtGui][QKeySequence] Added qHash(QKeySequence). Change-Id: I3cf896292459897d66198d96dfcdba1a39bdafce Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/kernel/qkeysequence.h')
-rw-r--r--src/gui/kernel/qkeysequence.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index cd7af5718f..e6616dae11 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -43,11 +43,12 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_SHORTCUT
+class QKeySequence;
+
/*****************************************************************************
QKeySequence stream functions
*****************************************************************************/
#ifndef QT_NO_DATASTREAM
-class QKeySequence;
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &out, QKeySequence &ks);
#endif
@@ -59,6 +60,8 @@ void qt_set_sequence_auto_mnemonic(bool b);
class QVariant;
class QKeySequencePrivate;
+Q_GUI_EXPORT Q_DECL_PURE_FUNCTION uint qHash(const QKeySequence &key, uint seed = 0) Q_DECL_NOTHROW;
+
class Q_GUI_EXPORT QKeySequence
{
Q_GADGET
@@ -204,6 +207,7 @@ private:
friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks);
friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &in, QKeySequence &ks);
+ friend Q_GUI_EXPORT uint qHash(const QKeySequence &key, uint seed) Q_DECL_NOTHROW;
friend class QShortcutMap;
friend class QShortcut;