From caab0ad35799df3b2059bd3707b727dc0b5671aa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 13 Jan 2020 11:20:14 +0100 Subject: Fix Mandelbrot Example documentation with regards to qRegisterMetaType() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The call to qRegisterMetaType() has been removed since the type is registered as a meta type in Qt 5. Assert on the meta type id instead. Adapt the documentation accordingly. Fixes: QTBUG-81254 Change-Id: I0cb459d0dda7a82fc37871605ff634004af0f9f9 Reviewed-by: Paul Wicking Reviewed-by: MÃ¥rten Nordheim --- examples/corelib/threads/doc/src/mandelbrot.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/corelib/threads/doc/src/mandelbrot.qdoc b/examples/corelib/threads/doc/src/mandelbrot.qdoc index 9e3fdc1dfe..b32fa097b3 100644 --- a/examples/corelib/threads/doc/src/mandelbrot.qdoc +++ b/examples/corelib/threads/doc/src/mandelbrot.qdoc @@ -238,8 +238,7 @@ \snippet threads/mandelbrot/mandelbrotwidget.cpp 1 The interesting part of the constructor is the - qRegisterMetaType() and QObject::connect() calls. Let's start - with the \l{QObject::connect()}{connect()} call. + QObject::connect() call. Although it looks like a standard signal-slot connection between two \l{QObject}s, because the signal is emitted in a different @@ -254,9 +253,10 @@ With queued connections, Qt must store a copy of the arguments that were passed to the signal so that it can pass them to the slot later on. Qt knows how to take of copy of many C++ and Qt - types, but QImage isn't one of them. We must therefore call the - template function qRegisterMetaType() before we can use QImage - as a parameter in queued connections. + types, so, no further action is needed for QImage. + If a custom type was used, a call to the template function + qRegisterMetaType() would be required before the type + could be used as a parameter in queued connections. \snippet threads/mandelbrot/mandelbrotwidget.cpp 2 \snippet threads/mandelbrot/mandelbrotwidget.cpp 3 -- cgit v1.2.3