The default selected version is now the current stable version.
Resolves JIRA issue MMC-10: https://jira.forkk.net/browse/MMC-10
This commit is contained in:
parent
7e3592bee8
commit
fb0432bf0b
@ -98,7 +98,7 @@ public:
|
||||
* This is the version that will be selected by default.
|
||||
* By default, this is simply the first version in the list.
|
||||
*/
|
||||
virtual const InstVersion *getLatestStable();
|
||||
virtual const InstVersion *getLatestStable() const;
|
||||
|
||||
/*!
|
||||
* Sorts the version list.
|
||||
|
@ -47,6 +47,8 @@ public:
|
||||
virtual void printToStdOut() const;
|
||||
virtual void sort();
|
||||
|
||||
virtual InstVersion *getLatestStable() const;
|
||||
|
||||
/*!
|
||||
* Gets the main version list instance.
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ const InstVersion *InstVersionList::findVersion(const QString &descriptor)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const InstVersion *InstVersionList::getLatestStable()
|
||||
const InstVersion *InstVersionList::getLatestStable() const
|
||||
{
|
||||
if (count() <= 0)
|
||||
return NULL;
|
||||
|
@ -92,6 +92,17 @@ void MinecraftVersionList::sort()
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
InstVersion *MinecraftVersionList::getLatestStable() const
|
||||
{
|
||||
for (int i = 0; i < m_vlist.length(); i++)
|
||||
{
|
||||
if (((MinecraftVersion *)m_vlist.at(i))->versionType() == MinecraftVersion::CurrentStable)
|
||||
{
|
||||
return m_vlist.at(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MinecraftVersionList &MinecraftVersionList::getMainList()
|
||||
{
|
||||
return mcVList;
|
||||
|
Loading…
Reference in New Issue
Block a user