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

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:
    d36e0941-704d-4c96-adaf-37850799c42a-image.png

    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?

    ec4d3a8f-1211-4820-88ed-690f03e40e34-image.png



  • 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:
    2ce3df27-aa3e-4276-a650-656d9ee5c6dc-image.png



  • 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


Log in to reply