Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28985

"Move Component into Separate File" does not add component file to project

    XMLWordPrintable

Details

    • 039baab6e (master), 183cf3adc (10.0), 9cc9ec2ae (11.0)

    Description

      1. Open a CMake-based Qt Quick Application project.
        You can take the defaults from Creator's project wizard.
      2. In a .qml file, add a trivial item, e.g. "TextEdit {}"
      3. Right-click onto the item's name and select "Refactoring" -> "Move Component into Separate File".
      4. In the following dialog, click "OK".
        The item is being moved to a separate file.
      5. 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

        Activity

          People

            cadam Cristian Adam
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes