Skip to content

Commit

Permalink
Wrap QSettings in std::unique_ptr
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
  • Loading branch information
direc85 and ogoffart committed Oct 30, 2023
1 parent 3007ff3 commit 1538101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qttypes/src/qtcore/qsettings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ use crate::QString;
cpp! {{
#include <QtCore/QSettings>
#include <QtCore/QString>
#include <memory>
}}

cpp_class!(
/// Wrapper around [`QSettings`][class] class.
///
/// [class]: https://doc.qt.io/qt-5/qsettings.html
#[derive(Default)]
pub unsafe struct QSettings as "QSettings"
pub unsafe struct QSettings as "std::unique_ptr<QSettings>"
);

impl QSettings {
Expand Down

0 comments on commit 1538101

Please sign in to comment.