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

Creator 4.14.1 code model introduces new error



  • Hi all -

    Updated to 4.14.1 this morning, and am now getting the error:

    /home/mzimmers/git/build-KOL-UI-Desktop_Qt_5_14_2_GCC_64bit-Debug/src/lib/lib_prod_autogen/GPNSVM5MMZ/moc_change_consumables.cpp:96: error: comparing floating point with == or != is unsafe [-Werror=float-equal]
    In file included from src/lib/lib_prod_autogen/mocs_compilation.cpp:3:0:
    src/lib/lib_prod_autogen/GPNSVM5MMZ/moc_change_consumables.cpp: In static member function ‘static void BottleDataCC::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
    src/lib/lib_prod_autogen/GPNSVM5MMZ/moc_change_consumables.cpp:96:62: error: comparing floating point with == or != is unsafe [-Werror=float-equal]
                 if (_t->m_volume != *reinterpret_cast< float*>(_v)) {
                                                                  ^
    

    As you can see, it's generated from one of my MOC files (my code doesn't even do any float comparisons), but I think this is the offending code:

    struct BottleDataCC {
        Q_GADGET
    public:
        float m_volume;
        float m_amountNeeded;
        Q_PROPERTY(float volume MEMBER m_volume)
        Q_PROPERTY(float amountNeeded MEMBER m_amountNeeded)
    };
    

    Any suggestions on how to handle this error? Thanks.


Log in to reply