fixing name clobbering in qobjects.

Apparently qobjects need unique names or else they will name clobber.
This commit is contained in:
Chris Cochrun 2024-06-26 09:12:11 -05:00
parent f9e2d2c6dd
commit da1c4f84b5
14 changed files with 57 additions and 60 deletions

View file

@ -1,5 +1,5 @@
#[cxx_qt::bridge]
mod qobject {
mod settings {
unsafe extern "C++" {
include!("cxx-qt-lib/qstring.h");
type QString = cxx_qt_lib::QString;
@ -30,7 +30,7 @@ use configparser::ini::Ini;
use cxx_qt::CxxQtType;
use cxx_qt_lib::{QString, QUrl};
use dirs;
use std::{pin::Pin};
use std::pin::Pin;
// In order for settings to save to the ini file,
// I'll need to create my own setting functions I think.
@ -60,7 +60,7 @@ impl Default for SettingsRust {
}
}
impl qobject::Settings {
impl settings::Settings {
pub fn setup(mut self: Pin<&mut Self>) {
let home = dirs::config_dir();
println!("{:?}", home);