[Qt-interest] Qt::AutoConnection fails

Thiago Macieira thiago.macieira at trolltech.com
Tue Apr 14 22:43:08 CEST 2009


Stefan Bisplinghoff wrote:
>- Debugging of the emit indicates, that the slot is connected in queued
>mode, but is not called, because the condition in qobject.cpp
>        "if (c.argumentTypes == &DIRECT_CONNECTION_ONLY)"
>succeeds and the action is aborted.

That line can only be true in one condition only: the arguments you're 
trying to pass are only possible in direct connections. And it's only 
possible as well in AutoConnections. And it's also only possible after 
this warning has been printed:

            qWarning("QObject::connect: Cannot queue arguments of type 
'%s'\n"
                     "(Make sure '%s' is registered using 
qRegisterMetaType().)",
                     typeName.constData(), typeName.constData());

Usually, we assume that people fix the warnings that they find, but in this 
case all signs point to this warning being ignored. Can you verify if this 
warning is being printed?

Hint to everyone: always run your applications with QT_FATAL_WARNINGS=1. 
Do not let Qt warnings go unfixed: they really mean that there's an error 
in your code.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090414/8d12f6cc/attachment.bin 


More information about the Qt-interest-old mailing list