Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt Creator 10.0.0, Qt Creator 10.0.1
-
Ubuntu 22.04 LTS
-
039baab6e (master), 183cf3adc (10.0), 9cc9ec2ae (11.0)
Description
- Open a CMake-based Qt Quick Application project.
You can take the defaults from Creator's project wizard. - In a .qml file, add a trivial item, e.g. "TextEdit {}"
- Right-click onto the item's name and select "Refactoring" -> "Move Component into Separate File".
- In the following dialog, click "OK".
The item is being moved to a separate file. - Run the project.
In Application Output, you can read that the component you created "is not a type".
This fails because the new component was not added to CMakeLists.txt. Adding its filename to "QML_FILES" in "qt_add_qml_module" fixes the issue.
Found and tested by Squish test tst_QMLS04
Attachments
For Gerrit Dashboard: QTCREATORBUG-28985 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
472617,2 | CMakePM: Add new / existing files for QtQuick projects | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
473640,4 | SquishTests: Remove workaround for fixed bug | 11.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
473641,2 | SquishTests: Make workaround permanent for Creator 10 | 10.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |