Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
Qt Creator 4.10.0
-
None
Description
When selecting a switch statement where all cases return an object of the same type, Qt Creator does not offer the option to convert the selection to a function.
As a minimal working example, consider the following code:
int foo = 0; switch(foo) { case 0: return 1; default: return 1; }
Steps to reproduce:
1. select the switch statement (i.e., the example minus the int foo declaration)
2. Right-click the selection, move mouse cursor over "Refactor" menu item
Outcome: the only available option is "Rename symbol under cursor".
Another problem: the "Rename symbol under cursor" is also shown if the cursor is over the switch keyword.