Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122066

Qt Creator incorrect warning message "Included header"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P5: Not important
    • None
    • 6.6.0
    • GUI: Workspace

    Description

      A new yellow warning presents itself that is wrong. "Included header dialog.h is not used directly (fix available) Source clangd. For example:

      fu.h:

      #include <QDialog>

      class Dialog : public QDialog

      {   Q_OBJECT public:     explicit Dialog(QWidget *parent = nullptr);     ~Dialog(); }

      ;

      fu.cpp:

      #include "dialog.h" /*\Included header dialog.h is not used directly (fix available)

      Dialog::Dialog(QWidget *parent)
          : QDialog(parent)
      {}

      Dialog::~Dialog() {}

      The "fix" is to delete the include statement. However, without the include statement, Dialog and QWidget are undefined. Therefore, the "fix" is incorrect.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            psnarf Henry Pfeil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes