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

How to set a warning and an error flag



  • I have two related issues (I use latest Qt and Qt creator: updated this morning).

    1. I would like to temporarily disable all the warnings of one type from the code annotations: in many cases I get annotations saying: "-Wdeprecated-declarations". But I could not find where and how to insert this option to disable display of this kind of warning
    2. From a different contest I read that Clang has a -Werror=uninitalized flag that issues an error, whenever it finds an unitialized variable. Maybe this is just another flag to be used as the one in issue 1) above?
      Thank anyone that helps.


  • @mchome

    • For compiler warning flags, you must edit the .pro file (QMAKE_CXXFLAGS).

    • For editing warning flags: Tools > Options... > Code Model > Clang Code Model > Manage... button.


Log in to reply