pub fn new<'b>(rolenames: &'b [&'a str]) -> Box<Self> {
        unsafe {
            let mut rs = Vec::new();
            rs.extend_from_slice(rolenames);
            let result = QListModel {
                wrapped: AtomicPtr::new(null_mut()),
                model: Vec::new(),
                rolenames: rs,
            };
            // Probably need an explanation on why do I need a box
            let mut boxer = Box::new(result);

            let dqmo = dos_qabstractlistmodel_qmetaobject();
            let dqalm =
                dos_qabstractlistmodel_create(&*boxer as *const QListModel as *const libc::c_void,
                                              dqmo,
                                              RustObjectCallback, // no need
                                              RustRowCountCallback,
                                              RustColumnCountCallback, // no need
                                              RustDataCallback,
                                              RustSetDataCallback, // no need
                                              RustRoleNamesCallback,
                                              RustFlagsCallback, // no need
                                              RustHeaderDataCallback);// no need
            boxer.wrapped = AtomicPtr::new(dqalm);

            boxer
        }
    }
/// Rolenames are roles of provided data, that are mapped to corresponding roles in QML.
Rolenames are roles of provided data, that are mapped to corresponding roles in QML.
Rolenames are roles of provided data that are mapped to corresponding roles in QML .
pub fn new<'b>(rolenames: &'b [&'a str]) -> Box<Self> {
        unsafe {
            let mut rs = Vec::new();
            rs.extend_from_slice(rolenames);
            let result = QListModel {
                wrapped: AtomicPtr::new(null_mut()),
                model: Vec::new(),
                rolenames: rs,
            };
            // Probably need an explanation on why do I need a box
            let mut boxer = Box::new(result);
            let dqmo = dos_qabstractlistmodel_qmetaobject();
            let dqalm =
                dos_qabstractlistmodel_create(&*boxer as *const QListModel as *const libc::c_void,
                                              dqmo,
                                              RustObjectCallback, // no need
                                              RustRowCountCallback,
                                              RustColumnCountCallback, // no need
                                              RustDataCallback,
                                              RustSetDataCallback, // no need
                                              RustRoleNamesCallback,
                                              RustFlagsCallback, // no need
                                              RustHeaderDataCallback);// no need
            boxer.wrapped = AtomicPtr::new(dqalm);
            boxer
        }
    }
pub fn new < ' b > ( rolenames : & ' b [ & ' a str ] ) -> Box < Self > { unsafe { let mut rs = Vec :: new ( ) ; rs . extend_from_slice ( rolenames ) ; let result = QListModel { wrapped : AtomicPtr :: new ( null_mut ( ) ) , model : Vec :: new ( ) , rolenames : rs , } ; // Probably need an explanation on why do I need a box let mut boxer = Box :: new ( result ) ; let dqmo = dos_qabstractlistmodel_qmetaobject ( ) ; let dqalm = dos_qabstractlistmodel_create ( & * boxer as * const QListModel as * const libc :: c_void , dqmo , RustObjectCallback , // no need RustRowCountCallback , RustColumnCountCallback , // no need RustDataCallback , RustSetDataCallback , // no need RustRoleNamesCallback , RustFlagsCallback , // no need RustHeaderDataCallback ) ; // no need boxer . wrapped = AtomicPtr :: new ( dqalm ) ; boxer } }
Rolenames are roles of provided data, that are mapped to corresponding roles in QML.
Rolenames are roles of provided data that are mapped to corresponding roles in QML .
rolenames
&'b [&'a str]
rolenames
&'b [&'a str]