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

The src directories should not contain anything other than headers and sources.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • None
    • Other
    • None

    Description

      Some other file types I have seen in source directories: CMakeLists.txt, .ico files, ...

      This is bad practice, since the src directory is meant for sources (and headers). Using it for any other purpose would qualify as bad naming. The CMakeLists.txt should be a sibling of the src directory, not a child. The icons should go to a resource folder along with other similar resources.

      We should additionally consider splitting the include and source directories in order to have the same file tree in build (include + source) and install (only include) directories. I would argue this is widespread, de-facto standard CMake/C++ practice by now.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            ali.demiralp Ali Can Demiralp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes