Is there a chance to define a central header (remark) being included in all source code files (automatically) in QtCreator?
The header shall contain just a remark with legal information, copyright, web site of the project etc.
I want to keep it in one central place in order I need to change it. If I manually add it to each .h
/ .cpp
file, I need to change it everywhere in case I want to make adjustments.
The closest thing you can do is to add a licence template (Options -> C++ -> File naming -> License template) like this:
/***************************************************************************
* *
* Copyright (C) %YEAR% by CompanyName *
* *
* http://CompanyName.com *
* *
***************************************************************************/
Creator will prepend this file when creating a source or an header file, replacing %YEAR% with the current year (there might possibly be other place holders).
But if you want to change this notice on already existing files you will have to do by hand (it should not be hard to write a simple regex to do that).