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

Qt Creator incorrect warning message "Included header"

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes