Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QObjectPrivate Class Reference

#include <qobject_p.h>

Inherits QObjectData.

Inherited by MyClassPrivate, QAbstractAnimationPrivate, QAbstractEventDispatcherPrivate, QAbstractItemDelegatePrivate, QAbstractItemModelPrivate, QAbstractItemModelTesterPrivate, QAbstractNetworkCachePrivate, QAbstractSocketEnginePrivate, QAbstractTextDocumentLayoutPrivate, QActionGroupPrivate, QActionPrivate, QAnimationDriverPrivate, QAudioDecoderPrivate, QButtonGroupPrivate, QCameraPrivate, QCompleterPrivate, QCoreApplicationPrivate, QDBusAbstractAdaptorPrivate, QDBusAbstractInterfacePrivate, QDBusServiceWatcherPrivate, QDataWidgetMapperPrivate, QDnsLookupPrivate, QDragPrivate, QDtlsClientVerifierPrivate, QDtlsPrivate, QEventLoopPrivate, QFactoryLoaderPrivate, QFileSelectorPrivate [private], QFileSystemWatcherPrivate, QFutureWatcherBasePrivate, QGeoAreaMonitorSourcePrivate, QGeoMapPrivate, QGeoPositionInfoSourcePrivate, QGeoRouteParserPrivate, QGeoSatelliteInfoSourcePrivate, QGeoTileFetcherPrivate, QGeoTiledMapScenePrivate, QGesturePrivate, QGraphicsAnchorPrivate, QGraphicsEffectPrivate, QGraphicsEffectSourcePrivate, QGraphicsSceneIndexPrivate, QGraphicsScenePrivate, QGraphicsTransformPrivate, QHttpMultiPartPrivate, QHttpNetworkConnectionPrivate, QHttpNetworkReplyPrivate, QIODevicePrivate, QInputDeviceManagerPrivate, QInputDevicePrivate, QInputMethodPrivate, QItemSelectionModelPrivate, QJSEnginePrivate, QLanguageServerPrivate, QLayoutPrivate, QLocalServerPrivate, QMediaPlayerPrivate, QMimeDataPrivate, QMoviePrivate, QNetworkAccessBackendPrivate, QNetworkAccessManagerPrivate, QNetworkConnectionMonitorPrivate, QNetworkConnectionMonitorPrivate, QNetworkConnectionMonitorPrivate, QNetworkCookieJarPrivate, QNetworkInformationPrivate, QOffscreenSurfacePrivate, QOpenGLContextGroupPrivate, QOpenGLContextPrivate, QOpenGLDebugLoggerPrivate, QOpenGLShaderPrivate, QOpenGLShaderProgramPrivate, QOpenGLTimeMonitorPrivate, QOpenGLTimerQueryPrivate, QOpenGLVertexArrayObjectPrivate, QPacketProtocolPrivate, QPdfWriterPrivate, QPixmapFilterPrivate, QPlatformInputContextPrivate, QPlatformTextureListPrivate, QQC2::QStylePrivate, QQmlApplicationPrivate, QQmlBindPrivate, QQmlComponentPrivate, QQmlConnectionsPrivate, QQmlContextPrivate, QQmlDebugClientPrivate, QQmlDebugConnectionPrivate, QQmlDebugServicePrivate, QQmlDelegateModelGroupPrivate, QQmlDelegateModelPrivate, QQmlExpressionPrivate, QQmlFileSelectorPrivate, QQmlInstantiatorPrivate, QQmlObjectModelPrivate, QQmlPropertyMapPrivate, QQmlTimerPrivate, QQuick3DObjectPrivate, QQuickAbstractAnimationPrivate, QQuickActionGroupAttachedPrivate, QQuickActionGroupPrivate, QQuickActionPrivate, QQuickAnchorSetPrivate, QQuickAnchorsPrivate, QQuickAnimationControllerPrivate, QQuickApplicationWindowAttachedPrivate, QQuickAttachedPropertyPropagatorPrivate, QQuickBehaviorPrivate, QQuickBoundaryRulePrivate, QQuickButtonGroupAttachedPrivate, QQuickButtonGroupPrivate, QQuickColorDialogImplAttachedPrivate, QQuickDeliveryAgentPrivate, QQuickDialogButtonBoxAttachedPrivate, QQuickDragAttachedPrivate, QQuickFileDialogImplAttachedPrivate, QQuickFolderDialogImplAttachedPrivate, QQuickFontDialogImplAttachedPrivate, QQuickFontLoaderPrivate, QQuickFrameAnimationPrivate, QQuickImageResponsePrivate, QQuickIndicatorButtonPrivate, QQuickItemGrabResultPrivate, QQuickItemPrivate, QQuickKeyNavigationAttachedPrivate, QQuickKeysAttachedPrivate, QQuickMessageDialogImplAttachedPrivate, QQuickOverlayAttachedPrivate, QQuickPackagePrivate, QQuickPathPrivate, QQuickPointerHandlerPrivate, QQuickPopupAnchorsPrivate, QQuickPopupPrivate, QQuickRangeSliderNodePrivate, QQuickRenderControlPrivate, QQuickScrollBarAttachedPrivate, QQuickScrollIndicatorAttachedPrivate, QQuickSplitHandleAttachedPrivate, QQuickSplitViewAttachedPrivate, QQuickStackViewAttachedPrivate, QQuickStateGroupPrivate, QQuickStateOperationPrivate, QQuickStatePrivate, QQuickSwipeDelegateAttachedPrivate, QQuickSwipePrivate, QQuickSwipeViewAttachedPrivate, QQuickSystemPalettePrivate, QQuickTabBarAttachedPrivate, QQuickTextAreaAttachedPrivate, QQuickTextControlPrivate, QQuickTextDocumentPrivate, QQuickToolTipAttachedPrivate, QQuickTransformPrivate, QQuickTransitionPrivate, QQuickTumblerAttachedPrivate, QRestAccessManagerPrivate, QSGAbstractRendererPrivate, QSGTexturePrivate, QScreenCapturePrivate, QScreenPrivate, QSessionManagerPrivate, QSettingsPrivate, QSharedImageLoaderPrivate, QShortcutPrivate, QSignalMapperPrivate, QSocketNotifierPrivate, QSqlDriverPrivate, QStyleHintsPrivate, QStylePrivate, QSvgRendererPrivate, QSyntaxHighlighterPrivate, QSystemTrayIconPrivate, QTcpServerPrivate, QTextDocumentPrivate, QTextObjectPrivate, QThreadPoolPrivate, QThreadPrivate, QTimeLinePrivate, QTimerPrivate, QTranslatorPrivate, QUndoGroupPrivate, QValidatorPrivate, QWavefrontMeshPrivate, QWaylandClientExtensionPrivate, QWaylandClientPrivate, QWaylandCompositorExtensionPrivate, QWaylandCompositorPrivate, QWaylandDestroyListenerPrivate, QWaylandDragPrivate, QWaylandInputMethodControlPrivate, QWaylandKeyboardPrivate, QWaylandKeymapPrivate, QWaylandOutputPrivate, QWaylandPointerPrivate, QWaylandQuickHardwareLayerPrivate, QWaylandSeatPrivate, QWaylandSurfaceGrabberPrivate, QWaylandSurfacePrivate, QWaylandTouchPrivate, QWaylandViewPrivate, QWaylandXdgOutputV1Private, QWaylandXdgPopupPrivate, QWaylandXdgToplevelPrivate, QWidgetPrivate, QWidgetTextControlPrivate, QWinEventNotifierPrivate, QWindowCapturePrivate, QWindowPrivate, and QtWaylandClient::QWaylandAbstractDecorationPrivate.

+ Collaboration diagram for QObjectPrivate:

Classes

struct  Connection
 
struct  ConnectionData
 
struct  ConnectionList
 
struct  ConnectionOrSignalVector
 
struct  ExtraData
 
struct  Sender
 
struct  SignalVector
 
struct  TaggedSignalVector
 

Public Types

typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
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

ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
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
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Detailed Description

Definition at line 73 of file qobject_p.h.

Member Typedef Documentation

◆ ConnectionDataPointer

◆ StaticMetaCallFunction

typedef void(* QObjectPrivate::StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)

Definition at line 108 of file qobject_p.h.

Constructor & Destructor Documentation

◆ QObjectPrivate()

◆ ~QObjectPrivate()

QObjectPrivate::~QObjectPrivate ( )
virtual

Member Function Documentation

◆ addConnection()

void QObjectPrivate::addConnection ( int signal,
Connection * c )
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 273 of file qobject.cpp.

References connections, QObjectPrivate::ConnectionData::connectionsForSignal(), QObjectPrivate::ConnectionData::currentConnectionId, ensureConnectionData(), get(), QBasicAtomicInteger< T >::loadRelaxed(), Q_ASSERT, QObjectData::q_ptr, rd, QObjectPrivate::ConnectionData::resizeSignalVector(), and signal.

+ Here is the call graph for this function:

◆ checkForIncompatibleLibraryVersion()

void QObjectPrivate::checkForIncompatibleLibraryVersion ( int version) const
inline

Definition at line 225 of file qobject_p.h.

References Q_UNLIKELY, Q_UNUSED, qFatal, and QObjectPrivateVersion.

Referenced by QObjectPrivate().

+ Here is the caller graph for this function:

◆ clearBindingStorage()

void QObjectPrivate::clearBindingStorage ( )

Definition at line 977 of file qobject.cpp.

References QObjectData::bindingStorage.

◆ connect() [1/3]

QMetaObject::Connection QObjectPrivate::connect ( const QObject * sender,
int signal_index,
const QObject * receiver,
QtPrivate::QSlotObjectBase * slotObjRaw,
Qt::ConnectionType type )
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 5440 of file qobject.cpp.

References connectImpl(), QMetaObject::Connection(), methodIndexToSignalIndex(), and qCWarning.

+ Here is the call graph for this function:

◆ connect() [2/3]

QMetaObject::Connection QObjectPrivate::connect ( const QObject * sender,
int signal_index,
QtPrivate::QSlotObjectBase * slotObj,
Qt::ConnectionType type )
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 5425 of file qobject.cpp.

References connect().

+ Here is the call graph for this function:

◆ connect() [3/3]

template<typename Func1 , typename Func2 >
QMetaObject::Connection QObjectPrivate::connect ( const typename QtPrivate::FunctionPointer< Func1 >::Object * sender,
Func1 signal,
const typename QtPrivate::FunctionPointer< Func2 >::Object * receiverPrivate,
Func2 slot,
Qt::ConnectionType type = Qt::AutoConnection )
inlinestatic

Definition at line 299 of file qobject_p.h.

References Qt::BlockingQueuedConnection, QtPrivate::getQObject(), Qt::QueuedConnection, signal, and QtPrivate::ConnectionTypes< ArgList, Declared >::types().

Referenced by QFontComboBox::QFontComboBox(), QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(), QQuickApplicationWindowAttached::QQuickApplicationWindowAttached(), QQuickFileDialogDelegate::QQuickFileDialogDelegate(), QQuickLabel::QQuickLabel(), QQuickOverlayAttached::QQuickOverlayAttached(), QQuickSwipeView::QQuickSwipeView(), QQuickTabBar::QQuickTabBar(), QQuickTextField::QQuickTextField(), QQuickTreeView::QQuickTreeView(), QQuickTreeViewDelegate::QQuickTreeViewDelegate(), QSortFilterProxyModel::QSortFilterProxyModel(), QTreeWidget::QTreeWidget(), QUntypedBindable::QUntypedBindable(), QWaylandClientExtension::QWaylandClientExtension(), QWidgetTextControlPrivate::_q_documentLayoutChanged(), QToolButton::actionEvent(), QQuickActionGroup::addAction(), QDialogButtonBoxPrivate::addButton(), QQuickButtonGroup::addButton(), QConcatenateTablesProxyModel::addSourceModel(), QQuickTextAreaPrivate::attachFlickable(), QQuickAttachedPropertyPropagatorPrivate::attachTo(), QQuickIconImage::componentComplete(), connect(), QFileSystemWatcherPrivate::connectEngine(), QComboBoxPrivate::connectModel(), QQuickTableViewPrivate::connectToModel(), QQuickSelectionRectanglePrivate::connectToTarget(), QQuickComboBox::contentItemChange(), QQuickPane::contentItemChange(), QQuickSpinBox::contentItemChange(), QQuickComboBoxPrivate::createDelegateModel(), QQuickComboBoxPrivate::createdItem(), QFileDialogPrivate::createMenuActions(), QFileDialogPrivate::createToolButtons(), QFileDialogPrivate::createWidgets(), QInputDialogPrivate::ensureComboBox(), QQuickDeliveryAgentPrivate::ensureDeviceConnected(), QInputDialogPrivate::ensureLineEdit(), QInputDialogPrivate::ensureListView(), QInputDialogPrivate::ensurePlainTextEdit(), QLabelPrivate::ensureTextControl(), QQuickListViewPrivate::fixup(), QFileSystemWatcherPrivate::init(), QFileSystemModelPrivate::init(), QFontDialogPrivate::init(), QDockWidgetPrivate::init(), QTabBarPrivate::init(), QTabWidgetPrivate::init(), QTextBrowserPrivate::init(), QToolButtonPrivate::init(), QQuickContainerPrivate::init(), QLineEditPrivate::init(), QTextEditPrivate::init(), QMessageBoxPrivate::init(), QPlainTextEditPrivate::init(), QFileDialogPrivate::initHelper(), QMessageBoxPrivate::initHelper(), QQuickScrollBarAttachedPrivate::initHorizontal(), QTreeViewPrivate::initialize(), QIOPipePrivate::initialize(), QWaylandOutput::initialize(), QItemSelectionModelPrivate::initModel(), QQuickScrollBarAttachedPrivate::initVertical(), QColorDialogPrivate::initWidgets(), QQuickMenuPrivate::insertItem(), QTabBar::insertTab(), QQuickDialogButtonBox::itemAdded(), QQuickMenuBar::itemAdded(), QQuickTabBar::itemAdded(), QQuickFileDialogDelegate::keyReleaseEvent(), QV4::QObjectWrapper::method_connect(), QNetworkReplyHttpImplPrivate::postRequest(), QAbstractTextDocumentLayout::registerHandler(), QQuickFolderBreadcrumbBarPrivate::repopulate(), QWidgetAction::requestWidget(), QQuickAbstractButton::setAction(), QQuickColorDialogImplAttached::setAlphaSlider(), QQuickTextControlPrivate::setBlinkingCursorEnabled(), QQuickTextInputPrivate::setBlinkingCursorEnabled(), QLabel::setBuddy(), QQuickColorDialogImplAttached::setButtonBox(), QQuickFileDialogImplAttached::setButtonBox(), QQuickFontDialogImplAttached::setButtonBox(), QQuickMessageDialogImplAttached::setButtonBox(), QWidgetTextControlPrivate::setContent(), QQuickControlPrivate::setContentItem_helper(), QWidgetTextControlPrivate::setCursorVisible(), QQuickFolderBreadcrumbBar::setDialog(), QQuickComboBox::setEditable(), QQuickFileDialogImplAttached::setFileDialogListView(), QQuickFileDialogImplAttached::setFileNameTextField(), QQuickScrollViewPrivate::setFlickable(), QQuickFolderDialogImplAttached::setFolderDialogListView(), QQuickDialog::setFooter(), QQuickDialog::setHeader(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QDataWidgetMapper::setItemDelegate(), QAbstractSpinBox::setLineEdit(), QComboBox::setLineEdit(), QQuickItemView::setModel(), QQuickComboBox::setModel(), QAbstractItemView::setModel(), QDataWidgetMapper::setModel(), QComboBox::setModel(), QHeaderView::setModel(), QTableView::setModel(), QTreeView::setModel(), QQuickFileDialogImplAttached::setNameFiltersComboBox(), QQuickFileDialogImplAttached::setOverwriteConfirmationDialog(), QQuickWindowPrivate::setPalette(), QQuickMenuPrivate::setParentMenu(), QQuickComboBox::setPopup(), QQuickFontDialogImplAttached::setSampleEdit(), QQuickTableView::setSelectionModel(), QListWidget::setSelectionModel(), QTableView::setSortingEnabled(), QTreeView::setSortingEnabled(), QIdentityProxyModel::setSourceModel(), QSortFilterProxyModel::setSourceModel(), QQuickMenuItemPrivate::setSubMenu(), QTabWidget::setTabBar(), QTabBar::setTabsClosable(), QQuickFolderBreadcrumbBar::setTextField(), QListWidgetPrivate::setup(), QTableWidgetPrivate::setup(), QQuickFolderBreadcrumbBar::setUpButton(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), QQuickFileDialogImplPrivate::tryUpdateFileDialogListViewCurrentIndex(), QQuickSwipeViewAttachedPrivate::update(), QQuickSelectionRectanglePrivate::updateActiveState(), QComboBoxPrivate::viewContainer(), QAbstractItemView::viewportEvent(), and QQuickApplicationWindowAttachedPrivate::windowChange().

+ Here is the call graph for this function:

◆ connectImpl()

QMetaObject::Connection QObjectPrivate::connectImpl ( const QObject * sender,
int signal_index,
const QObject * receiver,
void ** slot,
QtPrivate::QSlotObjectBase * slotObjRaw,
int type,
const int * types,
const QMetaObject * senderMetaObject )
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 5241 of file qobject.cpp.

References c2, QMetaObject::Connection(), connections, connectWarning(), get(), method, Q_ASSERT, QThreadData::ref(), ret, QObjectPrivate::Connection::sender, QMetaObjectPrivate::signal(), signalSlotLock(), Qt::SingleShotConnection, Qt::UniqueConnection, and QOrderedMutexLocker::unlock().

Referenced by QSingleShotTimer::QSingleShotTimer(), and connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connectNotify()

void QObjectPrivate::connectNotify ( const QMetaMethod & signal)
inline

Definition at line 246 of file qobject_p.h.

References QObject::connectNotify(), QObjectData::q_ptr, and signal.

+ Here is the call graph for this function:

◆ deleteChildren()

void QObjectPrivate::deleteChildren ( )

Definition at line 2202 of file qobject.cpp.

References QList< T >::at(), QObjectData::children, QList< T >::clear(), currentChildBeingDeleted, i, QObjectData::isDeletingChildren, Q_ASSERT_X, and QList< T >::size().

+ Here is the call graph for this function:

◆ disconnect() [1/3]

bool QObjectPrivate::disconnect ( const QObject * sender,
int signal_index,
const QObject * receiver,
void ** slot )
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 5482 of file qobject.cpp.

References QMetaObjectPrivate::disconnect(), and methodIndexToSignalIndex().

+ Here is the call graph for this function:

◆ disconnect() [2/3]

bool QObjectPrivate::disconnect ( const QObject * sender,
int signal_index,
void ** slot )
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 version of disconnect assumes that sender and receiver are the same object.

Definition at line 5465 of file qobject.cpp.

References disconnect().

+ Here is the call graph for this function:

◆ disconnect() [3/3]

template<typename Func1 , typename Func2 >
bool QObjectPrivate::disconnect ( const typename QtPrivate::FunctionPointer< Func1 >::Object * sender,
Func1 signal,
const typename QtPrivate::FunctionPointer< Func2 >::Object * receiverPrivate,
Func2 slot )
inlinestatic

Definition at line 328 of file qobject_p.h.

References signal.

Referenced by QQuickComboBox::~QQuickComboBox(), QWidgetAction::~QWidgetAction(), QDialogButtonBox::clear(), QQuickActionGroupPrivate::clear(), QQuickButtonGroupPrivate::clear(), QQuickComboBox::contentItemChange(), QQuickPane::contentItemChange(), QQuickSpinBox::contentItemChange(), QQuickTextAreaPrivate::detachFlickable(), QQuickAttachedPropertyPropagatorPrivate::detachFrom(), disconnect(), QQuickTableViewPrivate::disconnectFromModel(), QQuickScrollViewPrivate::disconnectScrollBarSignals(), QQuickFileDialogImplPrivate::fileDialogListViewCountChanged(), QQuickListViewPrivate::fixupHeaderCompleted(), QQuickDialogButtonBox::itemRemoved(), QQuickMenuBar::itemRemoved(), QQuickTabBar::itemRemoved(), QV4::QObjectWrapper::method_disconnect(), QWidgetAction::releaseWidget(), QQuickActionGroup::removeAction(), QDialogButtonBoxPrivate::removeButton(), QQuickButtonGroup::removeButton(), QQuickMenuPrivate::removeItem(), QQuickAbstractButton::setAction(), QQuickColorDialogImplAttached::setAlphaSlider(), QLabel::setBuddy(), QQuickColorDialogImplAttached::setButtonBox(), QQuickFileDialogImplAttached::setButtonBox(), QQuickFontDialogImplAttached::setButtonBox(), QQuickMessageDialogImplAttached::setButtonBox(), QQuickFolderBreadcrumbBar::setDialog(), QQuickComboBox::setEditable(), QQuickFileDialogImplAttached::setFileNameTextField(), QQuickScrollViewPrivate::setFlickable(), QQuickDialog::setFooter(), QQuickDialog::setHeader(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QQuickComboBox::setModel(), QTreeView::setModel(), QQuickFileDialogImplAttached::setOverwriteConfirmationDialog(), QQuickComboBox::setPopup(), QQuickFontDialogImplAttached::setSampleEdit(), QQuickTableView::setSelectionModel(), QQuickMenuItemPrivate::setSubMenu(), QQuickFolderBreadcrumbBar::setTextField(), QQuickFolderBreadcrumbBar::setUpButton(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), and QAbstractTextDocumentLayout::unregisterHandler().

◆ disconnectNotify()

void QObjectPrivate::disconnectNotify ( const QMetaMethod & signal)
inline

Definition at line 251 of file qobject_p.h.

References QObject::disconnectNotify(), QObjectData::q_ptr, and signal.

Referenced by QObject::disconnect(), and QObject::disconnect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureConnectionData()

void QObjectPrivate::ensureConnectionData ( )
inline

The signalSlotLock() of the sender must be locked while calling this function

Definition at line 254 of file qobject.cpp.

References connections, QObjectPrivate::ConnectionData::ref, and QBasicAtomicInteger< T >::ref().

Referenced by addConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureExtraData()

void QObjectPrivate::ensureExtraData ( )
inline

Definition at line 102 of file qobject_p.h.

◆ flagsForDumping()

std::string QObjectPrivate::flagsForDumping ( ) const
virtual

Reimplemented in QWidgetPrivate.

Definition at line 4364 of file qobject.cpp.

Referenced by QWidgetPrivate::flagsForDumping().

+ Here is the caller graph for this function:

◆ get() [1/2]

static const QObjectPrivate * QObjectPrivate::get ( const QObject * o)
inlinestatic

Definition at line 151 of file qobject_p.h.

References o.

◆ get() [2/2]

static QObjectPrivate * QObjectPrivate::get ( QObject * o)
inlinestatic

Definition at line 150 of file qobject_p.h.

References o.

Referenced by QQmlDebugConnectorParams::QQmlDebugConnectorParams(), QQmlDelegateModelAttached::QQmlDelegateModelAttached(), QQmlDMAbstractItemModelData::QQmlDMAbstractItemModelData(), QQmlDMListAccessorData::QQmlDMListAccessorData(), QQmlDMObjectDataMetaObject::QQmlDMObjectDataMetaObject(), QQmlGadgetPtrWrapper::QQmlGadgetPtrWrapper(), QQmlInterceptorMetaObject::QQmlInterceptorMetaObject(), QQmlOpenMetaObject::QQmlOpenMetaObject(), QQmlOpenMetaObject::QQmlOpenMetaObject(), QQmlProxyMetaObject::QQmlProxyMetaObject(), QQmlVMEResolvedList::QQmlVMEResolvedList(), QSGDefaultPainterNode::QSGDefaultPainterNode(), QUntypedBindable::QUntypedBindable(), QGraphicsItem::~QGraphicsItem(), QObject::~QObject(), QQmlDMListAccessorData::~QQmlDMListAccessorData(), QQmlGadgetPtrWrapper::~QQmlGadgetPtrWrapper(), QWidgetItemV2::~QWidgetItemV2(), addConnection(), QQmlGuardImpl::addGuard(), QQuickAbstractAnimationPrivate::animationGroupDirty(), QQuickPropertyChangesParser::applyBindings(), QQmlConnectionsParser::applyBindings(), QQuickPointerHandler::approveGrabTransition(), QCocoaEventDispatcher::clearCurrentThreadCocoaEventDispatcherInterruptFlag(), QMetaObjectPrivate::connect(), QQmlNotifierEndpoint::connect(), connectImpl(), correctWidgetContext(), QQmlType::createWithQQmlData(), QQuickItemPrivate::deliveryAgentPrivate(), QQuickWindowPrivate::deliveryAgentPrivate(), QQmlNotifierEndpoint::disconnect(), QMetaObjectPrivate::disconnect(), doActivate(), QXcbWindow::doFocusIn(), QQmlPropertyData::doMetacall(), QQuickRow::doPositioning(), QQuickGrid::doPositioning(), QMacStyle::drawPrimitive(), dumpRecursive(), ensureAuthorizationDialogNotBlocked(), QEventLoop::exec(), QInputDevicePrivate::get(), QQmlData::get(), QPointingDevicePrivate::get(), QXcbScrollingDevice::get(), QInputDevicePrivate::get(), QQmlVMEMetaObject::get(), QQmlInterceptorMetaObject::get(), ModelNodeMetaObject::get(), QQmlData::get(), QPointingDevicePrivate::get(), QQmlComponentPrivate::get(), QQmlContextPrivate::get(), QQmlDelegateModelPrivate::get(), QQmlDelegateModelGroupPrivate::get(), QQmlExpressionPrivate::get(), QQuickAnchorsPrivate::get(), QQuickDragAttachedPrivate::get(), QQuickLabelPrivate::get(), QQuickTextAreaPrivate::get(), QQuickTextEditPrivate::get(), QQuickTextFieldPrivate::get(), QXcbScrollingDevice::get(), QtSharedPointer::ExternalRefCountData::getAndRef(), QQmlDesignerMetaObject::getNodeInstanceMetaObject(), ListModel::getOrCreateModelObject(), QXcbWindow::handleButtonPressEvent(), QItemSelectionModel::hasSelection(), QV4::Heap::ModelObject::init(), QCocoaSessionManager::instance(), QQmlThread::isThisThread(), QQmlContextData::isValid(), QCoreApplicationPrivate::lockThreadPostEventList(), QQmlData::markAsDeleted(), QV4::Heap::QObjectWrapper::markObjects(), matches_objectName_non_null(), QQmlVMEMetaObject::metaCall(), QObject::moveToThread(), QQuickDesignerSupportItems::objectWasDeleted(), operator<<(), PixmapEntry::pixmap(), platformInputContext(), QQmlMetaType::propertyCache(), QQmlPrivate::qdeclarativeelement_destructor(), QQmlPrivate::qmlExtendedObject(), qmltcCreateDynamicMetaObject(), QQml_setParent_noEvent(), qt_wasDeleted(), QXcbWindow::relayFocusToModalWindow(), removeConnection(), QQuickColumn::reportConflictingAnchors(), QQuickRow::reportConflictingAnchors(), QQuickGrid::reportConflictingAnchors(), QPixmapIconEngine::scaledPixmap(), QQuickItemPrivate::sceneGraphContext(), QQuickItemPrivate::sceneGraphRenderContext(), QQuickRow::setLayoutDirection(), QQuickGrid::setLayoutDirection(), QQmlDMListAccessorData::setModelData(), QQuickSelectionRectangle::setTarget(), QCocoaWindow::setVisible(), QComboBox::showPopup(), QQmlData::signalEmitted(), QQuickShaderEffectSource::updatePaintNode(), QQuick3DItem2D::updateSpatialNode(), QQmlData::wasDeleted(), QLayout::widgetEvent(), and QWindowsContext::windowsProc().

◆ getPropertyAdaptorSlotObject()

QtPrivate::QPropertyAdaptorSlotObject * QObjectPrivate::getPropertyAdaptorSlotObject ( const QMetaProperty & property)

Used by QPropertyAdaptorSlotObject to get an existing instance for a property, if available

Definition at line 5541 of file qobject.cpp.

References QtPrivate::QPropertyAdaptorSlotObject::cast(), connections, QObjectData::metaObject, methodIndexToSignalIndex(), and property.

+ Here is the call graph for this function:

◆ isDeclarativeSignalConnected()

bool QObjectPrivate::isDeclarativeSignalConnected ( uint signalIdx) const
inline

Definition at line 240 of file qobject_p.h.

References declarativeData, QObjectData::isDeletingChildren, and QAbstractDeclarativeData::isSignalConnected.

Referenced by isSignalConnected().

+ Here is the caller graph for this function:

◆ isSignalConnected()

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 420 of file qobject.cpp.

References QObjectPrivate::SignalVector::at(), connections, QObjectPrivate::ConnectionList::first, isDeclarativeSignalConnected(), signalIndex, QObjectPrivate::ConnectionData::signalVector, and QObjectPrivate::ConnectionData::signalVectorCount().

Referenced by QGraphicsScenePrivate::_q_emitUpdated(), QGraphicsScenePrivate::markDirty(), QGraphicsScenePrivate::processDirtyItemsRecursive(), and QVariantAnimationPrivate::setCurrentValueForProgress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maybeSignalConnected()

bool QObjectPrivate::maybeSignalConnected ( uint signalIndex) const

Definition at line 446 of file qobject.cpp.

References QObjectPrivate::SignalVector::at(), connections, QObjectPrivate::ConnectionList::first, signalIndex, QObjectPrivate::ConnectionData::signalVector, and QObjectPrivate::ConnectionData::signalVectorCount().

+ Here is the call graph for this function:

◆ moveToThread_helper()

void QObjectPrivate::moveToThread_helper ( )

Definition at line 1719 of file qobject.cpp.

References QList< T >::at(), QObjectData::bindingStorage, child, QObjectData::children, i, QCoreApplication::sendEvent(), QList< T >::size(), and QEvent::ThreadChange.

+ Here is the call graph for this function:

◆ receiverList()

QObjectList QObjectPrivate::receiverList ( const char * signal) const

◆ reinitBindingStorageAfterThreadMove()

void QObjectPrivate::reinitBindingStorageAfterThreadMove ( )

Definition at line 465 of file qobject.cpp.

References QObjectData::bindingStorage, QObjectData::children, i, and QList< T >::size().

+ Here is the call graph for this function:

◆ removeConnection()

bool QObjectPrivate::removeConnection ( QObjectPrivate::Connection * c)
inlinestatic

\threadsafe

Definition at line 5496 of file qobject.cpp.

References QObjectPrivate::ConnectionData::AlreadyLockedAndTemporarilyReleasingLock, connections, QOrderedMutexLocker::dismiss(), get(), Q_ASSERT, QMetaObjectPrivate::signal(), and signalSlotLock().

Referenced by QObject::disconnect(), doActivate(), and queued_activate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParent_helper()

void QObjectPrivate::setParent_helper ( QObject * o)

Definition at line 2219 of file qobject.cpp.

References QList< T >::append(), QEvent::ChildAdded, QEvent::ChildRemoved, QObject::children(), QListSpecialMethodsBase< T >::indexOf(), QObjectData::isWidget, QBasicAtomicPointer< X >::loadRelaxed(), o, QObjectData::parent, QEvent::ParentAboutToChange, QEvent::ParentChange, Q_ASSERT, Q_ASSERT_X, Q_FUNC_INFO, qPrintable, qScopeGuard(), qWarning, QObjectData::receiveParentEvents, QObjectData::sendChildEvents, QCoreApplication::sendEvent(), threadData, and QObjectData::wasDeleted.

Referenced by QWidgetPrivate::setParent_sys().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setThreadData_helper()

void QObjectPrivate::setThreadData_helper ( QThreadData * currentData,
QThreadData * targetData,
QBindingStatus * status )

◆ signalIndex()

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 4210 of file qobject.cpp.

References base, QMetaObjectPrivate::decodeMethodSignature(), QMetaObjectPrivate::get(), QMetaObjectPrivate::indexOfSignalRelative(), QMetaObjectPrivate::originalClone(), Q_ASSERT, and QMetaObjectPrivate::signalOffset().

+ Here is the call graph for this function:

◆ writeToDebugStream()

void QObjectPrivate::writeToDebugStream ( QDebug & dbg) const
virtual

Definition at line 4472 of file qobject.cpp.

Member Data Documentation

◆ [union]

union { ... } QObjectPrivate

◆ connections

◆ currentChildBeingDeleted

QObject* QObjectPrivate::currentChildBeingDeleted

Definition at line 209 of file qobject_p.h.

Referenced by deleteChildren().

◆ declarativeData

QAbstractDeclarativeData* QObjectPrivate::declarativeData

Definition at line 210 of file qobject_p.h.

Referenced by isDeclarativeSignalConnected().

◆ extraData

ExtraData* QObjectPrivate::extraData
mutable

◆ sharedRefcount

QAtomicPointer<QtSharedPointer::ExternalRefCountData> QObjectPrivate::sharedRefcount

Definition at line 215 of file qobject_p.h.

◆ threadData


The documentation for this class was generated from the following files: