-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add QLocale #1086
base: main
Are you sure you want to change the base?
WIP: Add QLocale #1086
Conversation
#[rust_name = "first_day_of_week"] | ||
fn firstDayOfWeek(self: &QLocale) -> DayOfWeek; | ||
|
||
// QString QLocale::formattedDataSize(qint64 bytes, int precision = 2, QLocale::DataSizeFormats format = DataSizeIecFormat) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataSizeFormats is QFlags, do we have prior art on how to model that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We unfortunately don't have anything for flags yet i don't think, we support enums but not flags.
@LeonMatthesKDAB something to figure out for 0.8 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, sounds useful to find an ergonomic way to use Flags for 0.8. We don't have anything yet though.
7a3503e
to
66a08f2
Compare
Added a test |
05c8552
to
018040e
Compare
_cspec: MaybeUninit<usize>, | ||
} | ||
|
||
impl Default for QLocale { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As QLocale is not trivially copyable or destructible can you add a impl Clone for QLocale
and a impl Drop for QLocale
implementation similar to other places (note we have templates for those too eg see how QString is done)
} | ||
} | ||
|
||
fn construct_qlocale() -> QLocale { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once you have Clone implemented you could add a clone test
018040e
to
a9b5564
Compare
a9b5564
to
a18034f
Compare
Not complete yet because: