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

@ -8,7 +8,7 @@ use obws::Client;
use std::{error::Error, pin::Pin};
use tracing::{debug, error};
use crate::obs::qobject::QList_QString;
use crate::obs::obs::QList_QString;
#[derive(Default)]
pub struct Obs {
@ -117,7 +117,7 @@ fn make_client() -> Client {
}
#[cxx_qt::bridge]
mod qobject {
mod obs {
unsafe extern "C++" {
include!("cxx-qt-lib/qstring.h");
type QString = cxx_qt_lib::QString;
@ -154,7 +154,7 @@ pub struct ObsModelRust {
current_program_scene: QString,
}
impl qobject::ObsModel {
impl obs::ObsModel {
pub fn update_scenes(mut self: Pin<&mut Self>) -> QStringList {
debug!("updating scenes");
let mut scenes_list = QList_QString::default();