QEvent: mark registerEventType() as no-throw
The new implementation using an atomic bit field performs no memory allocations and thus cannot throw anymore. Change-Id: If6a98f307ab4e6a7c3fe3c54763ac0c6d2da4ac0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
90f87fabe8
commit
27ae6ce93b
@ -471,7 +471,7 @@ static inline int registerEventTypeZeroBased(int id) Q_DECL_NOTHROW
|
||||
Returns -1 if all available values are already taken or the
|
||||
program is shutting down.
|
||||
*/
|
||||
int QEvent::registerEventType(int hint)
|
||||
int QEvent::registerEventType(int hint) Q_DECL_NOTHROW
|
||||
{
|
||||
const int result = registerEventTypeZeroBased(QEvent::MaxUser - hint);
|
||||
return result < 0 ? -1 : QEvent::MaxUser - result ;
|
||||
|
@ -302,7 +302,7 @@ public:
|
||||
inline void accept() { m_accept = true; }
|
||||
inline void ignore() { m_accept = false; }
|
||||
|
||||
static int registerEventType(int hint = -1);
|
||||
static int registerEventType(int hint = -1) Q_DECL_NOTHROW;
|
||||
|
||||
protected:
|
||||
QEventPrivate *d;
|
||||
|
Loading…
Reference in New Issue
Block a user