-
Notifications
You must be signed in to change notification settings - Fork 29
Contribute
The Qt-SESAM team would be glad if you like to contribute to the code. To do so, please fork the repository, create a clone of the forked repository on your local computer, add your code, test it thoroughly, check in your changes, then send us a pull request with the proposed changes.
Please adhere to the following C++ code style to maintain consistency across all .h and .cpp files:
- Use Stroustrup's indentation style with two (2) spaces per indent:
- Put curly braces on same line for
for
/while
/if
…. - Put curly braces on next line for function,
class
andstruct
definitions. - Do not indent braces further than the preceding line.
- Do not use a "cuddled"
else
, i.e. anelse
on the same line after the closing curly brace ofif
block. - Enclose single-line blocks with curly braces, e.g. after
if
orelse
. Exception: A single-line block with only areturn
doesn't need to be enclosed with braces.
- Put curly braces on same line for
- Use
void
to denote an empty argument list, e.g.int generateUid(void)
. - Use CamelCase identifiers with first character in lowercase for variables (
thisIsAVariable
), in uppercase for classes and constants/enums (MyClass
,MyConstant
). - Don't use underscores in identifiers (
disallowed_name_or_method
,_alsoUnwanted
). - Use private member variables managed by a
QScopedPointer
pointing to a separate class (see Using Private Classes and D-Pointers, concise example in tcpclient.h/tcpclient.cpp). - Omit type hints in identifiers (e.g.
pszName
to identify a pointer to a zero-terminated string is not acceptable). - Bind
*
and&
in types/declarations to identifier (e.g.int *value = Q_NULLPTR
;) and rightconst
/volatile
(e.g.int *const *value
;). - Use speaking identifiers.
- Header files have to be suffixed by .h, C++ code files by .cpp.
- Please implement all functionality in .cpp files, not in the header files.
Before you send us a pull request it's mandatory that you first update the branch you're working on with the latest changes from the repository you forked from. For this to happen you have to configure a remote that points to the upstream repository once for the local clone of your fork:
git remote add upstream https://github.com/ola-ct/Qt-SESAM.git
After that you can sync the fork. First, fetch the branches and their respective commits from the upstream repository:
git fetch upstream
Then make sure that "master" is up to date by making it the active branch and merging the most recent commits from the upstream repository:
git checkout master
git merge upstream/master
It's not recommended to work on issues that are not known to the public. If no appropriate issue has been filed, please do so before you commence. You'll need the issue number (#…) for further reference.
Let's say you want to work on issue #987 then create a new branch to work in:
git checkout -b Issue-987
Please always follow the scheme "Issue-xy" (where xy denotes the issue number) to name a branch.
You can now make your changes.
Before committing with git commit …
please test your code extensively.
After committing and before pushing you have to update your branch with the potential changes found in the master branch: After executing the steps described in "Keep up to date" type:
git merge master
If merge conflicts occured, resolve them. Then test again before committing.
You may then push the changes to your fork:
git push -u origin Issue-987
The -u
tells git to add a remote for that branch. You can omit this switch in later pushes.
If you'd like to share your changes please send us a pull request.
If you've never worked on the branch you want to modify, you have to pull the branch from upstream:
git pull upstream Issue-987
If the branch already exists in your fork you can skip that step and directly enter that branch:
git checkout Issue-987
Qt-SESAM is licensed under the GNU General Public License v3 or later. So please take care not to use (third-party) code which doesn't comply to this license.
Copyright © 2015-2016 Oliver Lau, Heise Medien GmbH & Co. KG.
Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren Version.
Diese Software wurde zu Lehr- und Demonstrationszwecken programmiert und ist nicht für den produktiven Einsatz vorgesehen. Der Autor und die Heise Medien GmbH & Co. KG haften nicht für eventuelle Schäden, die aus der Nutzung der Software entstehen, und übernehmen keine Gewähr für ihre Vollständigkeit, Fehlerfreiheit und Eignung für einen bestimmten Zweck.