Skip to content

Commit d02a8ec

Browse files
jnboothLeonMatthesKDAB
authored andcommitted
cxx-qt-lib: clarify QFlagRepr::Int vs QFlag::Repr
1 parent 8a02883 commit d02a8ec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/cxx-qt-lib/src/core/qflags/qflag.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub unsafe trait QFlag: Sized {
2424
/// type TypeId = cxx::type_id!("QFlags_MyType");
2525
/// ```
2626
type TypeId;
27-
/// The backing integer representation of the enum type that is the `Self` type of this impl.
27+
/// The backing integer representation of `Self`.
2828
/// For example, if the enum is defined with `#[repr(i32)]`, then `Repr` should be `i32`.
2929
type Repr: QFlagRepr + ExternType<Kind = cxx::kind::Trivial>;
3030

crates/cxx-qt-lib/src/core/qflags/repr.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ mod private {
99
}
1010

1111
pub trait QFlagRepr: Sized + private::Sealed {
12-
/// Qt chooses the integer representation for a `QFlags<T>` as follows:
12+
/// The underlying integer representation for a `QFlags<T>`.
13+
///
14+
/// Qt chooses the integer representation as follows:
1315
///
1416
/// - If `T` is signed, use a signed integer. Otherwise, use an unsigned integer.
1517
/// - If `T` is 32 bits or less, use a 32-bit integer.

0 commit comments

Comments
 (0)