diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-03-18 23:00:46 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-03-18 23:00:46 +0100 |
commit | 65faabeed48584c461ca21d784c3f1d46f67f832 (patch) | |
tree | e814006279d0c56246e61e5c8f3bd29bc0e1c541 /main.cpp | |
parent | b84dfddd1b24e82dccb5a20d9c30570d26846e76 (diff) | |
download | MultiMC-65faabeed48584c461ca21d784c3f1d46f67f832.tar MultiMC-65faabeed48584c461ca21d784c3f1d46f67f832.tar.gz MultiMC-65faabeed48584c461ca21d784c3f1d46f67f832.tar.lz MultiMC-65faabeed48584c461ca21d784c3f1d46f67f832.tar.xz MultiMC-65faabeed48584c461ca21d784c3f1d46f67f832.zip |
Connect instance list to model.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -57,23 +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) - break; - } - if (inst->id() != instId) - return InstancePtr(); - else - return iter.peekPrevious(); - } - private slots: void onTerminated() { @@ -117,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; |