CONTRIBUTING 1.69 KB
Newer Older
Boudhayan Gupta's avatar
Boudhayan Gupta committed
1 2 3 4 5 6 7 8 9 10 11
COMMIT POLICY

Everybody is welcome to committing small fixes and one-liners
without prior notification to the maintainer, provided that the
following rules are followed:

    1. Please keep your commits as small and as atomic as possible.
    2. Do not push both formatting and code changes in the same
       commit.
    3. Do not fix coding style and code issues in the same commit.

12
For larger commits, please use Gitlab or send
Boudhayan Gupta's avatar
Boudhayan Gupta committed
13 14 15 16 17 18 19 20 21 22 23
and e-mail to the maintainer. A rule of thumb to check whether your
commit is a major commit is if it affects more than 5 lines of code.

Break down larger fixes into smaller commits. Even if you push the
commits with one "git push", git preserves your commit info.

i18n and documentation fixes, however large they are, may be directly
committed without prior notification.

CODING STYLE

Boudhayan Gupta's avatar
Boudhayan Gupta committed
24
Spectacle follows the KDELibs coding style, with a few execptions:
Boudhayan Gupta's avatar
Boudhayan Gupta committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38

    1. In class definitions, access modifiers are aligned along with
       member declarations, i.e., at one level right. E.g.:

       class Hello : public QObject
       {
           Q_OBJECT

           public:

           void function();
       }

       The access modifier ordering is: public, signals, public slots,
Boudhayan Gupta's avatar
Boudhayan Gupta committed
39 40 41
       protected slots, protected, private slots, private. Member variables
       come at the end, after all member functions. This is not strictly
       enforced, but is a good rule to follow.
Boudhayan Gupta's avatar
Boudhayan Gupta committed
42

43
    2. Member variables follow the format mCamelCase, and not m_camelCase
Boudhayan Gupta's avatar
Boudhayan Gupta committed
44 45
       which is more common throughout the rest of the KDE Applications

46
    3. Source files are mixed case, named the same as the class they
Boudhayan Gupta's avatar
Boudhayan Gupta committed
47 48 49
       contain. i.e., SomeClass will be defined in SomeClass.cpp, not
       someclass.cpp

Boudhayan Gupta's avatar
Boudhayan Gupta committed
50
Happy coding!