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

"Move Component into Separate File" erases user code when leaving grouped properties in the original file

    XMLWordPrintable

Details

    Description

      Code

      QtQuick
      
      Window {
          width: 800
          height: 600
          visible: true
      
          Text {
              text: "Hello"
              font {
                  family: "Arial"
                  pixelSize: 48
              }
          }
      }
      

       

      Steps to reproduce

      1. Load the code above in a Qt Quick project
      2. Right-click on the Text and select "Refactoring" > "Move Component into Separate File"
      3. Check all of the property assignments, to leave them in the original file
      4. Click "OK"

       

      Unexpected outcomes
      Before the refactor:

      • The code preview in the dialog shows empty property bindings

       

      After the refactor:

      • The original file contains empty property bindings (invalid, broken code)
      • The new file contains an empty "font" group (valid but pointless)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes