Calamares is released under the terms of the GNU GPL, version 3 or later. Every source file must have a license header, with a list of copyright holders and years.
Example:
```
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2013-2014, Random Person <name@example.com>
* Prefix class member variables with `m_`, e.g. `m_queue`.
* Prefix static member variables with `s_`, e.g. `s_instance`.
* Functions are named in the Qt style, like Java's, without the 'get' prefix.
* A getter is `variable()`.
* If it's a getter for a boolean, prefix with 'is', so `isCondition()`.
* A setter is `setVariable( arg )`.
Includes
--------
Header includes should be listed in the following order:
* own header,
* Calamares includes,
* includes for Qt-based libraries,
* Qt includes,
* other includes.
They should also be sorted alphabetically for ease of locating them.
Includes in a header file should be kept to the absolute minimum, as to keep compile times short. This can be achieved by using forward declarations instead of includes,
like `class QListView;`.
Example:
```
#include "Settings.h"
#include "CalamaresApplication.h"
#include "utils/CalamaresUtils.h"
#include "utils/Logger.h"
#include "YamlUtils.h"
#include <QDir>
#include <QFile>
#include <yaml-cpp/yaml.h>
```
Use include guards, not `#pragma once`.
C++ tips
--------
All C++11 features are acceptable, and the use of new C++11 features is encouraged when
it makes the code easier to understand and more maintainable.
The use of `nullptr` is preferred over the use of `0` or `NULL`.
For Qt containers it is better to use Qt's own `foreach`. For all other containers, the
range-based `for` syntax introduced with C++11 is preferred ([see this blog post][1]).