- 
    
Bug
 - 
    Resolution: Duplicate
 - 
    
  Not Evaluated                     
     - 
    5.12
 - 
    None
 
- 
        12b8283f899ebcf401d974927314b9531334a56e
 
When declaring a function prepended by a Q_INVOKABLE, the moc is only able to generate an invokable function in the meta object when not using a placeholder type specifier auto.
E.g. the following declaration is being generated correctly
Q_INVOKABLE 
qint32 find(const QString &);
but this ones is not:
Q_INVOKABLE auto find(const QString &) -> qint32;
Reading the docs, it is stated that the macro should be placed in front of the return type. So even trying weird things like
auto find(const QString &) -> Q_INVOKABLE qint32;
does not work.
There is a simple workaround by not using auto in the first place. But in order to provide a clean interface definition in the header file it would be great to be able to use auto.
- duplicates
 - 
                    
QTBUG-71123 "moc" failed to parse auto in trailing-return-type signals and slots
-         
 - Closed
 
 -