diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | gui/mainwindow.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index bc0840a0..d19d69dc 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -29,6 +29,7 @@ #include "gui/logindialog.h" #include "gui/taskdialog.h" +#include "data/inst/instancelist.h" #include "data/appsettings.h" #include "data/version.h" @@ -36,7 +37,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::MainWindow) + ui(new Ui::MainWindow), + instList(settings->getInstanceDir()) { ui->setupUi(this); @@ -45,8 +47,7 @@ MainWindow::MainWindow(QWidget *parent) : restoreGeometry(settings->getConfig().value("MainWindowGeometry", saveGeometry()).toByteArray()); restoreState(settings->getConfig().value("MainWindowState", saveState()).toByteArray()); - instList.initialLoad("instances"); - ui->instanceView->setModel(&instList); + instList.loadList(); } MainWindow::~MainWindow() @@ -67,7 +68,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered() void MainWindow::on_actionRefresh_triggered() { - instList.initialLoad("instances"); + instList.loadList(); } void MainWindow::on_actionViewCentralModsFolder_triggered() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 28ca341a..d286bd0e 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -18,7 +18,7 @@ #include <QMainWindow> -#include "data/instancemodel.h" +#include "data/inst/instancelist.h" #include "data/loginresponse.h" namespace Ui @@ -70,7 +70,7 @@ private slots: private: Ui::MainWindow *ui; - InstanceModel instList; + InstanceList instList; }; #endif // MAINWINDOW_H |