1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
// SPDX-FileContributor: Joshua Booth <joshua.n.booth@gmail.com>
//
// SPDX-License-Identifier: MIT OR Apache-2.0
use QFlagRepr;
use ExternType;
/// Trait implementation for an element in a [`QFlags`](crate::QFlags).
///
/// # Safety
///
/// By writing the unsafe `QFlag` impl, the programmer asserts that the C++ namespace and type name
/// given in the type id refers to a `QFlags<T>` C++Qt type where T is equivalent to the Rust type
/// that is the `Repr` type of the impl.
///
/// Furthermore, the programmer asserts that `Repr` is the backing integer representation of the
/// enum type that is the `Self` type of the impl.
pub unsafe
/// Internal utility trait for converting `T` in a `QFlag<T>` to the corresponding integer type.
pub