Add isWindow type to QObject

(cherry picked from commit 77f08730b4cdb23b43471b2b29ece59e159103d7)
This commit is contained in:
Jørgen Lind 2011-04-27 11:56:35 +02:00 committed by Samuel Rødal
parent d72a994a06
commit 2a8189035f
3 changed files with 5 additions and 2 deletions

View File

@ -157,6 +157,7 @@ QObjectPrivate::QObjectPrivate(int version)
#endif #endif
metaObject = 0; metaObject = 0;
hasGuards = false; hasGuards = false;
isWindow = false;
} }
QObjectPrivate::~QObjectPrivate() QObjectPrivate::~QObjectPrivate()

View File

@ -102,7 +102,8 @@ public:
uint inEventHandler : 1; //only used if QT_JAMBI_BUILD uint inEventHandler : 1; //only used if QT_JAMBI_BUILD
uint inThreadChangeEvent : 1; uint inThreadChangeEvent : 1;
uint hasGuards : 1; //true iff there is one or more QPointer attached to this object uint hasGuards : 1; //true iff there is one or more QPointer attached to this object
uint unused : 22; uint isWindow : 1; //for QWindow
uint unused : 21;
int postedEvents; int postedEvents;
QMetaObject *metaObject; // assert dynamic QMetaObject *metaObject; // assert dynamic
}; };
@ -144,6 +145,7 @@ public:
void setObjectName(const QString &name); void setObjectName(const QString &name);
inline bool isWidgetType() const { return d_ptr->isWidget; } inline bool isWidgetType() const { return d_ptr->isWidget; }
inline bool isWindowType() const { return d_ptr->isWindow; }
inline bool signalsBlocked() const { return d_ptr->blockSig; } inline bool signalsBlocked() const { return d_ptr->blockSig; }
bool blockSignals(bool b); bool blockSignals(bool b);

View File

@ -63,7 +63,7 @@ public:
, glContext(0) , glContext(0)
, widget(0) , widget(0)
{ {
isWindow = true;
} }
~QWindowPrivate() ~QWindowPrivate()