Contributing to the QET source code

The goal of this page is to teach you basics about the QET source code and how to contribute effectively to the project.

Access the source code

To contribute to QElectroTech (QET), you need to have access to the source code.

Source control is provided by Git.

If you need help to setup Git, please take a look at the Git Documentation.

Access the code documentation

To better understand the QET code base, you can read the code documentation generated by doxygen.

This documentation is kept up-to-date by an action running on the upstream repository. If you however want to generate and read it locally, clone it and run the command doxygen Doxyfile at the root of the created directory.

Compile the app from source

To set up a dev environment and compile the app locally, please refer to the Build Guidelines.

Submit code

To add your additions to the QET codebase, you need to open a Merge Request in the source code Git repository. This section will teach you the syntax used in the project and some basic guidelines when contributing.

Coding Style Setup

Note

Make sure to follow the QET Coding style before submitting code.

  1. First you’ll want to download the corresponding XML file.

  2. Second, you’ll need to import it into the QT Creator IDE. To do this, follow those steps:

    • Go to the “Project” tab and click on the “Code Style” element in the list.

    ../_images/qet_developer_style_setup_step_1.png
    • Click on the “Import” button and select the XML file.

    ../_images/qet_developer_style_setup_step_2.png
    • Select the “QET” Code Style in the dropdown

    ../_images/qet_developer_style_setup_step_3.png

Do & Don’t of contributing

Do

Don’t

After forking the repository, please create another branch for your changes. This will allow you to go back if something in the code breaks.

Don’t use git pull when updating your MR, prefer git rebase. This will apply all the latest changes and make the commit history more readable, facilitating testing.

Structure your files so later contributors can easily make changes and additions to your files

Don’t submit spaghetti code. Unmaintainable code is a burden for users, maintainers and future developers.

Always add function descriptions for doxygen. This allows documentation to be updated when you push your additions

Do not submit undocumented code. It makes it tough for maintainers and future contributors to keep track of your features.

Get Help

If you need help regarding building, compiling the app or more insight in the codebase, you can ask help on the QET Forum.