Wireshark-dev: Re: [Wireshark-dev] The "right" Qt header files

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Thu, 29 Jun 2017 05:41:13 +0100


On 28 June 2017 at 16:38, Michael Mann via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote:
I use Visual Studio (VS2013 for the moment) for my development, but up until Sharkfest I hadn't done much GUI development.  Now that I've dipped my toe in the water, I'm paying more attention to the project organization done by VS.
 
Why is the "Header Files" folder under UI/qtui only contain Qt generated header files (that I rarely have to reference because they are generated).  In order to get the "real" header files, I have to search through the External Dependencies folder, which makes it much more unmanageable.  Is this just a CMake "feature"?  Is there something simple that can be done to either:
1. Create a new (virtual) folder for the "real" header files
2. Create a new (virtual) folder for the "Qt generated" header files (so the "real" ones can go in the Header Files folder.
3. While we're at it, create a (virtual) folder for the .ui files
 
I will gladly work on a patch if someone can point me in the right direction of places to modify.


The addition of files to Visual Studio project virtual folders is handled in CMake with the SET_TARGET_PROPERTIES() directive, setting the FOLDER property (https://cmake.org/cmake/help/v3.8/prop_tgt/FOLDER.html).

As CMake doesn't explicitly reference header files, they aren't normally added to a virtual folder.

You could add the headers to a file list with a GLOB (possibly recursive) and add them to the files for a target (https://stackoverflow.com/questions/34007099/cmake-how-to-show-headers-in-header-files-in-visual-studio-project).

--
Graham Bloice