diff options
Diffstat (limited to 'src/gui/text/qabstracttextdocumentlayout.cpp')
-rw-r--r-- | src/gui/text/qabstracttextdocumentlayout.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp index 8528f59844..7aa3aa7453 100644 --- a/src/gui/text/qabstracttextdocumentlayout.cpp +++ b/src/gui/text/qabstracttextdocumentlayout.cpp @@ -436,7 +436,8 @@ void QAbstractTextDocumentLayout::registerHandler(int objectType, QObject *compo if (!iface) return; // ### print error message on terminal? - connect(component, SIGNAL(destroyed(QObject*)), this, SLOT(_q_handlerDestroyed(QObject*))); + QObjectPrivate::connect(component, &QObject::destroyed, d, + &QAbstractTextDocumentLayoutPrivate::_q_handlerDestroyed); QTextObjectHandler h; h.iface = iface; @@ -457,7 +458,8 @@ void QAbstractTextDocumentLayout::unregisterHandler(int objectType, QObject *com const auto it = d->handlers.constFind(objectType); if (it != d->handlers.cend() && (!component || component == it->component)) { if (component) - disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(_q_handlerDestroyed(QObject*))); + QObjectPrivate::disconnect(component, &QObject::destroyed, d, + &QAbstractTextDocumentLayoutPrivate::_q_handlerDestroyed); d->handlers.erase(it); } } |