Solved Qt Creator: New warnings added
-
I removed my Qt and downloaded a new one.
I installed the version Qt 5.12.6 (MSVC 2017 x64).After that, I created a new Qt Widgets Application and I got these warnings:
Here is my *.pro file:
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webenginewidgets CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui TRANSLATIONS += \ ccc_pt_BR.ts # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
What I have to do to fix these warnings?
-
Go to Tools->Options->C++->Code Model and then click 'Manage'. Make a copy of your currently selected configuration and add -Wno-c++98-compat to the Clang command options in the bottom box. See the comments of the blog post announcing QtCreator 4.11 that talk about this problem. There appears to be a patch for this that will probably be included in the next QtCreator release.
https://www.qt.io/blog/qt-creator-4.11.0-is-released#commento-login-box-container
-
@fem_dev Please take a look at Tools/Analyser/Clang Tools and ensure "Clang-Tidy and Clazy preselected checks [built-in]" is selected:
-
Go to Tools->Options->C++->Code Model and then click 'Manage'. Make a copy of your currently selected configuration and add -Wno-c++98-compat to the Clang command options in the bottom box. See the comments of the blog post announcing QtCreator 4.11 that talk about this problem. There appears to be a patch for this that will probably be included in the next QtCreator release.
https://www.qt.io/blog/qt-creator-4.11.0-is-released#commento-login-box-container