cxx-qt-lib: mirror PartialEq impls added in the previous commit - #1484
cxx-qt-lib: mirror PartialEq impls added in the previous commit#1484yuknig wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1484 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 75 75
Lines 13484 13484
=========================================
Hits 13484 13484 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
so that QList operand may appear on either side of an equality comparison.
0e22168 to
64e89d1
Compare
ahayzen-kdab
left a comment
There was a problem hiding this comment.
Looks good, a bit unfortunate that because the types are different we need this reversal.
I guess another simpler way could be instead to make a as_slice(&self) -> &[T] method like Vec has then you could do like &[1,2] == list.as_slice().
I note that when looking at Vec<T> against &[T] it only allows you to compare a vec to slice and not slice to vec ? Instead you can do as_slice() to cause a slice to slice comparison which then works
@yuknig So i wonder if we should do the same here, keep only the PartialEq you have in the previous change and then add as_slice(), this would then be consistent with how a Vec works in std i think ?
|
@ahayzen-kdab I'm afraid we can't implement
UPD: The lack of |
@yuknig right in Qt 5 a Qt 6 QList is actually a QVector so likely put |
|
Yes, I think I can adapt codebase on the client side codebase so that it compiles without this change. |
so that QList operand may appear on either side of an equality comparison.