diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -42,6 +42,8 @@ #include "coverarchiveeditor.h" #include "statisticsdialog.h" #include "filesystemfileproxy.h" +#include "moviemodelsingleton.h" +#include "listmodelsingleton.h" SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) { qApp->setWindowIcon(QIcon(":/shemov.png")); @@ -60,9 +62,9 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla QMessageBox::critical(this, tr("Error"), tr("Could not open database. Please configure the database and restart the program")); } - mMovieModel = new MovieModel(this); - mGenreModel = new ListModel("genre", this); - mActorModel = new ListModel("actor", this); + mMovieModel = MovieModelSingleton::instance(); + mGenreModel = ListModelSingleton::instance()->model("genre"); + mActorModel = ListModelSingleton::instance()->model("actor"); mFSWidget = new FilesystemWidget; setWindowTitle(mFSWidget->windowTitle()); @@ -73,8 +75,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla mTab->addTab(mAVWidget, tr("Archive")); connect(mAVWidget, SIGNAL(windowTitle(const QString &)), this, SLOT(newWindowTitle(const QString &))); - mAEdit = new ArchiveEditDialog(mGenreModel, mActorModel, this); - mAEdit->setMovieModel(mMovieModel); + mAEdit = new ArchiveEditDialog(this); mFSWidget->setArchiveDialog(mAEdit); mAItemEdit = new EditArchiveItemDialog(mGenreModel, mActorModel, mMovieModel, this); |