Stop using QEventPrivate::d in QWindowStateChangeEvent
We can add a boolean and avoid using the d pointer (which QEvent now checks to be unused). Change-Id: I7367d5410d10ed06441fe9037cac0e3473d62498 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
d9a1c2dff8
commit
80ad5938ea
|
|
@ -3277,27 +3277,18 @@ QClipboardEvent::~QClipboardEvent()
|
|||
Returns the state of the window before the change.
|
||||
*/
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
QWindowStateChangeEvent::QWindowStateChangeEvent(Qt::WindowStates s)
|
||||
: QEvent(WindowStateChange), ostate(s)
|
||||
{
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
QWindowStateChangeEvent::QWindowStateChangeEvent(Qt::WindowStates s, bool isOverride)
|
||||
: QEvent(WindowStateChange), ostate(s)
|
||||
: QEvent(WindowStateChange), ostate(s), m_override(isOverride)
|
||||
{
|
||||
if (isOverride)
|
||||
d = (QEventPrivate*)(this);
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
bool QWindowStateChangeEvent::isOverride() const
|
||||
{
|
||||
return (d != 0);
|
||||
return m_override;
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
|
|
|
|||
|
|
@ -698,8 +698,7 @@ public:
|
|||
class Q_GUI_EXPORT QWindowStateChangeEvent: public QEvent
|
||||
{
|
||||
public:
|
||||
explicit QWindowStateChangeEvent(Qt::WindowStates aOldState);
|
||||
QWindowStateChangeEvent(Qt::WindowStates aOldState, bool isOverride);
|
||||
explicit QWindowStateChangeEvent(Qt::WindowStates aOldState, bool isOverride = false);
|
||||
~QWindowStateChangeEvent();
|
||||
|
||||
inline Qt::WindowStates oldState() const { return ostate; }
|
||||
|
|
@ -707,6 +706,7 @@ public:
|
|||
|
||||
private:
|
||||
Qt::WindowStates ostate;
|
||||
bool m_override;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
|
|
|||
Loading…
Reference in New Issue