Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TextEdit getters and setters to match property names #47548

Closed

Conversation

madmiraal
Copy link
Contributor

Part of #16863, and the TextEdit sister PR to the LineEdit PR #47448.

Similar to LineEdit, TextEdit's caret_* properties getters and setters are also misnamed. This PR renames those getters and setters to match the property names. In addition, for consistency, it renames the other caret methods, signals, the editor settings and the documentation to refer to caret instead of cursor too.

Methods renamed:

Property Old Method Name New Method Name
center_viewport_to_cursor center_viewport_at_caret
cursor_get_column get_caret_column
cursor_get_line get_caret_line
cursor_set_column set_caret_column
cursor_set_line set_caret_line
get_word_under_cursor get_word_at_caret
insert_text_at_cursor insert_text_at_caret
caret_blink cursor_set_blink_enabled set_caret_blink_enabled
" cursor_get_blink_enabled is_caret_blink_enabled
caret_blink_speed cursor_set_blink_speed set_caret_blink_speed
" cursor_get_blink_speed get_caret_blink_speed
caret_block_mode cursor_set_block_mode set_caret_block_mode_enabled
" cursor_is_block_mode is_caret_block_mode_enabled
caret_mid_grapheme set_mid_grapheme_caret_enabled set_caret_mid_grapheme_enabled
" get_mid_grapheme_caret_enabled is_caret_mid_grapheme_enabled
caret_moving_by_right_click -> caret_moves_with_right_click set_right_click_moves_caret set_caret_moves_with_right_click_enabled
" is_right_click_moving_caret is_caret_moves_with_right_click_enabled
Old Signal New Signal
cursor_changed caret_changed

Editor Settings renamed:

Old Setting New Setting
text_editor/cursor/scroll_past_end_of_file text_editor/caret/scroll_past_end_of_file
text_editor/cursor/block_caret text_editor/caret/block_mode_enabled
text_editor/cursor/caret_blink text_editor/caret/blink_enabled
text_editor/cursor/caret_blink_speed text_editor/caret/blink_speed

Finally, the property readonly has also been renamed to editable to make it consistent with LineEdit. I've kept this as a separate commit, because it also reverses the functionality.

@madmiraal madmiraal added this to the 4.0 milestone Apr 1, 2021
@madmiraal madmiraal requested review from a team as code owners April 1, 2021 15:50
@madmiraal madmiraal force-pushed the rename-textedit-getters-setters branch 2 times, most recently from bd6d103 to 959f118 Compare April 5, 2021 15:39
@madmiraal madmiraal force-pushed the rename-textedit-getters-setters branch from 959f118 to cd4be5c Compare April 17, 2021 11:36
@madmiraal
Copy link
Contributor Author

Rebased following merge of #47625 and #47689.

@madmiraal madmiraal force-pushed the rename-textedit-getters-setters branch from cd4be5c to 39db03a Compare May 1, 2021 10:06
@madmiraal
Copy link
Contributor Author

Rebased following merge of #47448.

@akien-mga
Copy link
Member

Superseded by #50371.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants