diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-16 00:54:39 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-16 00:54:39 +0200 |
commit | d38b90530b3ba3a49c4eb072eb344ae2b0836913 (patch) | |
tree | 5dd07e59ae1bc8392a773ec8fec6b6a3aa7e4840 /gui/lwjglselectdialog.cpp | |
parent | 7721c57e5e1093a3d8597b6b6f30c97d2aa3d8a5 (diff) | |
download | MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.gz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.lz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.xz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.zip |
Forge version list implementation. Needs integration and testing.
Diffstat (limited to 'gui/lwjglselectdialog.cpp')
-rw-r--r-- | gui/lwjglselectdialog.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gui/lwjglselectdialog.cpp b/gui/lwjglselectdialog.cpp index c3215b7b..7c424a6c 100644 --- a/gui/lwjglselectdialog.cpp +++ b/gui/lwjglselectdialog.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ +#include "MultiMC.h" #include "lwjglselectdialog.h" #include "ui_lwjglselectdialog.h" @@ -24,11 +25,12 @@ LWJGLSelectDialog::LWJGLSelectDialog(QWidget *parent) : { ui->setupUi(this); ui->labelStatus->setVisible(false); - ui->lwjglListView->setModel(&LWJGLVersionList::get()); + auto lwjgllist = MMC->lwjgllist(); + ui->lwjglListView->setModel(lwjgllist); - connect(&LWJGLVersionList::get(), SIGNAL(loadingStateUpdated(bool)), SLOT(loadingStateUpdated(bool))); - connect(&LWJGLVersionList::get(), SIGNAL(loadListFailed(QString)), SLOT(loadingFailed(QString))); - loadingStateUpdated(LWJGLVersionList::get().isLoading()); + connect(lwjgllist, SIGNAL(loadingStateUpdated(bool)), SLOT(loadingStateUpdated(bool))); + connect(lwjgllist, SIGNAL(loadListFailed(QString)), SLOT(loadingFailed(QString))); + loadingStateUpdated(lwjgllist->isLoading()); } LWJGLSelectDialog::~LWJGLSelectDialog() @@ -38,15 +40,15 @@ LWJGLSelectDialog::~LWJGLSelectDialog() QString LWJGLSelectDialog::selectedVersion() const { - return LWJGLVersionList::get().data( + return MMC->lwjgllist()->data( ui->lwjglListView->selectionModel()->currentIndex(), Qt::DisplayRole).toString(); } void LWJGLSelectDialog::on_refreshButton_clicked() { - if (!LWJGLVersionList::get().isLoading()) - LWJGLVersionList::get().loadList(); + if (!MMC->lwjgllist()->isLoading()) + MMC->lwjgllist()->loadList(); } void LWJGLSelectDialog::loadingStateUpdated(bool loading) |