浏览代码

Add --from-auto-update to known flags

The updater invokes the updated program with --from-auto-update
this caused the app to not start since we switched to QCommandLineParser
since it aborts on unknown flags. We should probably use QCommandLineParser::parse
instead of ::process since that doesn't abort on failure but for now
this was a simpler change.
Tobias Hieta 9 年之前
父节点
当前提交
ba98a10b15
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/main.cpp

+ 1 - 0
src/main.cpp

@@ -88,6 +88,7 @@ int main(int argc, char *argv[])
     parser.addHelpOption();
     parser.addHelpOption();
     parser.addVersionOption();
     parser.addVersionOption();
     parser.addOptions({{{"l", "licenses"}, "Show license information"}});
     parser.addOptions({{{"l", "licenses"}, "Show license information"}});
+    parser.addOptions({{{"a", "from-auto-update"}, "When invoked from auto-update"}});
 
 
     char **newArgv = appendCommandLineArguments(argc, argv, g_qtFlags);
     char **newArgv = appendCommandLineArguments(argc, argv, g_qtFlags);
     argc += g_qtFlags.size();
     argc += g_qtFlags.size();