summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:01:54 +0100
committerOrochimarufan <orochimarufan.x3@gmail.com>2013-03-22 14:01:54 +0100
commitcd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e (patch)
treea4148d6bb1704e635807c37b36013e9a33820a80 /main.cpp
parentf4c9cb8c1d395422b7e4f1c27ac92b6df08a39bb (diff)
parente4806ab08d0293d395c1718ab16d28ba2ae9d0ed (diff)
downloadMultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.gz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.lz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.tar.xz
MultiMC-cd1fdbbbc2953c5e34d8c0ae6861bec4a7f6532e.zip
Merge branch 'master' of http://github.com/peterix/MultiMC5
Conflicts: CMakeLists.txt main.cpp
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/main.cpp b/main.cpp
index 31d5277e..7c82d6d8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -57,20 +57,6 @@ public:
this->instId = instId;
}
-private:
- InstancePtr findInstance(QString instId)
- {
- QListIterator<InstancePtr> iter(instances);
- InstancePtr inst;
- while(iter.hasNext())
- {
- inst = iter.next();
- if (inst->id() == instId)
- return inst;
- }
- return InstancePtr();
- }
-
private slots:
void onTerminated()
{
@@ -114,7 +100,7 @@ public:
instances.loadList();
std::cout << "Launching Instance '" << qPrintable(instId) << "'" << std::endl;
- instance = findInstance(instId);
+ instance = instances.getInstanceById(instId);
if (instance.isNull())
{
std::cout << "Could not find instance requested. note that you have to specify the ID, not the NAME" << std::endl;