From 76bb1a980a1b9d41b7c72327674a401508fcb322 Mon Sep 17 00:00:00 2001 From: woblight Date: Sun, 22 Jul 2018 20:43:38 +0200 Subject: [PATCH] Fix update argument --- main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index e178e0f..6b0cacd 100644 --- a/main.cpp +++ b/main.cpp @@ -32,7 +32,6 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); - QCommandLineParser parser; parser.addOption({"update", "directory to update", "updateLocation"}); parser.process(app); @@ -82,10 +81,10 @@ int main(int argc, char *argv[]) } while (res == 1); if (res == 2) { QStringList args = app.arguments().mid(1); - args << "--update" << QString("\"%1\"").arg(app.applicationDirPath()); - QProcess().startDetached(app.applicationDirPath()+"/update/" + GAM_EXEC, args); + args << "--update" << QString("%1").arg(app.applicationDirPath()); + QProcess::startDetached(app.applicationDirPath()+"/update/" + GAM_EXEC, args); } if (res == 3) - QProcess().startDetached(update + "/" + GAM_EXEC, QApplication::arguments().mid(1) << "--update" << ""); + QProcess::startDetached(update + "/" + GAM_EXEC, QApplication::arguments().mid(1) << "--update" << ""); return res; }