Qt Creator Beautifier and different projects - qt

We would like to associate different kind of styles to different projects. I have been looking for and Qt Creator in its new version (4) has the possibility to autoformat files on saving using Beautifier.
My Question is if there is any way to associate for example a style file to one project to be opened when we open that project.
That file would be in the root folder of the project and would be downloaded automatically from the repository.

Looking at the 'Beautifier' options, I see that 'Artistic Style' and 'Uncrustify' has an option to use a file from the project directory as the style file. It's up to you to create these files for each project.
Update for clangformat: If you select the "File" option from the "Predefined Styles" list, clang-format should use a file from the project directory. For more info see the description for -style argument here.

Related

Generate doxygen documentation using Qt project file

How can I tell doxygen to (only) use the files that are in my Qt project file when generating the documentation?
Reason for asking: I'm using a folder structure where a 'common' folder holds files that are used by some (not all) Qt projects I'm working on. Like this:
projects
MyProject
common_files
SubProject_A
SubProject_B
Both SubProject folders will have a Doxyfile and both projects will use some files from the common_files folder.
I know one way to achieve my goal (getting the documentation for just the files used in my project) is to manually add all files in the INPUT setting from the doxygen configuration file. But that would mean I'll have to change the Doxyfile every time I add or delete a file to/from my project.
Doxygen should be able to filter the files needed for the documentation from the .pro file. But how?

Use script files from another project inside same solution

I'm trying to use some script files between different projects. I have one solution with four projects. In the project "A" I have some scripts like Jquery, Javascript Plugins, etc, and i want to use them on the project "B", by adding a scriptmanager, or anything that works. What can i do this?
I'm using Visual Studio 2010.
Here is a printscreen with my environment.
[EDIT]
Hello, after doing what #CStick says, a have now the scripts in my other project, so a can't add them to a ScriptManager. The problem is path not found on Asp.net code. It cant find the script cause they're placed in the other project. What can i do to solve it?
I know this is old, but for future reader i post an answer.
You will have to use "Link project file" for this.
From the target project, right click on the folder you what the file to be
Select add -> Existing file
Browse to the file you need then click on the arrow at the right of the add button and select add as a link
After this you can modify the file in booth project, but the fille will be only in the source physical location until you publish the project.
This can cause problem for client side file, like script file, on debug because you cant view the file because it's not physically in the target project.
You can use MsBuild to copy the source file on the target directory on build.
(See this answer)
In short, you will create a .targets file then add a reference in your project file.

Adding files inside a Creator project

I can add headers to the header path but how can I bring in external headers to be available within Creator for editing in project, so they appear in the file list like other headers created from scratch? in Xcode, you could just drag files into the project, they'd be copied into the project directory and appear in the IDE for editing. I'd assume you could do this in Creator but I can't find any way to do so.
Right Click on the project -> Add Existing Files... -> Choose your desired external headers
this way you can edit them (but it is not recommended to edit external headers)
Note: This way, the files will get compiled with your project, so you need to include all dependencies.
Use qmake - project from the command line in the directory containing the files and they will generate a .pro and you can copy that into a .pri and then include the .pri in your project, thus allowing you to access and edit the files from within Creator but segregating them nicely should you choose to use those files in other projects as well, but maintaining a single set of build and qmake settings.
If you add project headers to a target in CMakeLists.txt, they'll show up in Qt Creator.
file(GLOB HEADERS src/*.hpp src/*.h)
file(GLOB SOURCES src/*.cpp)
add_library(FreenectDriver SHARED ${HEADERS} ${SOURCES})

How to exclude files from being copied to bin-debug on build

Using Adobe Flex Builder Pro stand-alone, how do I filter or exclude some files in my project source folder from being copied into the bin-debug folder during a build? Flex Builder is based on the Eclipse platform IDE, this could be as much of a question about Eclipse as it is Flex Builder.
You can prevent Flex from copying all extra files like this:
Within Flex Navigator panel, right-click on the Flex project
Choose Properties
Click on "Flex Compiler" on the left
Under "Compiler Options" DESELECT "Copy non-embedded files to output folder"
Click OK
If you want to include some but not others, then you can use a custom Ant build script to do the build and copy the limited files you want to copy.
Eclipse allows you to specify include and exclude patterns on the Java build path. The following describes how to exclude files from the Java path, there may be an equivalent on the Flex Build Path properties page.
Update: This is how it is done in Java, I imagine that the Flex Build Path would implement it in a similar way if at all. As someone has kindly voted me down for saying that it might be done this way it appears that this is not supported in Flex.
Open the project Properties (right-click->Properties or Alt-Enter)
Select Java Build Path and the Source tab.
Expand a source folder and select the Excluded: child item
Select Edit...
on the dialog, you can then specify one or more glob patterns to exclude files from the path
If you want to exclude specific resources but still include non-embedded files you can add a Resource Filter.
Open the project Properties
Select Resource > Resource Filters
Add a Resource Filter by clicking Add... on the right
Set Filter type to Exclude all
Set Applies to to Files and folders and select All children (recursive)
Specifiy the File and Folder Attributes (i.e.: Name matches ".git")
Click OK and then Apply to save your new Resource Filters.
Clean the project by going to Project > Clean... and clicking OK
This process can also be used to create an "Include Only" resource filter, essentially white-listing instead of black-listing.

create .project file for flex application

I want to add my flex project to a SCM like Clearcase and then allow other developers download it and use in FlexBuilder.
What foramt do i need to place it in my clearcase so users can simply download and import into Flex Builder? Is there some way to create a .project file or similiar to allow Flex Recognise the project in clearcase?
I do not know Flex Builder project config files (I do know very well ClearCase though), but this question looks like "Do you keep your project files under version control ?" or "Which eclipse files belong under Version Control"
In essence, you should put any config file in ClearCase as long as you have relative path and/or variable for the other users to interpret.
A snapshot or dynamic ClearCase view will simply present those files for them to use, whatever they are. For instance, some eclipse .project or .classpath can be stored that way, while using linked directories.
So for Flex Builder project, one way to determine what file to store is to copy a minimal subset of those files in a new directory and check if you can re-open your project successfully.
Once the minimal set of file is determined, you can "add to source control" them.

Resources