QStateMachine: fix RestorableId exception specification

We're interested in whether qHash(QByteArray) throws, not declval<QByteArray>,
of course.

Change-Id: If3ba6e90aba69d0d4d12ac289e817f0d9705a601
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2015-04-30 10:23:58 +02:00
parent 412eb090c9
commit 009b11c300

View File

@ -210,7 +210,8 @@ public:
QObject *obj;
QByteArray prop;
// two overloads because friends can't have default arguments
friend uint qHash(const RestorableId &key, uint seed) Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<QByteArray>()))
friend uint qHash(const RestorableId &key, uint seed)
Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval<QByteArray>())))
{ return qHash(qMakePair(key.obj, key.prop), seed); }
friend uint qHash(const RestorableId &key) Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(key, 0U)))
{ return qHash(key, 0U); }