mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
C++: Fix remaining doxygen warnings in sixtyfps.h
This commit is contained in:
parent
929dd8dbf4
commit
919cc3065f
1 changed files with 9 additions and 0 deletions
|
@ -262,8 +262,13 @@ class ComponentWeakHandle
|
||||||
vtable::VWeak<private_api::ComponentVTable, T> inner;
|
vtable::VWeak<private_api::ComponentVTable, T> inner;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// Constructs a null ComponentWeakHandle. lock() will always return empty.
|
||||||
ComponentWeakHandle() = default;
|
ComponentWeakHandle() = default;
|
||||||
|
/// Copy-constructs a new ComponentWeakHandle from \a other.
|
||||||
ComponentWeakHandle(const ComponentHandle<T> &other) : inner(other.inner) { }
|
ComponentWeakHandle(const ComponentHandle<T> &other) : inner(other.inner) { }
|
||||||
|
/// Returns a new strong ComponentHandle<T> if the component the weak handle points to is
|
||||||
|
/// still referenced by any other ComponentHandle<T>. An empty std::optional is returned
|
||||||
|
/// otherwise.
|
||||||
std::optional<ComponentHandle<T>> lock() const
|
std::optional<ComponentHandle<T>> lock() const
|
||||||
{
|
{
|
||||||
if (auto l = inner.lock()) {
|
if (auto l = inner.lock()) {
|
||||||
|
@ -446,7 +451,9 @@ public:
|
||||||
/// Model to be used when we just want to repeat without data.
|
/// Model to be used when we just want to repeat without data.
|
||||||
struct IntModel : Model<int>
|
struct IntModel : Model<int>
|
||||||
{
|
{
|
||||||
|
/// Constructs a new IntModel with \a d rows.
|
||||||
IntModel(int d) : data(d) { }
|
IntModel(int d) : data(d) { }
|
||||||
|
/// \private
|
||||||
int data;
|
int data;
|
||||||
int row_count() const override { return data; }
|
int row_count() const override { return data; }
|
||||||
int row_data(int value) const override { return value; }
|
int row_data(int value) const override { return value; }
|
||||||
|
@ -459,7 +466,9 @@ class VectorModel : public Model<ModelData>
|
||||||
std::vector<ModelData> data;
|
std::vector<ModelData> data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// Constructs a new empty VectorModel.
|
||||||
VectorModel() = default;
|
VectorModel() = default;
|
||||||
|
/// Constructs a new VectorModel from \a array.
|
||||||
VectorModel(std::vector<ModelData> array) : data(std::move(array)) { }
|
VectorModel(std::vector<ModelData> array) : data(std::move(array)) { }
|
||||||
int row_count() const override { return data.size(); }
|
int row_count() const override { return data.size(); }
|
||||||
ModelData row_data(int i) const override { return data[i]; }
|
ModelData row_data(int i) const override { return data[i]; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue