Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt Creator 11.0.2
-
e892a6224 (11.0)
Description
The example below shows corruption in qt_add_qml_module() but it also happens when you add/remove files to, say, qt_add_executable(). It looks like there's a mismatch between the text and the text cursor.
Steps to reproduce
- Load the attached project in Qt Creator and open CMakeLists.txt in the code editor
- In the code editor, insert an empty line somewhere inside qt_add_qml_module() but don't save your changes
- In the Projects view, right-click the main target ("appCMakeCorruptionBug") and select "Add Existing Files..." > "ExtraItem.qml"
Outcome
You end up with a corrupted CMakeLists.txt like
qt_add_qml_module(appCMakeCorruptionBug URI CMakeCorruptionBug VERSION 1.0 QM QML_FILES ExtraItem.qmlL_FILES Main.qml )
Workaround
Get into the habit of saving your project before adding/removing files