Add QObject::isQuickItemType() for convenience
Change-Id: Ibde4e919ba028117336974eb7a804aa11c1ee086 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
50ad52d804
commit
054b814daa
@ -197,6 +197,7 @@ QObjectPrivate::QObjectPrivate(int version)
|
|||||||
metaObject = nullptr;
|
metaObject = nullptr;
|
||||||
isWindow = false;
|
isWindow = false;
|
||||||
deleteLaterCalled = false;
|
deleteLaterCalled = false;
|
||||||
|
isQuickItem = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QObjectPrivate::~QObjectPrivate()
|
QObjectPrivate::~QObjectPrivate()
|
||||||
@ -1303,6 +1304,17 @@ QBindable<QString> QObject::bindableObjectName()
|
|||||||
\c{inherits("QWindow")}, except that it is much faster.
|
\c{inherits("QWindow")}, except that it is much faster.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn bool QObject::isQuickItemType() const
|
||||||
|
|
||||||
|
Returns \c true if the object is a QQuickItem; otherwise returns \c false.
|
||||||
|
|
||||||
|
Calling this function is equivalent to calling
|
||||||
|
\c{inherits("QQuickItem")}, except that it is much faster.
|
||||||
|
|
||||||
|
\since 6.4
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
This virtual function receives events to an object and should
|
This virtual function receives events to an object and should
|
||||||
return true if the event \a e was recognized and processed.
|
return true if the event \a e was recognized and processed.
|
||||||
|
@ -107,7 +107,8 @@ public:
|
|||||||
uint receiveChildEvents : 1;
|
uint receiveChildEvents : 1;
|
||||||
uint isWindow : 1; // for QWindow
|
uint isWindow : 1; // for QWindow
|
||||||
uint deleteLaterCalled : 1;
|
uint deleteLaterCalled : 1;
|
||||||
uint unused : 24;
|
uint isQuickItem : 1;
|
||||||
|
uint unused : 23;
|
||||||
int postedEvents;
|
int postedEvents;
|
||||||
QDynamicMetaObjectData *metaObject;
|
QDynamicMetaObjectData *metaObject;
|
||||||
QBindingStorage bindingStorage;
|
QBindingStorage bindingStorage;
|
||||||
@ -147,6 +148,7 @@ public:
|
|||||||
|
|
||||||
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 isWindowType() const { return d_ptr->isWindow; }
|
||||||
|
inline bool isQuickItemType() const { return d_ptr->isQuickItem; }
|
||||||
|
|
||||||
inline bool signalsBlocked() const noexcept { return d_ptr->blockSig; }
|
inline bool signalsBlocked() const noexcept { return d_ptr->blockSig; }
|
||||||
bool blockSignals(bool b) noexcept;
|
bool blockSignals(bool b) noexcept;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user