![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qobject_p.h>
Inherits QObjectData.
Inherited by QAbstractAnimationPrivate, QAbstractEventDispatcherPrivate, QAbstractItemDelegatePrivate, QAbstractItemModelPrivate, QAbstractItemModelTesterPrivate, QAbstractItemModelTesterPrivate, QAbstractNetworkCachePrivate, QAbstractObjectRegistryRefPrivate, QAbstractSocketEnginePrivate, QAbstractTextDocumentLayoutPrivate, QAccessibilityHintsPrivate, QActionGroupPrivate, QActionPrivate, QAnimationDriverPrivate, QAudioBufferOutputPrivate, QAudioDecoderPrivate, QAudioEnginePrivate, QAudioListenerPrivate, QAudioListenerPrivate, QAudioRoomPrivate, QButtonGroupPrivate, QCameraPrivate, QCompleterPrivate, QCoreApplicationPrivate, QDBusAbstractAdaptorPrivate, QDBusAbstractInterfacePrivate, QDBusServiceWatcherPrivate, QDBusServiceWatcherPrivate, QDataWidgetMapperPrivate, QDataWidgetMapperPrivate, QDnsLookupPrivate, QDragPrivate, QDtlsClientVerifierPrivate, QDtlsPrivate, QEventLoopPrivate, QFileSelectorPrivate [private], QFileSystemWatcherPrivate, QFutureWatcherBasePrivate, QGStreamerVideoSourcePrivate, QGeoAreaMonitorSourcePrivate, QGeoAreaMonitorSourcePrivate, QGeoMapPrivate, QGeoPositionInfoSourcePrivate, QGeoRouteParserPrivate, QGeoSatelliteInfoSourcePrivate, QGeoTileFetcherPrivate, QGeoTiledMapScenePrivate, QGesturePrivate, QGraphicsAnchorPrivate, QGraphicsEffectPrivate, QGraphicsEffectSourcePrivate, QGraphicsSceneIndexPrivate, QGraphicsScenePrivate, QGraphicsTransformPrivate, QHelpSearchEngineCorePrivate, QHelpSearchEngineCorePrivate, QHttpMultiPartPrivate, QHttpNetworkConnectionPrivate, QHttpNetworkReplyPrivate, QIODevicePrivate, QIOOperationPrivate, QInputDeviceManagerPrivate, QInputDevicePrivate, QInputMethodPrivate, QItemSelectionModelPrivate, QJSEnginePrivate, QLanguageServerPrivate, QLayoutPrivate, QLocalServerPrivate, QMediaCaptureSessionPrivate, QMediaFrameInputPrivate, QMediaPlayerPrivate, QMimeDataPrivate, QMimeDataPrivate, QMoviePrivate, QMoviePrivate, QNetworkAccessBackendPrivate, QNetworkAccessBackendPrivate, QNetworkAccessManagerPrivate, QNetworkCookieJarPrivate, QNetworkInformationPrivate, QNetworkInformationPrivate, QOffscreenSurfacePrivate, QOpenGLContextGroupPrivate, QOpenGLContextPrivate, QOpenGLDebugLoggerPrivate, QOpenGLDebugLoggerPrivate, QOpenGLShaderPrivate, QOpenGLShaderPrivate, QOpenGLShaderProgramPrivate, QOpenGLShaderProgramPrivate, QOpenGLTimeMonitorPrivate, QOpenGLTimeMonitorPrivate, QOpenGLTimerQueryPrivate, QOpenGLTimerQueryPrivate, QOpenGLVertexArrayObjectPrivate, QOpenGLVertexArrayObjectPrivate, QPacketProtocolPrivate, QPacketProtocolPrivate, QPdfWriterPrivate, QPdfWriterPrivate, QPixmapFilterPrivate, QPixmapFilterPrivate, QPlatformInputContextPrivate, QPlatformTextureListPrivate, QPlatformTextureListPrivate, QQC2::QStylePrivate, QQmlApplicationPrivate, QQmlBindPrivate, QQmlBindPrivate, QQmlComponentPrivate, QQmlConnectionsPrivate, QQmlConnectionsPrivate, QQmlContextPrivate, QQmlDebugClientPrivate, QQmlDebugConnectionPrivate, QQmlDebugConnectionPrivate, QQmlDebugServicePrivate, QQmlDebugServicePrivate, QQmlDelegateModelGroupPrivate, QQmlDelegateModelPrivate, QQmlExpressionPrivate, QQmlFileSelectorPrivate, QQmlFilterBasePrivate, QQmlInstantiatorPrivate, QQmlObjectModelPrivate, QQmlObjectModelPrivate, QQmlProfilerQtdWriterPrivate, QQmlProfilerQtdWriterPrivate, QQmlPropertyMapPrivate, QQmlPropertyMapPrivate, QQmlSorterBasePrivate, QQmlSynchronizerPrivate, QQmlSynchronizerPrivate, QQmlTimerPrivate, QQmlTimerPrivate, QQuick3DObjectPrivate, QQuickAbstractAnimationPrivate, QQuickActionGroupAttachedPrivate, QQuickActionGroupAttachedPrivate, QQuickActionGroupPrivate, QQuickActionGroupPrivate, QQuickActionPrivate, QQuickAnchorSetPrivate, QQuickAnchorSetPrivate, QQuickAnchorsPrivate, QQuickAnimationControllerPrivate, QQuickAnimationControllerPrivate, QQuickApplicationWindowAttachedPrivate, QQuickApplicationWindowAttachedPrivate, QQuickAttachedPropertyPropagatorPrivate, QQuickAttachedPropertyPropagatorPrivate, QQuickBehaviorPrivate, QQuickBehaviorPrivate, QQuickBoundaryRulePrivate, QQuickBoundaryRulePrivate, QQuickButtonGroupAttachedPrivate, QQuickButtonGroupAttachedPrivate, QQuickButtonGroupPrivate, QQuickButtonGroupPrivate, QQuickColorDialogImplAttachedPrivate, QQuickContextMenuPrivate, QQuickContextMenuPrivate, QQuickDeliveryAgentPrivate, QQuickDialogButtonBoxAttachedPrivate, QQuickDragAttachedPrivate, QQuickFileDialogImplAttachedPrivate, QQuickFolderDialogImplAttachedPrivate, QQuickFontDialogImplAttachedPrivate, QQuickFontLoaderPrivate, QQuickFontLoaderPrivate, QQuickFrameAnimationPrivate, QQuickFrameAnimationPrivate, QQuickImageResponsePrivate, QQuickIndicatorButtonPrivate, QQuickItemGrabResultPrivate, QQuickItemGrabResultPrivate, QQuickItemPrivate, QQuickKeyNavigationAttachedPrivate, QQuickKeysAttachedPrivate, QQuickMessageDialogImplAttachedPrivate, QQuickOverlayAttachedPrivate, QQuickOverlayAttachedPrivate, QQuickPackagePrivate, QQuickPackagePrivate, QQuickPathPrivate, QQuickPointerHandlerPrivate, QQuickPopupAnchorsPrivate, QQuickPopupPrivate, QQuickRangeSliderNodePrivate, QQuickRangeSliderNodePrivate, QQuickRenderControlPrivate, QQuickScrollBarAttachedPrivate, QQuickScrollIndicatorAttachedPrivate, QQuickScrollIndicatorAttachedPrivate, QQuickSplitHandleAttachedPrivate, QQuickSplitViewAttachedPrivate, QQuickStackViewAttachedPrivate, QQuickStateGroupPrivate, QQuickStateGroupPrivate, QQuickStateOperationPrivate, QQuickStatePrivate, QQuickSwipeDelegateAttachedPrivate, QQuickSwipeDelegateAttachedPrivate, QQuickSwipePrivate, QQuickSwipePrivate, QQuickSwipeViewAttachedPrivate, QQuickSwipeViewAttachedPrivate, QQuickSystemPalettePrivate, QQuickSystemPalettePrivate, QQuickTabBarAttachedPrivate, QQuickTabBarAttachedPrivate, QQuickTextAreaAttachedPrivate, QQuickTextAreaAttachedPrivate, QQuickTextControlPrivate, QQuickTextDocumentPrivate, QQuickTransformPrivate, QQuickTransitionPrivate, QQuickTransitionPrivate, QQuickTumblerAttachedPrivate, QRandomAccessAsyncFilePrivate, QRestAccessManagerPrivate, QSGAbstractRendererPrivate, QSGTexturePrivate, QScreenCapturePrivate, QScreenCapturePrivate, QScreenPrivate, QSessionManagerPrivate, QSettingsPrivate, QSharedImageLoaderPrivate, QSharedImageLoaderPrivate, QShortcutPrivate, QSignalMapperPrivate, QSignalMapperPrivate, QSocketNotifierPrivate, QSocketNotifierPrivate, QSoundEffectPrivate, QSpatialAudioSoundPrivate, QSqlDriverPrivate, QStyleHintsPrivate, QStylePrivate, QSvgRendererPrivate, QSvgRendererPrivate, QSyntaxHighlighterPrivate, QSyntaxHighlighterPrivate, QSystemTrayIconPrivate, QTcpServerPrivate, QTextDocumentPrivate, QTextObjectPrivate, QThreadPoolPrivate, QThreadPrivate, QTimeLinePrivate, QTimeLinePrivate, QTimerPrivate, QTranslatorPrivate, QTranslatorPrivate, QUndoGroupPrivate, QUndoGroupPrivate, QValidatorPrivate, QValidatorPrivate, QWavefrontMeshPrivate, QWavefrontMeshPrivate, QWaylandClientExtensionPrivate, QWaylandClientPrivate, QWaylandClientPrivate, QWaylandCompositorExtensionPrivate, QWaylandCompositorPrivate, QWaylandDestroyListenerPrivate, QWaylandDragPrivate, QWaylandDragPrivate, QWaylandKeyboardPrivate, QWaylandKeymapPrivate, QWaylandOutputPrivate, QWaylandPointerPrivate, QWaylandQuickHardwareLayerPrivate, QWaylandQuickHardwareLayerPrivate, QWaylandSeatPrivate, QWaylandSurfaceGrabberPrivate, QWaylandSurfaceGrabberPrivate, QWaylandSurfacePrivate, QWaylandTouchPrivate, QWaylandViewPrivate, QWaylandXdgOutputV1Private, QWaylandXdgPopupPrivate, QWaylandXdgToplevelPrivate, QWidgetPrivate, QWidgetTextControlPrivate, QWinEventNotifierPrivate, QWindowCapturePrivate, QWindowPrivate, QtPrivate::QQuickAttachedPropertyPropagatorPrivate, QtWaylandClient::QWaylandAbstractDecorationPrivate, and QtWaylandClient::QWaylandAbstractDecorationPrivate.
Classes | |
| struct | ExtraData |
| struct | ConnectionList |
| struct | TaggedSignalVector |
| struct | ConnectionOrSignalVector |
| struct | Connection |
| struct | SignalVector |
| struct | ConnectionData |
| struct | Sender |
Public Types | |
| typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
| using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Static Public Member Functions | |
| static bool | removeConnection (Connection *c) |
| static QObjectPrivate * | get (QObject *o) |
| static const QObjectPrivate * | get (const QObject *o) |
| static void | deleteInOwnThread (QObject *object) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
| static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
| static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Public Attributes | |
| ExtraData * | extraData |
| QAtomicPointer< QThreadData > | threadData |
| QAtomicPointer< ConnectionData > | connections |
| union { | |
| QObject * currentChildBeingDeleted | |
| QAbstractDeclarativeData * declarativeData | |
| }; | |
| QAtomicPointer< QtSharedPointer::ExternalRefCountData > | sharedRefcount |
| Public Attributes inherited from QObjectData | |
| QObject * | q_ptr |
| QObject * | parent |
| QObjectList | children |
| uint | isWidget: 1 |
| uint | blockSig: 1 |
| uint | wasDeleted: 1 |
| uint | isDeletingChildren: 1 |
| uint | sendChildEvents: 1 |
| uint | receiveChildEvents: 1 |
| uint | isWindow: 1 |
| uint | deleteLaterCalled: 1 |
| uint | isQuickItem: 1 |
| uint | willBeWidget: 1 |
| uint | wasWidget: 1 |
| uint | receiveParentEvents: 1 |
| uint | unused: 20 |
| QAtomicInt | postedEvents |
| QDynamicMetaObjectData * | metaObject |
| QBindingStorage | bindingStorage |
Definition at line 85 of file qobject_p.h.
Definition at line 218 of file qobject_p.h.
| typedef void(* QObjectPrivate::StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
Definition at line 121 of file qobject_p.h.
| QObjectPrivate::QObjectPrivate | ( | decltype(QObjectPrivateVersion) | version = QObjectPrivateVersion | ) |
Definition at line 196 of file qobject.cpp.
|
virtual |
Definition at line 219 of file qobject.cpp.
|
inline |
Add the connection c to the list of connections of the sender's object for the specified signal
The signalSlotLock() of the sender and receiver must be locked while calling this function
Will also add the connection in the sender's list of the receiver.
Definition at line 308 of file qobject.cpp.
| void QObjectPrivate::clearBindingStorage | ( | ) |
Definition at line 1054 of file qobject.cpp.
|
static |
Used by QML to connect a signal by index to a slot implemented in JavaScript (wrapped in a custom QSlotObjectBase subclass).
This is an overload that should be used when sender and receiver are different objects.
The signal_index is an index relative to the number of methods.
Definition at line 5844 of file qobject.cpp.
|
static |
Used by QML to connect a signal by index to a slot implemented in JavaScript (wrapped in a custom QSlotObjectBase subclass).
This version of connect assumes that sender and receiver are the same object.
The signal_index is an index relative to the number of methods.
Definition at line 5829 of file qobject.cpp.
|
inlinestatic |
Definition at line 290 of file qobject_p.h.
|
static |
Internal version of connect used by the template version of QObject::connect (called via connectImpl) and also used by the QObjectPrivate::connect version used by QML. The signal_index is expected to be relative to the number of signals.
Definition at line 5604 of file qobject.cpp.
|
inline |
Definition at line 237 of file qobject_p.h.
| void QObjectPrivate::deleteChildren | ( | ) |
Definition at line 2317 of file qobject.cpp.
Destroys object in the thread it belongs to, via deleteLater(), so that its vtable and members are not touched from the wrong thread. Falls back to deleting it right away when that thread cannot run the deferred delete: it is the current thread, or it has no event dispatcher (never started, or torn down at application exit). This is meant for objects deleted from a thread that is usually not their own, e.g. a worker handed to a thread pool.
The thread and the dispatcher are read from the object's QThreadData, which stays alive as long as the object does, rather than from QThread, which the owning thread may be destroying concurrently.
Definition at line 2628 of file qobject.cpp.
|
static |
Used by QML to disconnect a signal by index that's connected to a slot implemented in JavaScript (wrapped in a custom QSlotObjectBase subclass) In the QML case the slot is not a pointer to a pointer to the function to disconnect, but instead it is a pointer to an array of internal values required for the disconnect.
This is an overload that should be used when sender and receiver are different objects.
Definition at line 5887 of file qobject.cpp.
Used by QML to disconnect a signal by index that's connected to a slot implemented in JavaScript (wrapped in a custom QSlotObjectBase subclass) In the QML case the slot is not a pointer to a pointer to the function to disconnect, but instead it is a pointer to an array of internal values required for the disconnect.
This version of disconnect assumes that sender and receiver are the same object.
Definition at line 5870 of file qobject.cpp.
|
inlinestatic |
Definition at line 319 of file qobject_p.h.
|
inline |
Definition at line 242 of file qobject_p.h.
|
inline |
The signalSlotLock() of the sender must be locked while calling this function
Definition at line 289 of file qobject.cpp.
|
inline |
Definition at line 114 of file qobject_p.h.
|
virtual |
Reimplemented in QWidgetPrivate.
Definition at line 4714 of file qobject.cpp.
|
inlinestatic |
Definition at line 162 of file qobject_p.h.
|
inlinestatic |
Definition at line 161 of file qobject_p.h.
| QtPrivate::QPropertyAdaptorSlotObject * QObjectPrivate::getPropertyAdaptorSlotObject | ( | const QMetaProperty & | property | ) |
Used by QPropertyAdaptorSlotObject to get an existing instance for a property, if available
Definition at line 5946 of file qobject.cpp.
|
inline |
Definition at line 231 of file qobject_p.h.
| bool QObjectPrivate::isSignalConnected | ( | uint | signalIndex, |
| bool | checkDeclarative = true ) const |
Returns true if the signal with index signal_index from object sender is connected.
signal_index must be the index returned by QObjectPrivate::signalIndex;
Definition at line 456 of file qobject.cpp.
| bool QObjectPrivate::maybeSignalConnected | ( | uint | signalIndex | ) | const |
Definition at line 482 of file qobject.cpp.
| void QObjectPrivate::moveToThread_helper | ( | ) |
Definition at line 1829 of file qobject.cpp.
| QObjectList QObjectPrivate::receiverList | ( | const char * | signal | ) | const |
Definition at line 265 of file qobject.cpp.
| void QObjectPrivate::reinitBindingStorageAfterThreadMove | ( | ) |
Definition at line 501 of file qobject.cpp.
|
inlinestatic |
\threadsafe
Definition at line 5901 of file qobject.cpp.
Only use if you know nothing can be bound yet. Usually used for internal objects that do get names.
Definition at line 1374 of file qobject.cpp.
Definition at line 2334 of file qobject.cpp.
| void QObjectPrivate::setThreadData_helper | ( | QThreadData * | currentData, |
| QThreadData * | targetData, | ||
| QBindingStatus * | status ) |
Definition at line 1841 of file qobject.cpp.
| int QObjectPrivate::signalIndex | ( | const char * | signalName, |
| const QMetaObject ** | meta = nullptr ) const |
Returns the signal index used in the internal connections->receivers vector.
It is different from QMetaObject::indexOfSignal(): indexOfSignal is the same as indexOfMethod while QObjectPrivate::signalIndex is smaller because it doesn't give index to slots.
If meta is not \nullptr, it is set to the meta-object where the signal was found.
Definition at line 4568 of file qobject.cpp.
Reimplemented in QFilePrivate, and QQuickShapePathPrivate.
Definition at line 4822 of file qobject.cpp.
| union { ... } QObjectPrivate |
| QAtomicPointer<ConnectionData> QObjectPrivate::connections |
Definition at line 219 of file qobject_p.h.
| QObject* QObjectPrivate::currentChildBeingDeleted |
Definition at line 222 of file qobject_p.h.
| QAbstractDeclarativeData* QObjectPrivate::declarativeData |
Definition at line 223 of file qobject_p.h.
|
mutable |
Definition at line 210 of file qobject_p.h.
| QAtomicPointer<QtSharedPointer::ExternalRefCountData> QObjectPrivate::sharedRefcount |
Definition at line 228 of file qobject_p.h.
| QAtomicPointer<QThreadData> QObjectPrivate::threadData |
Definition at line 216 of file qobject_p.h.