Commit graph

218 commits

Author SHA1 Message Date
Simon Hausmann
3276d2b2cd Add doc link
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2022-07-22 23:09:08 +02:00
Simon Hausmann
a5cd0a7173 Simplify window item interaction in the core library
Simlify the borrow_pin / downcast_pin dance a little by using VRcMapped.
2022-07-22 23:09:08 +02:00
Olivier Goffart
65346c699c Attempt to get the "image-in-corelib" feature compile with C++ 2022-07-20 12:57:37 +02:00
Olivier Goffart
ced9504635 Fix warning in nightly rust
```
warning: unused return value of `alloc::boxed::Box::<T>::from_raw` that must be used
Warning:    --> internal/core/properties.rs:382:9
    |
382 |         Box::from_raw(_self as *mut BindingHolder<B>);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
```

Just do what the note says
2022-07-18 16:21:27 +02:00
Olivier Goffart
dacc01a583 vtable 0.1.8 released 2022-07-05 16:57:24 +02:00
Olivier Goffart
615c7635ee Qt: use a HashMap for the cache
And not the cache dirrectly within the item, because it is already in use
for the partial rendering
2022-05-31 10:48:24 +02:00
Olivier Goffart
91acbeed92 VTable: use NonNull as internal data.
That way, `Option<VBox<X>>` has the same layout as `VBox<X>`
2022-05-30 13:54:35 +02:00
Olivier Goffart
530623a61b vtable: update changelog for release 2022-05-04 09:30:09 +02:00
Tobias Hunger
c825eee228 janitor: Update global cspell
Update global cspell words and remove some file-wide words.

Also remove a manual test that is now also run as a proper test case.
2022-04-12 12:03:45 +02:00
Olivier Goffart
d0501b4f3c Bump vtable version
Commit 99ac33c440 make use of the new Debug impl
in ctable from corelib, so we must update the minimum required version
from its Cargo.toml
2022-04-07 11:17:50 +02:00
Tobias Hunger
99ac33c440
Debug for ItemRc (#1151)
* vtable: Add Debug implementation to VRc

This will just print the pointer value to be able to destinguish between
different VRcs.

* Derive Debug implmentation for ItemRc

This needs vtable::VRc to have a Debug implementation!

* Update helper_crates/vtable/src/vrc.rs

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-04-06 16:14:30 +02:00
Tobias Hunger
626f7c64fc vtable: Quieten possible warning about unused unsafe 2022-03-22 18:33:15 +01:00
Tobias Hunger
86a6add32c janitor: Fix typos and make cspell happy 2022-03-18 10:15:44 +01:00
Olivier Goffart
c35e4dfdc8 vtable: fix the changelog date 2022-03-09 14:06:33 +01:00
Tobias Hunger
f3feab1267
Implement ptr_eq for VWeak and PartialEq for Items (#976)
* Implement ptr_eq for VWeaks

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-21 17:45:18 +01:00
Tobias Hunger
58e7caafb0
Fix LICENSES symlinks 2022-02-09 17:05:47 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
1425ef63de Change the Url from sixtyfps.io to slint-ui.com
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +01:00
Olivier Goffart
00ff5e21a7 Update git repository URL 2022-02-08 08:26:21 +01:00
Tobias Hunger
1534f87e30
Change authors to Slint Developers 2022-02-02 16:21:34 +01:00
Olivier Goffart
8273a3e147 Use document-features from crates.io 2022-02-01 17:55:11 +01:00
Olivier Goffart
8762582fac document-features: Only use Cargo.toml.orig if the original don't have comments
git can create Cargo.toml.orig if there was a conflict. That file might then prevent
the compilation as it contains merge conflict and this crate cannot parse it.

So only use the .orig if the Cargo.toml file don't contains docs comments
2022-01-31 17:29:38 +01:00
Olivier Goffart
8e39eab49f document-features: Allow for comments after [features] 2022-01-31 16:38:11 +01:00
Olivier Goffart
bdd0b4cc6b document-features: Don't add the Feature flags in the title 2022-01-31 16:38:11 +01:00
Olivier Goffart
13c12c81c1 document-features: Change licenses and add descriptions and keywords 2022-01-31 16:38:11 +01:00
Olivier Goffart
6371192bec Add a macro to generate the features documentation from comments in Cargo.toml 2022-01-31 16:38:11 +01:00
Olivier Goffart
a45dcc1f9a Update to edition 2021
The ffi function wrapper need to be changed because in the 2021 edition, when
the capture is moved into the closure, it moves the individual field instead
of the whole wrapper. But we need to move the whole wrapper because the Drop
of the wrapper will delete the C++ closure, and we don't want to call the
closure after it is deleted.
2022-01-25 11:40:11 +01:00
Olivier Goffart
c3f0402966 Put the date in the vtable ChangeLog 2022-01-21 09:25:56 +01:00
Tobias Hunger
0063476aff Update license information
Use the reuse tool to get a better grip on licenses used in sixtyfps.
Fix a couple of licenses along the way.

* Uses creative commons for our own logo (commercial use!)
* Fixes some license information found in README files and documents
  them with proper .license files.
* Document Apache/MIT for helper_crates/const-field-offset which matches
  what its documentaion site says it uses.
* Add a list of licenses that apply to crates we publish and the tooling
  we have.

This patch only adds static information and does not contain any tooling
support.
2022-01-20 14:45:02 +01:00
Tobias Hunger
2f6be7b31f Mass-add copyright headers into Cargo.toml files 2022-01-19 11:25:21 +01:00
Tobias Hunger
43e4b262c2
janitor: Remove some more unnecessary clone() calls 2022-01-09 14:34:03 +01:00
Tobias Hunger
500dab771f
janitor: Use separate section for Safety information
That makes clippy happy:-)
2022-01-09 14:26:15 +01:00
Olivier Goffart
81602353e2 Implement Default for VWeakMapped 2022-01-05 15:57:16 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Frederick Vollbrecht
12c0ef38fb
Typos: repeating words in documentation, across the repository (#753)
* fixed typo in image.rs

* unnecessary repeated words in sixtyfps_runtime

* unnecessary repeated words in sixtyfps_compiler

* unnecessary repeated word in docs

* unnecessary repeated words in helper_crates
2021-12-19 17:40:45 +01:00
Olivier Goffart
dc7942fa86 Fix warnings when generting documentation 2021-12-12 14:33:37 +01:00
Simon Hausmann
8f4d5585ae Fix vrc build to target architecures that need polyfills for atomic ops 2021-11-29 17:28:16 +01:00
Simon Hausmann
dc2f4c0bb4 Add support for no_std to VRcMapped and VWeakMapped
Port away from owning_ref, which doesn't support no_std, use a raw pointer instead.
2021-11-29 17:28:16 +01:00
Olivier Goffart
41e180f184 Make vtable no_std 2021-11-25 12:02:16 +01:00
Olivier Goffart
06f37b40cf Update ChangeLog of helper crates 2021-11-24 16:21:04 +01:00
Olivier Goffart
390b838c21 Use intra doc links in the documentation of vtable and const-field-offset macro 2021-11-09 17:37:31 +01:00
Olivier Goffart
669f96d2b6 const-field-offset: Also fix privacy rule when field-offset-trait feature is activated 2021-11-09 14:36:50 +01:00
Olivier Goffart
d97fe873ec Fix the FieldOffsets derive macro on non pub struct
When the struct expose as public a private type
2021-11-08 19:01:29 +01:00
Simon Hausmann
94b19d3df9 Add VRcMapped::origin() 2021-11-08 13:41:52 +01:00
Simon Hausmann
5af91a133e Fix compilation when trying to clone VRcMappend and VWeakMapped
A #[derive(Clone)] imposes Clone on the VTable type, which
doesn't make sense here.
2021-11-05 11:17:55 +01:00
Olivier Goffart
c506e87484 Add VRcMapped::map 2021-11-05 09:50:58 +01:00
Simon Hausmann
2b70e28d54 Move VRcMapped::map to VRc::map
This makes the functionality easier to discover and seems more consistent.
2021-11-04 19:59:04 +01:00
Olivier Goffart
3cdd830417 Bump vtable version 2021-11-04 19:57:52 +01:00
Simon Hausmann
183ff6586b Add VrcMapped and VWeakMapped to allow for references to objects that are reachable via VRc
For now this requires pinning on the type contained in VRc as well as
the fields mapped to. This could be lifted using additional flags, but
for now this is what we need anyway.
2021-11-04 19:57:36 +01:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00