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,7 +1,7 @@
// The purpose of this file is to provide validation
// of whether or not a file exists
#[cxx_qt::bridge]
mod qobject {
mod file_helper {
unsafe extern "C++" {
include!("cxx-qt-lib/qstring.h");
type QString = cxx_qt_lib::QString;
@ -56,7 +56,7 @@ impl Default for FileHelperRust {
}
}
impl qobject::FileHelper {
impl file_helper::FileHelper {
pub fn load(self: Pin<&mut Self>, file: QUrl) -> Vec<String> {
println!("{file}");
vec!["hi".to_string()]