Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10456

QDS generates Connections in NOT recommended way

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • QDS 4.2
    • Code View
    • None
    • All

    Description

       

      There are two ways of writing Connections:

      // first way
      Connections {
          function onClicked(mouse) {
              foo(mouse)
          }
      }

       

      // second way
      Connections {
          onClicked: {
              foo(mouse)
          }
      } 

      According to the documentation of Connections, the second way is not recommended.

      However, when Connections is generated from "Connections" tab below,

       

       

      The code is generated in a second way.

      What is worse, they are yelled by QDS as they are deprecated. The user would argue "this is the code YOU have generated."

      Warning: file:///C:/work/qt_for_mcus_study/demos/Automotive/Phone.ui.qml:40:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } (file:///C:/work/qt_for_mcus_study/demos/Automotive/Phone.ui.qml:40, (null)) 

       

      QDS should generate Connections' code in the second way, not in the first.

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes