Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

nicolasfella
Copy link

Not complete yet because:

  • It's a lot
  • I'm not sure how to wrap some API

#[rust_name = "first_day_of_week"]
fn firstDayOfWeek(self: &QLocale) -> DayOfWeek;

// QString QLocale::formattedDataSize(qint64 bytes, int precision = 2, QLocale::DataSizeFormats format = DataSizeIecFormat) const
Copy link
Author

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?

Copy link
Collaborator

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 ?

Copy link
Collaborator

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.

@nicolasfella nicolasfella force-pushed the work/nico/qlocale branch 2 times, most recently from 7a3503e to 66a08f2 Compare October 1, 2024 18:52
@nicolasfella
Copy link
Author

Added a test

@nicolasfella nicolasfella force-pushed the work/nico/qlocale branch 3 times, most recently from 05c8552 to 018040e Compare October 8, 2024 15:00
@nicolasfella nicolasfella force-pushed the work/nico/qlocale branch 2 times, most recently from a9b5564 to a18034f Compare October 10, 2024 18:56
@nicolasfella nicolasfella force-pushed the work/nico/qlocale branch 2 times, most recently from 8ceb564 to 737b966 Compare November 15, 2024 11:26
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (39b3264) to head (582c3d9).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1086   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines        11927     11927           
=========================================
  Hits         11927     11927           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@nicolasfella nicolasfella force-pushed the work/nico/qlocale branch 4 times, most recently from 24c2177 to aa291a5 Compare November 18, 2024 13:40
@@ -46,7 +46,7 @@ set(CRATE qt_types_standalone)
cxx_qt_import_crate(
MANIFEST_PATH rust/Cargo.toml
CRATES ${CRATE}
QT_MODULES Qt::Core Qt::Gui Qt::Qml
QT_MODULES Qt::Core Qt::Gui Qt::Widgets Qt::Qml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could try adding QuickControls2 here which might help with the order, as qt_quickcontrols is enabled in cxx-qt-lib. But this ordering issue is still painful when it happens :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants