Howdy,

I don't like the separation of headers and sources into separate tree
item parents in the Project Explorer view, so I've been adding them
into the OTHER_FILES variable using the following qmake lines at the
end of my top level project file ...


FILETYPES = \
    pluginspec.in \
    pri \
    pro \

VARIABLES = \
    FORMS \
    HEADERS \
    OTHER_FILES \
    RESOURCES \
    SOURCES \

defineTest(addSubdirs) {
    for(subdir, $$1) {
        for(filetype, FILETYPES) {
            OTHER_FILES += $$subdir/*.$$filetype
            for(variable, VARIABLES) {
                values = $$fromfile($${subdir}/$$basename(subdir).pro,
$$variable)
                for(value, values) {
                    OTHER_FILES += $$subdir/$$value
                }
            }
        }
        subdirs = $$fromfile($${subdir}/$$basename(subdir).pro, SUBDIRS)
        fullsubdirs =
        for(subsubdir, subdirs) {
            fullsubdirs *= $$subdir/$$subsubdir
        }
        addSubdirs(fullsubdirs)
    }
}

addSubdirs(SUBDIRS)



Unfortunately, this doesn't work as of QtCreator 2.3.1/Qt 4.7.4.  It's
probably due to a change in qmake, so I won't pursue it on this list,
but I'm curious about whether people prefer the separation of headers
and sources into separate tree-item parents, or if (like me) having
the headers/source pair under the same tree-item parent is more
desirable.

Cheers,
~ andy.f
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to