Fixed some formatting.

This commit is contained in:
Andrew 2013-02-25 13:39:07 -06:00
parent 23474da175
commit b56b819c35
3 changed files with 339 additions and 334 deletions

View File

@ -5,13 +5,13 @@
namespace Util
{
// Get the Directory representing the User's Desktop
QString getDesktopDir();
// Get the Directory representing the User's Desktop
QString getDesktopDir();
// Create a shortcut at *location*, pointing to *dest* called with the arguments *args*
// call it *name* and assign it the icon *icon*
// return true if operation succeeded
bool createShortCut(QString location, QString dest, QStringList args, QString name, QString iconLocation);
// Create a shortcut at *location*, pointing to *dest* called with the arguments *args*
// call it *name* and assign it the icon *icon*
// return true if operation succeeded
bool createShortCut(QString location, QString dest, QStringList args, QString name, QString iconLocation);
}
#endif // USERUTILS_H

View File

@ -52,7 +52,7 @@ private:
MinecraftProcess *proc;
ConsoleWindow *console;
public:
InstanceLauncher(QString instId) : QObject(), instances(settings->getInstanceDir())
InstanceLauncher(QString instId) : QObject(), instances(settings->get("InstanceDir").toString())
{
this->instId = instId;
}
@ -172,22 +172,27 @@ int main(int argc, char *argv[])
// parse the arguments
QHash<QString, QVariant> args;
try {
try
{
args = parser.parse(app.arguments());
} catch(ParsingError e) {
}
catch(ParsingError e)
{
std::cerr << "CommandLineError: " << e.what() << std::endl;
std::cerr << "Try '%1 -h' to get help on MultiMC's command line parameters." << std::endl;
return 1;
}
// display help and exit
if (args["help"].toBool()) {
if (args["help"].toBool())
{
std::cout << qPrintable(parser.compileHelp(app.arguments()[0]));
return 0;
}
// display version and exit
if (args["version"].toBool()) {
if (args["version"].toBool())
{
std::cout << "Version " << VERSION_STR << std::endl;
std::cout << "Git " << GIT_COMMIT << std::endl;
std::cout << "Tag: " << JENKINS_BUILD_TAG << " " << (ARCH==x64?"x86_64":"x86") << std::endl;