Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
Qt Creator 4.10.0-rc1, Qt Creator 7.0.0-beta1
-
Ubuntu 20.04 LTS
Windows 10 1903 64 bit
Description
- Create a new Qt Widgets Application using the wizard.
- In the main function, select the line
w.show();
- From the context menu, select "Refactor" -> "Extract Function".
- Type a name for the new function and click "OK".
You'll either get a function with the required parameter:void newFunction(MainWindow w) { w.show(); }
or a function without the parameter which will not compile:
void newFunction() { w.show(); }
- Undo the refactoring.
- Repeat steps 2 to 4.
Sometimes you'll get the correct function, sometimes the compile error.
Refactoring should always result in the same correct code.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-18607 [REG 4.3 -> 4.4] Clang: "Extract function" generates syntax error
- Closed