diff options
author | Andrew <forkk@forkk.net> | 2013-04-22 15:39:41 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-04-22 15:39:41 -0500 |
commit | ff3078b3a652316eef760386f665d152cbeb8db9 (patch) | |
tree | 5bd745873409d6bea927762cef314ccb78fde4e2 /gui/versionselectdialog.cpp | |
parent | 7ec32d5657d433a2636f6738e162f4da6f11cde7 (diff) | |
download | MultiMC-ff3078b3a652316eef760386f665d152cbeb8db9.tar MultiMC-ff3078b3a652316eef760386f665d152cbeb8db9.tar.gz MultiMC-ff3078b3a652316eef760386f665d152cbeb8db9.tar.lz MultiMC-ff3078b3a652316eef760386f665d152cbeb8db9.tar.xz MultiMC-ff3078b3a652316eef760386f665d152cbeb8db9.zip |
Make the new instance dialog support instance types.
Diffstat (limited to 'gui/versionselectdialog.cpp')
-rw-r--r-- | gui/versionselectdialog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/versionselectdialog.cpp b/gui/versionselectdialog.cpp index b55c106c..6ead83c0 100644 --- a/gui/versionselectdialog.cpp +++ b/gui/versionselectdialog.cpp @@ -21,6 +21,7 @@ #include <gui/taskdialog.h> #include <instversionlist.h> +#include <instversion.h> #include <task.h> VersionSelectDialog::VersionSelectDialog(InstVersionList *vlist, QWidget *parent) : @@ -56,6 +57,15 @@ void VersionSelectDialog::loadList() taskDlg->exec(loadTask); } +const InstVersion *VersionSelectDialog::selectedVersion() const +{ + const InstVersion *versionPtr = (const InstVersion *) + m_vlist->data(ui->listView->selectionModel()->currentIndex(), + InstVersionList::VersionPointerRole).value<void *>(); + + return versionPtr; +} + void VersionSelectDialog::on_refreshButton_clicked() { loadList(); |