summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-03-28 11:37:12 -0500
committerAndrew <forkk@forkk.net>2013-03-28 11:37:12 -0500
commitebb2c54975e3f0b7b891532e8e72d2ef760f96c4 (patch)
tree973de7066457a1faddffd3834eb0c260d5191ec2 /main.cpp
parent168ed3e8e58a8e5065ffa720f8d45f4cee0f2069 (diff)
parent1f13f0c665001a1a79f00cdad1e63e6c9802e55f (diff)
downloadMultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.gz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.lz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.tar.xz
MultiMC-ebb2c54975e3f0b7b891532e8e72d2ef760f96c4.zip
Merge branch 'master' of git://github.com/peterix/MultiMC5
Conflicts: CMakeLists.txt gui/mainwindow.cpp
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/main.cpp b/main.cpp
index cf193ff0..4239d70f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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()
{
@@ -89,6 +72,7 @@ private slots:
//if (instance->getShowConsole())
console->show();
connect(proc, SIGNAL(ended()), SLOT(onTerminated()));
+ connect(proc, SIGNAL(log(QString,MessageLevel::Enum)), console, SLOT(write(QString,MessageLevel::Enum)));
proc->launch();
}
@@ -117,7 +101,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;