[Development] QTBUG-111330: moc help needed: parsing QtDBus Q_NOREPLY

Thiago Macieira thiago.macieira at intel.com
Mon Mar 13 17:58:52 CET 2023

On Monday, 13 March 2023 09:51:00 PDT Thiago Macieira wrote:
> On Monday, 13 March 2023 08:46:03 PDT Fabian Kosmale via Development wrote:
> > Hi,
> > 
> > I can look into fixing this from the moc side. Is there any smaller,
> > self-contained reproducer than KWallet?
> Yes. I don't know whether the -a or -p option to qdbusxml2cpp is the one
> generating the offending code, but it's either
> qdbusxml2cpp -N -p - foo.xml
> or
> qdbusxml2cpp -N -a - foo.xml
> One generates:
> public Q_SLOTS: // METHODS
>     inline void Q_NOREPLY Method()
>     {
>         QList<QVariant> argumentList;
>         callWithArgumentList(QDBus::NoBlock, QStringLiteral("Method"),
> argumentList);
>     }
> the other generates
> public Q_SLOTS: // METHODS
>     void Q_NOREPLY Method();

BTW, if you get to fix moc, please fix it so it can parse when Q_NOREPLY appears 
at the beginning of the line, which is where attributes must be, without 
breaking the ability to extract tags. 

This may be asking too much, because moc would need to understand that in a 
declaration like:

  Foo Bar method();

Foo is a tag and Bar is the return type.

Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230313/de1e842e/attachment.bin>

More information about the Development mailing list