Jump to content

Get Involved/development: Difference between revisions

From KDE Community Wiki
Mamarok (talk | contribs)
Platform and Documentation: added KDE dev guide link
Nmariusp (talk | contribs)
Next steps: GitLab forks
 
(439 intermediate revisions by 93 users not shown)
Line 1: Line 1:
__NOTOC__
[[File:Mascot konqi-app-dev.png|right|x250px|]]
== Becoming a KDE Developer ==
By joining the ranks of KDE developers, you will get to implement new features and defeat bugs both daunting and simple. Developers collaborate in teams based on what area they are working on. These can be small teams working on a single application, up to large teams working on a group of related pieces of software, or even meta-teams working on broader topics such as QA or automation. Many developers participate in more than one team.


[[Image:development.png|Development|left]]By joining the ranks of KDE developers, you will get to implement new features and defeat daunting bugs, all while collaborating to make coherent and stable releases. Developers collaborate in teams based on what area they are working in, such as [http://edu.kde.org/ Education], [http://pim.kde.org/ Productivity], or [http://games.kde.org/ Games].
KDE runs or participates in several mentoring programs to help new developers, including an informal list of people who are willing to help newcomers get started. See the [[Mentoring]] page for more details.


Frank Osterfeld advises "start small and scratch your own itch, at least that's what kept me motivated in the beginning."
== Where to find the development team ==


== Communicating with the team ==
The KDE developers are here to assist you if you need any help following this guide.


There are many ways to get in touch with KDE developers, and developers for a specific project:<br /> Start at [irc://irc.kde.org/kde-devel <nowiki>#kde-devel</nowiki>] on irc.freenode.net, or [http://kde.org/support/#irc learn more about IRC].<br /> The central mailinglist for development is the [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel mailing list], [http://kde.org/support/#mailinglists learn about mailing lists]. However each team has its own messaging channels, both on IRC and on the mailinglists, you can find a list [http://www.kde.org/mailinglists/ here].
There are several ways to get in touch with KDE developers, either generally or for a specific project. The most important communication channels are:
* '''Real-time chat:''' [irc://irc.libera.chat/kde-devel #kde-devel] room on the [http://libera.chat/ Libera Chat] IRC network (which is mirrored to the [https://webchat.kde.org/#/room/#kde-devel:kde.org #kde-devel] room on [[Matrix]])
* '''Forum:''' [https://discuss.kde.org/c/development/10 Development forum] on discuss.kde.org
* '''Mailing list:''' [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] ([http://kde.org/support/#mailinglists Learn more about mailing lists])


== Getting and building the code ==
These are general KDE development communication channels, and you may be directed to a more appropriate place for the project you're interested in.


In most cases, you will want to download, compile and install KDE trunk (our development tree) to start developing. Read the [http://techbase.kde.org/Getting_Started/Build/Unstable_Version unstable building guide]. If you get stuck or get errors, that's OK. You might not need to compile the whole set of applications, but getting started is a good step.
* Many projects and teams have their own real-time chat channels, which can be found on the [[Matrix#Rooms|Matrix Rooms]] page.
* There is a [http://www.kde.org/mailinglists/ list of mailing lists] if you want to find a mailing list for a specific team directly.


== Platform and Documentation ==
The [[Main Page]] of this wiki includes links to specific development teams and the [[Get Involved]] page includes links to more general contribution teams.


KDE is written in C++ and uses the Qt framework. If you've never used Qt before, that's not a problem. Before you get started, you'll want to brush up on C++/Qt and our coding guidelines:
== Prerequisites ==


* [http://www.parashift.com/c++-faq-lite/ C++ FAQ lite] - at some point, you'll have a question that is answered here.
=== Skills ===
* [http://original.jamesthornton.com/eckel/TICPP-2nd-ed-Vol-one/Frames.html Thinking in C++ (volume 1)], [http://original.jamesthornton.com/eckel/TICPP-2nd-ed-Vol-two/Frames.html Thinking in C++ (volume 2)] - an online book that goes into some of the technical details of C++
* [http://www.beginning-kdevelop-programming.co.uk/ Beginning KDevelop Programming] - a great guide from start to finish
* [http://doc.trolltech.com/4.7/all-examples.html Qt Examples] - If you're doing any serious coding in KDE you will need to understand Qt. These examples explain what's up but it will take a couple hours. You can do that later.
* [http://techbase.kde.org/Development/Tutorials Basic KDE development tutorials]
* [http://techbase.kde.org/Development KDE coding HOWTO's] - good coding documentation for beginners
* [http://techbase.kde.org/Contribute/Send_Patches Patches HOWTO] - until you earn an account in SVN, your contributions will be made as patches
* [http://techbase.kde.org/Schedules The KDE Development Plans] - This is the bigger picture for the development efforts of the KDE project, everyone should understand these before going forward
* [http://en.flossmanuals.net/kde-guide/ The definite KDE dev book] - a comprehensive guide for KDE developers to be.


== Tasks ==
Most KDE software is written in C++ using the [https://www.qt.io Qt toolkit] and [https://develop.kde.org/products/frameworks/ KDE Frameworks]. Though prior experience with these technologies or other programming languages is helpful, you don't need to be a C++ programmer to get started! For example, no programming knowledge whatsoever is required to do things like improving text labels.


Now you have the code on your computer and maybe got some of it to compile. Here are some tasks for you to get started. You can get your first contribution committed into the project within 1 hour!
If you'd like to dive deeper, the Qt wiki contains [https://wiki.qt.io/Books a list of online books] for learning Qt programming. Qt also provides [https://doc.qt.io/qt-5/qtexamplesandtutorials.html lots of examples] you can look at. For visual learners, [https://www.youtube.com/watch?v=JxyTkXLbcV4&list=PL6CJYn40gN6hdNC1IGQZfVI707dh9DPRc this YouTube playlist of QML tutorials] by KDE patron [https://www.kdab.com KDAB] may be useful. Finally, information about KDE Frameworks can be found on the [https://develop.kde.org/docs KDE Developer Platform] and [https://api.kde.org/ KDE API website]. We also provide a [[Get_Involved/development/Learn|wiki page full of learning resources]].


* [http://techbase.kde.org/Contribute/Bugsquad/Howto The Bugs Howto] - explains how to use and triage bugs. Why's it useful? It makes bug hunting and fixing easier for developers, so more bugs get fixed. Why choose bug triage instead of ...? It doesn't take much time to look over a bug, so it comes in nice small chunks. What skills do I need to do it? Not much, just a bit of patience and sometimes some perseverance. (quote from [http://accentgrave.blogspot.com/2006/03/ive-got-little-bit-of-free-time-so.html Phil's Triage Guide])
=== Operating system ===
* [http://www.englishbreakfastnetwork.org/ English Breakfast Network] - provides a list of functions that need to be documented. Try one of these for practice with svn and doxygen.
* [http://wiki.koffice.org/index.php?title=Junior_Jobs KOffice Junior Jobs] - simple programming jobs for KOffice
* [https://bugs.kde.org/buglist.cgi?keywords=junior-jobs&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&cmdtype=doit Junior Jobs on bugzilla] - a place where people mark jobs that might be easy for beginners to fix
* [https://bugs.kde.org/ KDE Bugzilla] - keeps track of all the bugs in KDE, you will want to bash them all


== Mentor program ==
For KDE development, we recommend a Linux operating system installed on your computer or in a [[/Developing_in_a_virtual_machine|virtual machine]]. The ones best suited for development provide relatively recent versions of libraries needed by KDE software, and use the "[https://en.wikipedia.org/wiki/Rolling_release rolling release]" model. Some examples are Arch Linux, openSUSE Tumbleweed, Solus and KDE neon User Edition. The latest version of Fedora KDE usually works as well.


Getting started in a big project can be hard. Here are some people that are willing to help you learn the ropes and get you on board:
We recommend that you use the KDE Plasma desktop on your Linux operating system.


* Eike Hein (<span class="mailme">hein at kde dot org</span>)<br /> application developer; Konversation maintainer
Support for Windows and macOS are still experimental, and you may have a better experience [[/Developing in a virtual machine|doing your development in a virtual machine using a Linux distribution]]. Setting up a development environment on [[/More#Other_operating_systems|other operating systems--including FreeBSD]]--is an advanced topic.
* Elio Joly Botogoske (<span class="mailme">elio at botogoske dot com</span>)<br />Developer; 20 years C/C++ experience
 
* Albert Astals Cid (<span class="mailme">aacid at kde dot org</span>)<br /> available to hand out junior tasks
== The main way to develop KDE software: kde-builder ==
* Peter Simonsson (<span class="mailme">peter dot simonsson at gmail dot com</span>)<br /> application developer; KOffice devel/Kivio maintainer
 
* Will Entriken (<span class="mailme">kde dot org at phor dot net</span>)<br /> Google Summer of Code KDE developer
KDE uses a custom tool called '''kde-builder''' for setting up a development environment and building KDE software. You only need to set up your environment once, and then you can compile (and recompile) KDE software as often as needed.
* Anne-Marie Mahfouf (<span class="mailme">annemarie dot mahfouf at free dot fr</span>)<br /> KDE-Edu development, KDE4 development, and tutorial writing
 
* Jeremy Whiting (<span class="mailme">jpwhiting at kde dot org</span>)<br /> Developer
Setting up your environment on a Linux machine is fairly simple. You'll need to install a few programs to get started.
* Your name here!<br /> Volunteer to be a mentor -&gt; <span class="mailme">kde dot org at phor dot net</span>
 
 
{{CenteredButtonExt|text=Set up a development environment with kde-builder|link=https://develop.kde.org/docs/getting-started/building/kde-builder-setup/}}
 
 
Once you have a development environment set up, you'll be able to compile single applications or entire software stacks with kde-builder. One particular use that kde-builder makes convenient is compiling a full KDE Plasma session so you can dive into it.
 
 
{{CenteredButtonExt|text=Start compiling KDE software using kde-builder|link=https://develop.kde.org/docs/getting-started/building/kde-builder-compile/}}
 
 
Once you've made some changes to a piece of KDE software, you'll need to submit those changes to KDE for inclusion in the next release. We use a GitLab instance hosted at invent.kde.org, which has a web interface to manage source code submissions (called "Merge Requests"), and this can be done from the terminal as well.
 
{{CenteredButton|text=Submit your new software changes for review|link=Infrastructure/GitLab#Submitting_a_merge_request}}
 
 
Once you've got kde-builder set up, you might also want to configure an IDE of your choice for a more convenient workflow. This is optional.
 
 
{{CenteredButtonExt|text=Configure the Integrated Development Environment|link=https://develop.kde.org/docs/getting-started/building/ide/}}
 
 
Once you've finished learning how to use kde-builder, you might see yourself having certain needs, such as managing different branch groups or having separate builds of KDE software based on Qt6 and Qt5. Those topics are covered in the advanced section. This section is optional.
 
{{CenteredButton|text=Advanced kde-builder features and troubleshooting|link=Get_Involved/development/More}}
 
== Choose what to work on ==
A good place to start is with a small bug or feature in an existing piece of software that affects you personally ("scratch your own itch"). Get in touch with the existing developers (see [[#Where to find the development team|Where to find the development team]], below) and they can help you out, by pointing you to the right place in the code and giving advice about how to tackle the problem.
 
Try not to start by proposing or working on major features or significant design changes. These can be controversial, and the smoothest way to get going is by working on relatively non-controversial bugfixes. Start slowly and build trust!
 
Here are some other ideas for starting points:
 
* Improve awkwardly-worded messages and labels that are written in English. This is a great way for non-programmers to contribute! If you can compile software and have a good grasp of English, you can make a big difference here.
* Work on Junior Jobs, which are small tasks that are suitable for beginners (both bugs and features). You can find them available both on [https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=junior-jobs&list_id=1340815 Bugzilla] and [https://invent.kde.org/dashboard/issues?sort=created_date&state=opened&label_name%5B%5D=Junior+Job Gitlab].
* Work on [https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&keywords=usability&keywords_type=allwords&list_id=1493316&order=product%2Cchangeddate%20DESC%2Cbug_status%20DESC%2Cresolution%2Cpriority%2Cassigned_to%2Cbug_id&query_format=advanced Bugs related to] KDE's [[Goals/Usability_%26_Productivity | Usability & Productivity initiative]], many of which are small and easy.
* Write [[App ideas|small useful apps]].
 
== Source code cross-referencing ==
 
To search for an identifier (e.g. class name, method name, signal name) or for free-text search in all KDE git repositories, KDE provides a code referencing tool at https://lxr.kde.org . This is a very useful tool if you e.g. want to search for code usage examples in existing code.
 
Usage:
* From the '''Branch group''' menu, you can select either '''kf6-qt6''', to search the code in the Git ''master'' branches or '''stable-kf6-qt6''' to search only the stable (released) branches.
* There are two search ''modes'':
** On the '''Identifier search''' page, you can search for (note that this is case sensitive):
*** class names, e.g. ''RenameDialog'', ''StatJob'', and of course any Qt class (used in KDE code, which is pretty much all of them), ''QLatin1String'', ''QListWidget''
*** method names, e.g. ''addConfigSources()'' (from the KConfig framework) and signal names e.g. ''mimeTypeFound()''
** on the '''General search''' page, you can search for strings, e.g. in Dolphin's context menu (accessed by right-clicking any empty space) there is '''Paste Clipboard Contents''', if you want to find in which source file this string is defined, search for '''Paste Clipboard Contents'''. This search includes classes/methods/signals names.
 
Other ways to search across all of the KDE git repositories:
* If you have a github.com account. Log into github.com. Go to https://github.com/KDE , at the top of the page in the search bar ("Type / to search"), write your search term e.g. <code>KMessageBox</code>, select "In this organization". In order to search case sensitive and whole words, you can use case sensitive regex e.g. <code>org:KDE /(?-i)\bKMessageBox\b/</code>.
* <code>kde-builder --src-only</code> will download the source code of more than 300 KDE git repositories in <code>~/kde/src</code>. Search inside this directory. E.g. using Microsoft Visual Studio Code, from a terminal run the command line <code>code ~/kde/src</code>, from the vscode main menu > Edit > Find in Files Ctrl+Shift+F.
 
== Next steps ==
Sharpen your skills by going through the [https://develop.kde.org/docs/ KDE development tutorials].
 
After you have had several drama-free patches accepted, a KDE developer is likely to suggest you get a [[Infrastructure/Get a Developer Account|Developer account]], which will allow you to do git commits directly to KDE projects without the need of GitLab forks. With very few limits on where you can commit, you will be expected to act responsibly. At this point, congratulations! You are officially a KDE developer!
 
== Best practices & other useful information ==
 
* [[Get Involved/Design/Frequently Discussed Topics|Frequently discussed topics and lessons learned regarding the development of user-facing GUI software]]
* [[Guidelines_and_HOWTOs/Debugging|Debugging]]
* [[Guidelines and HOWTOs/UnitTests|Unit testing]]
* [[Guidelines and HOWTOs/Code_Checking| Validating code]]
* [[Guidelines and HOWTOs/API Documentation|Writing API documentation]] (related: https://api.kde.org).
* [[Guidelines and HOWTOs/Licensing|Correctly state license information]]
* [[Guidelines_and_HOWTOs/Wayland_Porting_Notes|Writing Wayland-friendly code]]
* [[Guidelines_and_HOWTOs/Making_apps_run_uninstalled|Running applications and their unit tests without first installing them]]
* [[Infrastructure/GitLab#Testing_someone_else's_merge_request|How to review merge requests]]
 
== Advanced Topics ==
 
This page continues with [[Get_Involved/development/More|more advanced topics]].

Latest revision as of 18:21, 26 October 2024

By joining the ranks of KDE developers, you will get to implement new features and defeat bugs both daunting and simple. Developers collaborate in teams based on what area they are working on. These can be small teams working on a single application, up to large teams working on a group of related pieces of software, or even meta-teams working on broader topics such as QA or automation. Many developers participate in more than one team.

KDE runs or participates in several mentoring programs to help new developers, including an informal list of people who are willing to help newcomers get started. See the Mentoring page for more details.

Where to find the development team

The KDE developers are here to assist you if you need any help following this guide.

There are several ways to get in touch with KDE developers, either generally or for a specific project. The most important communication channels are:

These are general KDE development communication channels, and you may be directed to a more appropriate place for the project you're interested in.

  • Many projects and teams have their own real-time chat channels, which can be found on the Matrix Rooms page.
  • There is a list of mailing lists if you want to find a mailing list for a specific team directly.

The Main Page of this wiki includes links to specific development teams and the Get Involved page includes links to more general contribution teams.

Prerequisites

Skills

Most KDE software is written in C++ using the Qt toolkit and KDE Frameworks. Though prior experience with these technologies or other programming languages is helpful, you don't need to be a C++ programmer to get started! For example, no programming knowledge whatsoever is required to do things like improving text labels.

If you'd like to dive deeper, the Qt wiki contains a list of online books for learning Qt programming. Qt also provides lots of examples you can look at. For visual learners, this YouTube playlist of QML tutorials by KDE patron KDAB may be useful. Finally, information about KDE Frameworks can be found on the KDE Developer Platform and KDE API website. We also provide a wiki page full of learning resources.

Operating system

For KDE development, we recommend a Linux operating system installed on your computer or in a virtual machine. The ones best suited for development provide relatively recent versions of libraries needed by KDE software, and use the "rolling release" model. Some examples are Arch Linux, openSUSE Tumbleweed, Solus and KDE neon User Edition. The latest version of Fedora KDE usually works as well.

We recommend that you use the KDE Plasma desktop on your Linux operating system.

Support for Windows and macOS are still experimental, and you may have a better experience doing your development in a virtual machine using a Linux distribution. Setting up a development environment on other operating systems--including FreeBSD--is an advanced topic.

The main way to develop KDE software: kde-builder

KDE uses a custom tool called kde-builder for setting up a development environment and building KDE software. You only need to set up your environment once, and then you can compile (and recompile) KDE software as often as needed.

Setting up your environment on a Linux machine is fairly simple. You'll need to install a few programs to get started.



Once you have a development environment set up, you'll be able to compile single applications or entire software stacks with kde-builder. One particular use that kde-builder makes convenient is compiling a full KDE Plasma session so you can dive into it.



Once you've made some changes to a piece of KDE software, you'll need to submit those changes to KDE for inclusion in the next release. We use a GitLab instance hosted at invent.kde.org, which has a web interface to manage source code submissions (called "Merge Requests"), and this can be done from the terminal as well.


Once you've got kde-builder set up, you might also want to configure an IDE of your choice for a more convenient workflow. This is optional.



Once you've finished learning how to use kde-builder, you might see yourself having certain needs, such as managing different branch groups or having separate builds of KDE software based on Qt6 and Qt5. Those topics are covered in the advanced section. This section is optional.

Choose what to work on

A good place to start is with a small bug or feature in an existing piece of software that affects you personally ("scratch your own itch"). Get in touch with the existing developers (see Where to find the development team, below) and they can help you out, by pointing you to the right place in the code and giving advice about how to tackle the problem.

Try not to start by proposing or working on major features or significant design changes. These can be controversial, and the smoothest way to get going is by working on relatively non-controversial bugfixes. Start slowly and build trust!

Here are some other ideas for starting points:

  • Improve awkwardly-worded messages and labels that are written in English. This is a great way for non-programmers to contribute! If you can compile software and have a good grasp of English, you can make a big difference here.
  • Work on Junior Jobs, which are small tasks that are suitable for beginners (both bugs and features). You can find them available both on Bugzilla and Gitlab.
  • Work on Bugs related to KDE's Usability & Productivity initiative, many of which are small and easy.
  • Write small useful apps.

Source code cross-referencing

To search for an identifier (e.g. class name, method name, signal name) or for free-text search in all KDE git repositories, KDE provides a code referencing tool at https://lxr.kde.org . This is a very useful tool if you e.g. want to search for code usage examples in existing code.

Usage:

  • From the Branch group menu, you can select either kf6-qt6, to search the code in the Git master branches or stable-kf6-qt6 to search only the stable (released) branches.
  • There are two search modes:
    • On the Identifier search page, you can search for (note that this is case sensitive):
      • class names, e.g. RenameDialog, StatJob, and of course any Qt class (used in KDE code, which is pretty much all of them), QLatin1String, QListWidget
      • method names, e.g. addConfigSources() (from the KConfig framework) and signal names e.g. mimeTypeFound()
    • on the General search page, you can search for strings, e.g. in Dolphin's context menu (accessed by right-clicking any empty space) there is Paste Clipboard Contents, if you want to find in which source file this string is defined, search for Paste Clipboard Contents. This search includes classes/methods/signals names.

Other ways to search across all of the KDE git repositories:

  • If you have a github.com account. Log into github.com. Go to https://github.com/KDE , at the top of the page in the search bar ("Type / to search"), write your search term e.g. KMessageBox, select "In this organization". In order to search case sensitive and whole words, you can use case sensitive regex e.g. org:KDE /(?-i)\bKMessageBox\b/.
  • kde-builder --src-only will download the source code of more than 300 KDE git repositories in ~/kde/src. Search inside this directory. E.g. using Microsoft Visual Studio Code, from a terminal run the command line code ~/kde/src, from the vscode main menu > Edit > Find in Files Ctrl+Shift+F.

Next steps

Sharpen your skills by going through the KDE development tutorials.

After you have had several drama-free patches accepted, a KDE developer is likely to suggest you get a Developer account, which will allow you to do git commits directly to KDE projects without the need of GitLab forks. With very few limits on where you can commit, you will be expected to act responsibly. At this point, congratulations! You are officially a KDE developer!

Best practices & other useful information

Advanced Topics

This page continues with more advanced topics.