use setup instead of test_database
This commit is contained in:
parent
75d959f541
commit
860469a3d1
2 changed files with 2 additions and 2 deletions
|
@ -325,7 +325,7 @@ VideoProxyModel::VideoProxyModel(QObject *parent)
|
|||
:QSortFilterProxyModel(parent)
|
||||
{
|
||||
m_videoModel = new VideoModel();
|
||||
m_videoModel->testDatabase();
|
||||
m_videoModel->setup();
|
||||
setSourceModel(m_videoModel);
|
||||
setDynamicSortFilter(true);
|
||||
setFilterRole(Qt::UserRole + 1);
|
||||
|
|
|
@ -76,7 +76,7 @@ mod video_model {
|
|||
}
|
||||
|
||||
#[qinvokable]
|
||||
pub fn test_database(mut self: Pin<&mut Self>) {
|
||||
pub fn setup(mut self: Pin<&mut Self>) {
|
||||
let db = &mut self.as_mut().get_db();
|
||||
let results = videos
|
||||
.load::<crate::models::Video>(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue