[Development] Changes to QObject::connect and other functor-taking API implementations

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed May 3 15:21:40 CEST 2023

Il 02/05/23 12:34, Volker Hilsheimer via Development ha scritto:
> What started as an attempt to provide a few building blocks for making it easier to build asynchronous APIs taking any kind of callable (like QTimer::singleShot or QHostInfo::lookupHost) [1] has turned into a bit of a longer journey to the core.
> [1]https://codereview.qt-project.org/c/qt/qtbase/+/470341
> [2]https://codereview.qt-project.org/c/qt/qtbase/+/475168

A general problem here is whether we can provide this infrastructure as 
a public API. If I have a class of mine and want to provide convenience 
for connecting to slots/callables, how do I do it without using private 
APIs? In Qt 4 days that was a simple:

   void foo(..., QObject *receiver, const char *slot);

But it's not so simple/possible any more with the PMF syntax.

Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230503/d89bd16a/attachment.bin>

More information about the Development mailing list