Things To Look Out For In Reviews: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Created.)
 
(Start section on new classes)
Line 12: Line 12:
* enums should either be scoped or have an explicit underlying type. '''Rationale:''' prevents the enum's underlying_type to change (which would be BiC). References: http://eel.is/c++draft/enum#dcl.enum-7.sentence-3, https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#The_Do's_and_Don'ts (Point 3)
* enums should either be scoped or have an explicit underlying type. '''Rationale:''' prevents the enum's underlying_type to change (which would be BiC). References: http://eel.is/c++draft/enum#dcl.enum-7.sentence-3, https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#The_Do's_and_Don'ts (Point 3)


== New Classes ==
Make sure new classes follow the [https://codereview.qt-project.org/c/meta/quips/+/321050 draft value-class mechanics QUIP-22].
=== Polymorphic Classes ===
- Make dtor out-of-line, even if empty (then =default it). '''Rationale:''' pins the vtable to a single TU (and prevents -Wweak-vtable warnings). References: https://bugreports.qt.io/browse/QTBUG-45582


= Decided To Keep Here =
= Decided To Keep Here =


(make a proper subsection grouping when moving stuff here)
(make a proper subsection grouping when moving stuff here)

Revision as of 08:36, 5 January 2024


This page is a low-entry-bar staging area for potential project-wide guidelines. After each release, we should go over each of these and decide whether we keep them here, or, preferably, fold them into [API Design Principles], [Qt Coding Style], [Coding Conventions] or a new or existing QUIP.

Newly-Added Things

When adding a new Thing, don't forget to provide rationale.

Enums

New Classes

Make sure new classes follow the draft value-class mechanics QUIP-22.

Polymorphic Classes

- Make dtor out-of-line, even if empty (then =default it). Rationale: pins the vtable to a single TU (and prevents -Wweak-vtable warnings). References: https://bugreports.qt.io/browse/QTBUG-45582

Decided To Keep Here

(make a proper subsection grouping when moving stuff here)