-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add basic QSettings wrapper #285
Conversation
Interesting indeed. Something about Windows and |
a52f8ac
to
f3128a6
Compare
f3128a6
to
47796b2
Compare
It turned out to be a combination of default file extension being I must also say that it would have been convenient to have all tests run to completion even if one test fails. Could that be changed in the future? Thanks... |
qttypes/src/qtcore/qsettings.rs
Outdated
/// | ||
/// [class]: https://doc.qt.io/qt-5/qsettings.html | ||
#[derive(Default)] | ||
pub unsafe struct QSettings as "QSettings" |
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.
QSettings is a QObject and i'm not confortable having that in a cpp_class that can be moved.
I think i would do pub unsafe struct QSettings as "std::unique_ptr<QSettings>"
4a566f1
to
b72c7c1
Compare
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
b72c7c1
to
26a5653
Compare
This just became a blocker to Whisperfish for using master now that we have Rust 1.72 - thanks to the marvelous efforts of @rubdos - so could this please be merged to master? Thanks! |
sorry, i didn't see the updated patch. |
No worries! Thank you! |
Upstream-compatible version of whisperfish#2
Attempt of adding QSettings wrapper. This was a bit tricky because QSettings can't be copied, so we have to return
QSettings *
instead, and handle the dereference in the client. This leads into having these in the use-side implementation, but there's no obvious way to get rid of that to me: