summaryrefslogtreecommitdiff
path: root/editor/project_manager.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-13 21:52:03 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-19 11:15:56 +0200
commite886d662ec2580c9b19c44296d0bb64fbf635ecf (patch)
tree05a45b3a767d149df5ded788fcee7d826882de37 /editor/project_manager.cpp
parentf2a61684143af02a8cbe7002645af817607f9bd6 (diff)
Overhaul CLI argument forwarding to processes started by the editor
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r--editor/project_manager.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 21891e381b..d9f21e1e5f 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -47,6 +47,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_themes.h"
#include "editor/editor_vcs_interface.h"
+#include "main/main.h"
#include "scene/gui/center_container.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
@@ -2109,27 +2110,15 @@ void ProjectManager::_open_selected_projects() {
List<String> args;
+ for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_TOOL)) {
+ args.push_back(a);
+ }
+
args.push_back("--path");
args.push_back(path);
args.push_back("--editor");
- if (OS::get_singleton()->is_stdout_debug_enabled()) {
- args.push_back("--debug");
- }
-
- if (OS::get_singleton()->is_stdout_verbose()) {
- args.push_back("--verbose");
- }
-
- if (OS::get_singleton()->is_disable_crash_handler()) {
- args.push_back("--disable-crash-handler");
- }
-
- if (OS::get_singleton()->is_single_window()) {
- args.push_back("--single-window");
- }
-
Error err = OS::get_singleton()->create_instance(args);
ERR_FAIL_COND(err);
}
@@ -2242,13 +2231,13 @@ void ProjectManager::_run_project_confirm() {
List<String> args;
+ for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_PROJECT)) {
+ args.push_back(a);
+ }
+
args.push_back("--path");
args.push_back(path);
- if (OS::get_singleton()->is_disable_crash_handler()) {
- args.push_back("--disable-crash-handler");
- }
-
Error err = OS::get_singleton()->create_instance(args);
ERR_FAIL_COND(err);
}