summaryrefslogtreecommitdiffstats
path: root/libmultimc/src/instversionlist.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-03-08 13:56:26 -0600
committerAndrew <forkk@forkk.net>2013-03-08 13:56:26 -0600
commit2d6e785e4ee8a8b837fe84f83972ec23a09564af (patch)
tree6afdac6e06f1ba8ae5c29f62b5a4a9bc1b696b12 /libmultimc/src/instversionlist.cpp
parent69040f923b0344de214d6f1fc4553d223df7d2d6 (diff)
downloadMultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.gz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.lz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.xz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.zip
Implemented version lists.
Diffstat (limited to 'libmultimc/src/instversionlist.cpp')
-rw-r--r--libmultimc/src/instversionlist.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/libmultimc/src/instversionlist.cpp b/libmultimc/src/instversionlist.cpp
index e171cfa5..301b9969 100644
--- a/libmultimc/src/instversionlist.cpp
+++ b/libmultimc/src/instversionlist.cpp
@@ -13,9 +13,20 @@
* limitations under the License.
*/
-#include "include/instversionlist.h"
+#include "instversionlist.h"
+#include "instversion.h"
-InstVersionList::InstVersionList() :
- QObject(NULL)
+InstVersionList::InstVersionList(QObject *parent) :
+ QObject(parent)
{
}
+
+const InstVersion *InstVersionList::findVersion(const QString &descriptor)
+{
+ for (int i = 0; i < count(); i++)
+ {
+ if (at(i)->descriptor() == descriptor)
+ return at(i);
+ }
+ return NULL;
+}