[Development] Qt warnings and -Weverything/-Werror

achartier at fastmail.fm achartier at fastmail.fm
Tue May 13 21:36:02 CEST 2014

Hi all,

It looks like Thiago Macieira committed a fix for this back in January
(just add paths to QMAKE_DEFAULT_INCDIRS). I am currently using Qt
5.2.1. Does this mean that this fix is present in the upcoming Qt 5.3
release? Also, with the QMAKE_DEFAULT_INCDIRS approach, is the path
addition logic recursive (i.e., -isystem will apply to all subfolders)
or do child folders need to be listed explicitly (I'm hoping it's



On Tue, May 13, 2014, at 12:28 PM, achartier at fastmail.fm wrote:
> Hi all,
> I would like to enable the -Weverything and -Werror Clang compiler flags
> for my application code to treat all warnings as errors. Unfortunately,
> Qt itself generates a large number of warnings. I would like to suppress
> the warnings generated for Qt code but have Clang report all the
> warnings (errors) in my application code.
> I have searched a lot on this subject and have not found a solution that
> really works. The proper way to do this is to use the -isystem flag and
> specify the Qt include directories so they may be treated as system
> headers, however qmake seems to always pass the Qt include directories
> with the -I argument no matter what I do (I even tried INCLUDEPATH -=
> <Qt_include_dirs> to no avail).
> The only approach that has worked so far is to use the -Wno flag to
> disable certain warnings. This is far from desirable, as then the
> warning checking in my application code is tied to the quality of the Qt
> codebase.
> This bug report (https://bugreports.qt-project.org/browse/QTBUG-7220)
> seems to indicate that this is currently not possible with qmake. I hope
> this isn't the case and that someone has a solution for this problem.
> Any help is greatly appreciated.
> Thanks,
> Alfonso

More information about the Development mailing list