Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to disable "Implicitly defined onFoo properties in Connections are deprecated." warning?



  • Qt 5.14 introduced a new format for the Connections callback using Javascript callbacks.
    This generates a warning since Qt 5.15 but this warning could be disabled thanks to this check:

    if (lcQmlConnections().isWarningEnabled())
    

    To still use the same code on Qt 5.12 and Qt 5.15, I would like to disable this warning for now.
    I have tried with the QT_LOGGING_RULES env variable and QLoggingCategory::setFilterRules like this in my main:

    QLoggingCategory::setFilterRules("qt.qml.connections.warning=false");
    

    But the warnings are still here.

    Even when checking with:

    Q_LOGGING_CATEGORY(lcQmlConnections, "qt.qml.connections")
    
    int main(int argc, char*** argv)
    {
        QLoggingCategory::setFilterRules("qt.qml.connections.warning=false");
        qDebug() << "qml.connections warning enabled?"
                     << lcQmlConnections().isWarningEnabled();
        [...]
    }
    

    The result is false but the warnings are there.

    Do you have any idea?

    Thank you



  • There was a comment in the release blog about this: The logging categories will be available with 5.15.1 because the related change did not make it into Qt 5.15.0.

    By the way, to find this out: See the git history of the related file, and find the change that introduced this line of code on gerrit.
    https://codereview.qt-project.org/c/qt/qtdeclarative/+/293011
    -> Click on "included in" button in gerrit to see if a release is listed there.



  • There was a comment in the release blog about this: The logging categories will be available with 5.15.1 because the related change did not make it into Qt 5.15.0.

    By the way, to find this out: See the git history of the related file, and find the change that introduced this line of code on gerrit.
    https://codereview.qt-project.org/c/qt/qtdeclarative/+/293011
    -> Click on "included in" button in gerrit to see if a release is listed there.



  • Thank you @Markus43
    I haved missed this info.


Log in to reply