Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15864

Include guard doesn't follow the given header extension when adding a new class

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1) Select New file or project
      2) Select "C++ Class"
      3) Set class name as Foo, header as "foo.hpp" and source as "foo.cpp"
      4) Observe, that the generated header file contains include guard:

      #ifndef FOO_H
      #define FOO_H

      #endif // FOO_H

      However, FOO_HPP would be expected as the given file name was "foo.hpp".

      This is also inconsistent behavior, because this works correctly if you select "C++ Header File" in step 2. In that case the generated include guard is FOO_HPP as expected.

      Attachments

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

        Activity

          People

            hunger Tobias Hunger
            juzzlin Jussi Lind
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes