Add shorthand for using singleton string names

This commit is contained in:
kobewi 2023-09-04 17:01:33 +02:00
parent 916ea002c1
commit a262d2d881
77 changed files with 382 additions and 380 deletions

View file

@ -973,7 +973,7 @@ void ScriptEditor::_queue_close_tabs() {
// Maybe there are unsaved changes.
if (se->is_unsaved()) {
_ask_close_current_unsaved_tab(se);
erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONE_SHOT);
erase_tab_confirm->connect(SceneStringName(visibility_changed), callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONE_SHOT);
break;
}
}
@ -4238,7 +4238,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
autosave_timer = memnew(Timer);
autosave_timer->set_one_shot(false);
autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &ScriptEditor::_update_autosave_timer));
autosave_timer->connect(SceneStringName(tree_entered), callable_mp(this, &ScriptEditor::_update_autosave_timer));
autosave_timer->connect("timeout", callable_mp(this, &ScriptEditor::_autosave_scripts));
add_child(autosave_timer);