diff options
author | Andrew <forkk@forkk.net> | 2013-03-08 13:56:26 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-03-08 13:56:26 -0600 |
commit | 2d6e785e4ee8a8b837fe84f83972ec23a09564af (patch) | |
tree | 6afdac6e06f1ba8ae5c29f62b5a4a9bc1b696b12 /libmultimc/src/instversionlist.cpp | |
parent | 69040f923b0344de214d6f1fc4553d223df7d2d6 (diff) | |
download | MultiMC-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.cpp | 17 |
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; +} |