[Qt-creator] Have Locate... provide all files in a CMake project

Andreas Pakulat apaku at gmx.de
Fri Jan 9 20:20:25 CET 2015


Hi Michael,

On Fri, Jan 9, 2015 at 5:18 PM, Michael Jackson <imikejackson at gmail.com>
wrote:

>
> On Jan 9, 2015, at 10:30 AM, Andreas Pakulat <apaku at gmx.de> wrote:
>
> Yeah, I'm using the fact that Ctrl+O uses the editor's directory as base
> as well. So thats my workaround for now for files in a directory thats
> known to cmake already.
>
> It would be nice if the 'Projects' view data model had a switch to either
> consider all vcs-known files in addition to what the projects buildsystem
> provided (like the generic-project setup) or a mode where it considers
> everything in the projects directory to be part of the project. I can see
> how the latter would be an issue for projects building in-source or using
> special subdirs for their build output, so it would have to be optional I
> guess.
>
> Maybe I should check with the cmake list wether there are ways to
> customize what ends up in the codeblocks file without having to try to
> build those sources similar to how the VS-generator provides some special
> things to configure the look of the project in the IDE.
>
> It seems having a custom filter for the project directory could work,
> though refreshing it is a little cumbersome (would be nice if that would be
> hooked up with filesystem-watcher).
>
> Either way, thanks for confirming that I didn't just overlook something
> obvious.
>
>
> So I use the "File System View" on the left side to get at files that are
> not part of the project but are located in my project. Things like .rc,
> images, CMake files (*.cmake) and some other misc files and I find that is
> a good workaround for NOT having them just show up in the Project. Eclipse
> has 2 views for projects. One is the traditional "project" view that only
> considers the files that the project knows about. The other view is the
> true "File System" view which is just a tree starting at the level of the
> Project Root Directory and shows EVERY file no matter what. I think this
> works really well and is close to the "File System" view that already
> exists in Creator.
>

I'm using Eclipse for Java and that one includes all files in all subdirs
of the project no matter wether they're used for creating the binary at the
end or not. I've not used the C++ support in Eclipse for years. KDevelop
also shows the project tree with all files it finds on disk (and has a
filter to hide things that are distracting). In both cases things that are
considered part of the project have dedicated visualization, the Java view
arranges all java packages into a flat list so one does not have to drill
into a tree. KDevelop uses special icons for folders that have
CMakeLists.txt and adds items for build-targets so one can see which files
belong to the target. I find that quite a bit more usable than what
QtCreator presented me :|


> Also, I think part of QtCreator's problems with CMake files is that
> QtCreator only considers the top level code blocks file that is generated.
> There are other code block files within the build tree that fully describe
> all the files for a project, include paths, compiler invocations and things
> like that. This is leading to other problems with include paths not being
> found (See bug reports).
>

Really? My cmake 3.1 generated just 1 cbp file at the top, that contains
all kinds of information. Including several targets with include-dirs per
target and a long list of source files and headers. This is on Linux with
the CodeBlocks+Ninja generator.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150109/6d2fe30c/attachment.html>


More information about the Qt-creator mailing list