File tree 2 files changed +10
-0
lines changed
crates/cxx-qt-lib/src/core/qvariant
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
### Fixed
22
22
23
23
- ` qrc ` resources added to ` CxxQtBuilder ` or ` QtBuild ` now trigger ` cargo:rerun-if-changed ` for file entries
24
+ - Fix not being able to use ` QVariant ` as a ` #[qproperty] ` , because the ` PartialEq ` implementation was missing
24
25
25
26
## [ 0.5.0] ( https://github.com/KDAB/cxx-qt/compare/v0.4.1...v0.5.0 ) - 2023-03-08
26
27
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ mod ffi {
35
35
#[ doc( hidden) ]
36
36
#[ rust_name = "qvariant_clone" ]
37
37
fn construct ( variant : & QVariant ) -> QVariant ;
38
+ #[ doc( hidden) ]
39
+ #[ rust_name = "qvariant_eq" ]
40
+ fn operatorEq ( a : & QVariant , b : & QVariant ) -> bool ;
38
41
}
39
42
}
40
43
@@ -121,6 +124,12 @@ impl QVariant {
121
124
}
122
125
}
123
126
127
+ impl std:: cmp:: PartialEq for QVariant {
128
+ fn eq ( & self , other : & Self ) -> bool {
129
+ ffi:: qvariant_eq ( self , other)
130
+ }
131
+ }
132
+
124
133
pub trait QVariantValue {
125
134
fn can_convert ( variant : & QVariant ) -> bool ;
126
135
fn construct ( value : & Self ) -> QVariant ;
You can’t perform that action at this time.
0 commit comments