summaryrefslogtreecommitdiffstats
path: root/libmultimc/src
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-04-22 15:39:41 -0500
committerAndrew <forkk@forkk.net>2013-04-22 15:39:41 -0500
commitff3078b3a652316eef760386f665d152cbeb8db9 (patch)
tree5bd745873409d6bea927762cef314ccb78fde4e2 /libmultimc/src
parent7ec32d5657d433a2636f6738e162f4da6f11cde7 (diff)
downloadMultiMC-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 'libmultimc/src')
-rw-r--r--libmultimc/src/instversionlist.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libmultimc/src/instversionlist.cpp b/libmultimc/src/instversionlist.cpp
index 6c7b44bb..85734e48 100644
--- a/libmultimc/src/instversionlist.cpp
+++ b/libmultimc/src/instversionlist.cpp
@@ -31,6 +31,14 @@ const InstVersion *InstVersionList::findVersion(const QString &descriptor)
return NULL;
}
+const InstVersion *InstVersionList::getLatestStable()
+{
+ if (count() <= 0)
+ return NULL;
+ else
+ return at(0);
+}
+
// Column Enum
enum VListColumns
{
@@ -73,6 +81,9 @@ QVariant InstVersionList::data(const QModelIndex &index, int role) const
case Qt::ToolTipRole:
return version->descriptor();
+ case VersionPointerRole:
+ return qVariantFromValue((void *) version);
+
default:
return QVariant();
}