summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorOrochimarufan <orochimarufan.x3@gmail.com>2013-02-20 00:07:52 +0100
committerOrochimarufan <orochimarufan.x3@gmail.com>2013-02-20 00:07:52 +0100
commitc523a2c752bb7b071715f6c4eac18f36bcd2c162 (patch)
tree1440f811d161cfd5159d2427d760815021a5485f /gui
parentcf0e78b46dbd740caac9288f3fe5ef5d99ed2ce9 (diff)
downloadMultiMC-c523a2c752bb7b071715f6c4eac18f36bcd2c162.tar
MultiMC-c523a2c752bb7b071715f6c4eac18f36bcd2c162.tar.gz
MultiMC-c523a2c752bb7b071715f6c4eac18f36bcd2c162.tar.lz
MultiMC-c523a2c752bb7b071715f6c4eac18f36bcd2c162.tar.xz
MultiMC-c523a2c752bb7b071715f6c4eac18f36bcd2c162.zip
implement commandline parsing
Diffstat (limited to 'gui')
-rw-r--r--gui/mainwindow.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 9bbc4c38..0ca9fde1 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -1,5 +1,9 @@
/* Copyright 2013 MultiMC Contributors
*
+ * Authors: Andrew Okin
+ * Peterix
+ * Orochimarufan <orochimarufan.x3@gmail.com>
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -19,9 +23,10 @@
#include <QMenu>
#include <QMessageBox>
#include <QInputDialog>
-
+#include <QApplication>
#include <QDesktopServices>
#include <QUrl>
+#include <QDir>
#include "util/osutils.h"
#include "util/userutil.h"
@@ -168,9 +173,9 @@ void MainWindow::on_actionMakeDesktopShortcut_triggered()
QString name("Test");
name = QInputDialog::getText(this, tr("MultiMC Shortcut"), tr("Enter a Shortcut Name."), QLineEdit::Normal, name);
- Util::createShortCut(Util::getDesktopDir(), "test", QStringList() << "-d" << "lol", name, "application-x-octet-stream");
+ Util::createShortCut(Util::getDesktopDir(), QApplication::instance()->applicationFilePath(), QStringList() << "-dl" << QDir::currentPath() << "test", name, "application-x-octet-stream");
- QMessageBox::warning(this, "Stupidness", "A Dummy Shortcut was created. the current instance model doesnt allow for anything more");
+ QMessageBox::warning(this, "Not useful", "A Dummy Shortcut was created. it will not do anything productive");
}
// BrowserDialog