summaryrefslogtreecommitdiff
path: root/editor/project_manager.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-12 16:17:04 +0100
committerGitHub <noreply@github.com>2021-01-12 16:17:04 +0100
commit1218441b16bd0d5bdbcf93c11e77f1e999f0183c (patch)
tree4c3f84ce756631822207ce73d4f7879fa789be69 /editor/project_manager.cpp
parent3bce846e0cdc172b8cb17370c5354dc61890bf91 (diff)
parent2a74b388d0e228dc1b890a3ed2529dbec23ecf30 (diff)
Merge pull request #44514 from madmiraal/split-os-execute
Split OS::execute into two methods
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r--editor/project_manager.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index dacd0162ba..1007a6c689 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1297,9 +1297,7 @@ void ProjectList::_global_menu_new_window(const Variant &p_tag) {
List<String> args;
args.push_back("-p");
String exec = OS::get_singleton()->get_executable_path();
-
- OS::ProcessID pid = 0;
- OS::get_singleton()->execute(exec, args, false, &pid);
+ OS::get_singleton()->create_process(exec, args);
}
void ProjectList::_global_menu_open_project(const Variant &p_tag) {
@@ -1310,9 +1308,7 @@ void ProjectList::_global_menu_open_project(const Variant &p_tag) {
List<String> args;
args.push_back(conf);
String exec = OS::get_singleton()->get_executable_path();
-
- OS::ProcessID pid = 0;
- OS::get_singleton()->execute(exec, args, false, &pid);
+ OS::get_singleton()->create_process(exec, args);
}
}
@@ -2055,9 +2051,7 @@ void ProjectManager::_open_selected_projects() {
}
String exec = OS::get_singleton()->get_executable_path();
-
- OS::ProcessID pid = 0;
- Error err = OS::get_singleton()->execute(exec, args, false, &pid);
+ Error err = OS::get_singleton()->create_process(exec, args);
ERR_FAIL_COND(err);
}
@@ -2143,9 +2137,7 @@ void ProjectManager::_run_project_confirm() {
}
String exec = OS::get_singleton()->get_executable_path();
-
- OS::ProcessID pid = 0;
- Error err = OS::get_singleton()->execute(exec, args, false, &pid);
+ Error err = OS::get_singleton()->create_process(exec, args);
ERR_FAIL_COND(err);
}
}
@@ -2270,8 +2262,7 @@ void ProjectManager::_language_selected(int p_id) {
void ProjectManager::_restart_confirm() {
List<String> args = OS::get_singleton()->get_cmdline_args();
String exec = OS::get_singleton()->get_executable_path();
- OS::ProcessID pid = 0;
- Error err = OS::get_singleton()->execute(exec, args, false, &pid);
+ Error err = OS::get_singleton()->create_process(exec, args);
ERR_FAIL_COND(err);
_dim_window();