diff --git a/core/os/os.h b/core/os/os.h index 4ae8a354e57..07865b636e6 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -273,7 +273,7 @@ public: virtual String get_environment(const String &p_var) const = 0; virtual bool set_environment(const String &p_var, const String &p_value) const = 0; - virtual String get_name() = 0; + virtual String get_name() const = 0; virtual List get_cmdline_args() const { return _cmdline; } virtual String get_model_name() const; diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 25cdc8d8a02..4de910ee1cd 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -170,7 +170,7 @@ String OS_Unix::get_stdin_string(bool p_block) { return ""; } -String OS_Unix::get_name() { +String OS_Unix::get_name() const { return "Unix"; } diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 6a05877a8ce..53446a6b6f1 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -76,7 +76,7 @@ public: virtual Error set_cwd(const String &p_cwd); - virtual String get_name(); + virtual String get_name() const; virtual Date get_date(bool utc) const; virtual Time get_time(bool utc) const; diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 4f59b06ae60..060a9d6c91c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -330,7 +330,7 @@ Map GDScriptSyntaxHighlighter::_get_line_syntax_ return color_map; } -String GDScriptSyntaxHighlighter::get_name() { +String GDScriptSyntaxHighlighter::get_name() const { return "GDScript"; } diff --git a/modules/gdscript/editor/gdscript_highlighter.h b/modules/gdscript/editor/gdscript_highlighter.h index 9dc10a5d1b9..9ba2c80552a 100644 --- a/modules/gdscript/editor/gdscript_highlighter.h +++ b/modules/gdscript/editor/gdscript_highlighter.h @@ -65,7 +65,7 @@ public: virtual void _update_cache(); virtual Map _get_line_syntax_highlighting(int p_line); - virtual String get_name(); + virtual String get_name() const; virtual List get_supported_languages(); }; diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 93d39859f2a..ff1632cba87 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -277,7 +277,7 @@ Size2 OS_Android::get_window_size() const { return Vector2(default_videomode.width, default_videomode.height); } -String OS_Android::get_name() { +String OS_Android::get_name() const { return "Android"; } diff --git a/platform/android/os_android.h b/platform/android/os_android.h index d2198b05795..4dbc96f4da6 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -139,7 +139,7 @@ public: virtual Size2 get_window_size() const; - virtual String get_name(); + virtual String get_name() const; virtual MainLoop *get_main_loop() const; virtual bool can_draw() const; diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index f3fed6669b6..438b50053fa 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -69,7 +69,7 @@ void OS_Haiku::run() { main_loop->finish(); } -String OS_Haiku::get_name() { +String OS_Haiku::get_name() const { return "Haiku"; } diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index 6ab006843a0..e1d4cf8d876 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -74,7 +74,7 @@ public: OS_Haiku(); void run(); - virtual String get_name(); + virtual String get_name() const; virtual MainLoop *get_main_loop() const; diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index d8fb5992cc3..6a65cadf092 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -495,7 +495,7 @@ String OSIPhone::get_user_data_dir() const { return data_dir; }; -String OSIPhone::get_name() { +String OSIPhone::get_name() const { return "iOS"; }; diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index 460dfacd9bb..017125209c9 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -174,7 +174,7 @@ public: void set_data_dir(String p_dir); - virtual String get_name(); + virtual String get_name() const; Error shell_open(String p_uri); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 2e3e10e2228..c69e6f0cb83 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -1159,7 +1159,7 @@ Error OS_JavaScript::shell_open(String p_uri) { return OK; } -String OS_JavaScript::get_name() { +String OS_JavaScript::get_name() const { return "HTML5"; } diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index f7ce28e6603..a0c7c31f2d7 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -146,7 +146,7 @@ public: virtual void set_icon(const Ref &p_icon); String get_executable_path() const; virtual Error shell_open(String p_uri); - virtual String get_name(); + virtual String get_name() const; virtual bool can_draw() const; virtual String get_resource_dir() const; diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 125a88ab6db..d2a6f38b012 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -165,7 +165,7 @@ public: void wm_minimized(bool p_minimized); - virtual String get_name(); + virtual String get_name() const; virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index fec524c04ba..fc97bd4a20e 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1551,7 +1551,7 @@ void OS_OSX::delete_main_loop() { main_loop = NULL; } -String OS_OSX::get_name() { +String OS_OSX::get_name() const { return "OSX"; } diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 53f2a65c8e1..12e53054bca 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -190,7 +190,7 @@ bool OS_Server::can_draw() const { return false; //can never draw }; -String OS_Server::get_name() { +String OS_Server::get_name() const { return "Server"; } diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 74410647909..e3488a693df 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -93,7 +93,7 @@ protected: virtual void set_main_loop(MainLoop *p_main_loop); public: - virtual String get_name(); + virtual String get_name() const; virtual void set_mouse_show(bool p_show); virtual void set_mouse_grab(bool p_grab); diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 1678d351b3a..f9d22481dd0 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -530,7 +530,7 @@ OS::VideoMode OS_UWP::get_video_mode(int p_screen) const { void OS_UWP::get_fullscreen_mode_list(List *p_list, int p_screen) const { } -String OS_UWP::get_name() { +String OS_UWP::get_name() const { return "UWP"; } diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 7b00224017d..1bb68bc75d6 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -195,7 +195,7 @@ public: virtual MainLoop *get_main_loop() const; - virtual String get_name(); + virtual String get_name() const; virtual Date get_date(bool utc) const; virtual Time get_time(bool utc) const; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index c386fed367f..4c6e4e96b56 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2119,7 +2119,7 @@ void OS_Windows::request_attention() { FlashWindowEx(&info); } -String OS_Windows::get_name() { +String OS_Windows::get_name() const { return "Windows"; } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 0e0b9bf3f69..59aeb01b51d 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -246,7 +246,7 @@ public: virtual MainLoop *get_main_loop() const; - virtual String get_name(); + virtual String get_name() const; virtual Date get_date(bool utc) const; virtual Time get_time(bool utc) const; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index c2e7b561d32..56389578f72 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2592,7 +2592,7 @@ String OS_X11::get_clipboard() const { return ret; } -String OS_X11::get_name() { +String OS_X11::get_name() const { return "X11"; } diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index a54851d4e73..ad35cdb4f91 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -216,7 +216,7 @@ protected: bool is_window_maximize_allowed(); public: - virtual String get_name(); + virtual String get_name() const; virtual void set_cursor_shape(CursorShape p_shape); virtual CursorShape get_cursor_shape() const; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 3f83c9975e9..64cbafc7170 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -732,7 +732,7 @@ public: virtual void _update_cache() = 0; virtual Map _get_line_syntax_highlighting(int p_line) = 0; - virtual String get_name() = 0; + virtual String get_name() const = 0; virtual List get_supported_languages() = 0; void set_text_editor(TextEdit *p_text_editor);