Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt-Contribution-Guidelines: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=Qt Contribution Guidelines= | [[Category:Developing_Qt::Guidelines]] | ||
= Qt Contribution Guidelines = | |||
We have a community around the development of the Qt libraries, Qt related tools and add-ons. These guidelines will introduce you to the tools and mechanics as well as to the philosophies behind the development of Qt. You will learn how to set up your development environment for working on the library itself and how to submit code/documentation for inclusion. | We have a community around the development of the Qt libraries, Qt related tools and add-ons. These guidelines will introduce you to the tools and mechanics as well as to the philosophies behind the development of Qt. You will learn how to set up your development environment for working on the library itself and how to submit code/documentation for inclusion. | ||
[[Image:Qt_Contribution_Process.png]] | [[Image:http://qt.io/uploads/image_upload/Qt_Contribution_Process.png|http://qt.io/uploads/image_upload/Qt_Contribution_Process.png]] | ||
==Prerequisites== | == Prerequisites == | ||
First you have to get the Qt source code and set up your local working environment to build Qt. See | First you have to get the Qt source code and set up your local working environment to build Qt. See "Get the source":http://wiki.qt.io/Get_The_Source for instructions. | ||
==Style, Conventions and Principles== | == Style, Conventions and Principles == | ||
For development of the Qt framework we follow the | For development of the Qt framework we follow the framework's [[Qt_Coding_Style|Coding Style]] and we stick to our established [[Coding-Conventions|Coding Conventions]]. The "KDE Library Code Policy":http://techbase.kde.org/Policies/Library_Code_Policy is based on Qt's, so much is shared with Qt's. You can find more information there that isn't in Qt pages. | ||
Qt Creator uses its own | Qt Creator uses its own "Qt Creator Specific Coding Style & Conventions":http://doc.qt.digia.com/qtcreator-extending/coding-style.html. It is similar to the Qt framework's coding style and conventions, but there are some differences and additions. | ||
In addition, conventions for writing good user interface messages texts that play well with Qt Linguist can be found under [[ | In addition, conventions for writing good user interface messages texts that play well with Qt Linguist can be found under [[UI_Text_Conventions]]. | ||
Our [[API-Design-Principles| | Our [[API-Design-Principles|API Design Principles]] aim for perfection. | ||
Note that Qt is an open source library, and must therfore be compilable in its completeness using freely available tools and libraries. This means that you should not contribute code that uses any kind of private | Note that Qt is an open source library, and must therfore be compilable in its completeness using freely available tools and libraries. This means that you should not contribute code that uses any kind of private APIs. | ||
Please follow the [[Commit Policy]]. | Please follow the [[Commit_Policy|Commit Policy]]. | ||
Verify that your commits have correct author information, including your name and email address as it is registered in gitorious.org. | Verify that your commits have correct author information, including your name and email address as it is registered in gitorious.org. | ||
==Localization to Other Languages== | == Localization to Other Languages == | ||
The process of contributing translations is described in [[Qt-Localization|Qt Localization]]. | The process of contributing translations is described in [[Qt-Localization|Qt Localization]]. | ||
==Making Changes to Qt== | == Making Changes to Qt == | ||
The [[Git_Introduction]] page describes a basic workflow of using Git to create changes, while the [[Gerrit_Introduction|Gerrit_Tutorial]] in detail describes how our version of Gerrit works for the Qt Project. | |||
Make sure it compiles with [[Qt_In_Namespace]] | |||
== | == Submitting your changes for inclusion into Qt == | ||
There are some steps you need to follow only once:<br /># "Create an account&quot;:http://bugreports.qt.io on the Qt Project bug tracker (Jira). This will be the same login information you will use in the "Gerrit code review system&quot;:http://codereview.qt.io. Even though the account credentials are shared, you still need to complete the account details on the "Gerrit code review system&quot;:http://codereview.qt.io. See the next step.<br /># Login on and set up "your Gerrit account&quot;:http://codereview.qt.io/#settings,contact by adding your full name, email address, and public SSH key.<br /># Review and agree to the Qt Project's contribution agreement in Gerrit. You only need to do this once, unless the license changes. If your company has a corporate contribution agreement, ask the owner of the according Gerrit user group to add your account to this group.<br /># Clone Qt from Gitorious.<br />'''''' Qt 4: Add a git remote called "gerrit&quot; in your cloned repository, which points to the Qt 4 project on <code&gt;codereview.qt.io&lt;/code&gt;.<br />'''''' Qt 5: When you run the init-repository script, provide your Gerrit username to the —codereview-user option. | |||
Then there are steps you need to follow for each patch you contribute:<br /># Push you changes to remote "gerrit&quot; to the branch <code&gt;refs/for/master&lt;/code&gt;, if <code&gt;master&lt;/code&gt; is the branch you are targeting.<br /># The [[Early Warning System]] (EWS) will quickly kick in and check your patch. Please act upon the reports and push updates to the patch.<br /># '''Add relevant reviewers to your change(s).''' If you don't do this, your change may go unnoticed. To find possible reviewers, you can:<br />'''''' examine the Git history with 'git log' and/or 'git blame',<br />'''''' see the [[Maintainers|Maintainer chart]],<br />'''''' ask on IRC, or<br />'''''' ask on relevant mailing lists like development<code>qt.io or qt-creator<code>qt.io etc.<br /># Wait for reviews, and actively partake in the review of your change(s).<br />'''''' If your contribution is deemed to not align with the project's vision or goals, you should [[Gerrit Tutorial|abandon the change]] at this point.<br />'''''' If your contribution is deemed unready, you need to fix it up according to the reviews.<br /># Submit your patch. If your contribution satisfies the technical requirements, then you or the Approver are able to submit the patch into the staging branch, or directly into the target branch, if there's no CI system on that particular branch and/or repository.<br />'''''' To determine if the branch is covered by the CI system, you may check "the CI logs&quot;:http://testresults.qt.io/ci/ ; if the project/branch can be found at this link, it is covered by CI.<br />'''''' If the [[Public_Autotest_Infrastructure|continuous integration (CI)]] system rejects your patch, you need to fix the issues so it passes the project's build and autotest systems.<br /># When CI is successful, your changes are automatically included and added to the official Qt repository. | |||
== | == Developer's Lounge == | ||
If you have any questions about the development of Qt, feel free to join the <code&gt;#qt-labs&lt;/code&gt; IRC channel on <code&gt;irc.freenode.net&lt;/code&gt; and the "Qt development mailing list&quot;:http://lists.qt.io/mailman/listinfo/development Qt Creator development, join <code&gt;#qt-creator on irc.freenode.net&lt;/code&gt; and the "Qt Creator mailing list&quot;:http://lists.qt.io/mailman/listinfo/qt-creator. | |||
Revision as of 14:28, 23 February 2015
Qt Contribution Guidelines
We have a community around the development of the Qt libraries, Qt related tools and add-ons. These guidelines will introduce you to the tools and mechanics as well as to the philosophies behind the development of Qt. You will learn how to set up your development environment for working on the library itself and how to submit code/documentation for inclusion.
http://qt.io/uploads/image_upload/Qt_Contribution_Process.png
Prerequisites
First you have to get the Qt source code and set up your local working environment to build Qt. See "Get the source":http://wiki.qt.io/Get_The_Source for instructions.
Style, Conventions and Principles
For development of the Qt framework we follow the framework's Coding Style and we stick to our established Coding Conventions. The "KDE Library Code Policy":http://techbase.kde.org/Policies/Library_Code_Policy is based on Qt's, so much is shared with Qt's. You can find more information there that isn't in Qt pages.
Qt Creator uses its own "Qt Creator Specific Coding Style & Conventions":http://doc.qt.digia.com/qtcreator-extending/coding-style.html. It is similar to the Qt framework's coding style and conventions, but there are some differences and additions.
In addition, conventions for writing good user interface messages texts that play well with Qt Linguist can be found under UI_Text_Conventions.
Our API Design Principles aim for perfection.
Note that Qt is an open source library, and must therfore be compilable in its completeness using freely available tools and libraries. This means that you should not contribute code that uses any kind of private APIs.
Please follow the Commit Policy.
Verify that your commits have correct author information, including your name and email address as it is registered in gitorious.org.
Localization to Other Languages
The process of contributing translations is described in Qt Localization.
Making Changes to Qt
The Git_Introduction page describes a basic workflow of using Git to create changes, while the Gerrit_Tutorial in detail describes how our version of Gerrit works for the Qt Project.
Make sure it compiles with Qt_In_Namespace
Submitting your changes for inclusion into Qt
There are some steps you need to follow only once:
# "Create an account":http://bugreports.qt.io on the Qt Project bug tracker (Jira). This will be the same login information you will use in the "Gerrit code review system":http://codereview.qt.io. Even though the account credentials are shared, you still need to complete the account details on the "Gerrit code review system":http://codereview.qt.io. See the next step.
# Login on and set up "your Gerrit account":http://codereview.qt.io/#settings,contact by adding your full name, email address, and public SSH key.
# Review and agree to the Qt Project's contribution agreement in Gerrit. You only need to do this once, unless the license changes. If your company has a corporate contribution agreement, ask the owner of the according Gerrit user group to add your account to this group.
# Clone Qt from Gitorious.
' Qt 4: Add a git remote called "gerrit" in your cloned repository, which points to the Qt 4 project on <code>codereview.qt.io</code>.
' Qt 5: When you run the init-repository script, provide your Gerrit username to the —codereview-user option.
Then there are steps you need to follow for each patch you contribute:
# Push you changes to remote "gerrit" to the branch <code>refs/for/master</code>, if <code>master</code> is the branch you are targeting.
# The Early Warning System (EWS) will quickly kick in and check your patch. Please act upon the reports and push updates to the patch.
# Add relevant reviewers to your change(s). If you don't do this, your change may go unnoticed. To find possible reviewers, you can:
' examine the Git history with 'git log' and/or 'git blame',
' see the Maintainer chart,
' ask on IRC, or
' ask on relevant mailing lists like developmentqt.io or qt-creator
qt.io etc.
# Wait for reviews, and actively partake in the review of your change(s).
' If your contribution is deemed to not align with the project's vision or goals, you should abandon the change at this point.
' If your contribution is deemed unready, you need to fix it up according to the reviews.
# Submit your patch. If your contribution satisfies the technical requirements, then you or the Approver are able to submit the patch into the staging branch, or directly into the target branch, if there's no CI system on that particular branch and/or repository.
' To determine if the branch is covered by the CI system, you may check "the CI logs":http://testresults.qt.io/ci/ ; if the project/branch can be found at this link, it is covered by CI.
' If the continuous integration (CI) system rejects your patch, you need to fix the issues so it passes the project's build and autotest systems.
# When CI is successful, your changes are automatically included and added to the official Qt repository.
Developer's Lounge
If you have any questions about the development of Qt, feel free to join the <code>#qt-labs</code> IRC channel on <code>irc.freenode.net</code> and the "Qt development mailing list":http://lists.qt.io/mailman/listinfo/development Qt Creator development, join <code>#qt-creator on irc.freenode.net</code> and the "Qt Creator mailing list":http://lists.qt.io/mailman/listinfo/qt-creator.