diff --git a/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp b/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp --- a/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp +++ b/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp @@ -81,10 +81,10 @@ ParserArguments defaultArguments() { const static ParserArguments arguments{ - QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99"), - QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11"), - QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=CL1.1"), - QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11"), + QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -Wno-error -std=c99"), + QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -Wno-error -std=c++11"), + QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -Wno-error -std=CL1.1"), + QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -Wno-error -std=c++11"), true }; diff --git a/plugins/custom-definesandincludes/definesandincludesmanager.cpp b/plugins/custom-definesandincludes/definesandincludesmanager.cpp --- a/plugins/custom-definesandincludes/definesandincludesmanager.cpp +++ b/plugins/custom-definesandincludes/definesandincludesmanager.cpp @@ -356,15 +356,16 @@ Q_ASSERT(QThread::currentThread() == qApp->thread()); + auto cfg = item->project()->projectConfiguration().data(); + const auto arguments = findConfigForItem(m_settings->readPaths(cfg), item).parserArguments; + auto buildManager = item->project()->buildSystemManager(); if ( buildManager ) { const auto args = buildManager->extraArguments(item); if (!args.isEmpty()) - return args; + return args + argumentsForPath(item->path(), arguments); } - auto cfg = item->project()->projectConfiguration().data(); - const auto arguments = findConfigForItem(m_settings->readPaths(cfg), item).parserArguments; return argumentsForPath(item->path(), arguments); }