Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1773

Alternative syntax for id in Depends items

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 2.2.0
    • None
    • All

    Description

      It is not possible to use dots and dashes as identifiers in Qbs files, so when depending on a module that contains such symbols, we use the "id" property to give module a new name that can be used as identifier:

      Depends { id: gobject; name: "gobject-2.0" }
      Group { condition: gobject.present; files: ... }
      

      The problem here is that in QML id is a way to reference an item within this file, while here "id" is not an alias to Depends item but an alias to the imported module item. This is quite confusing.

      Proposed solution is to add a new property for the depends item that replaces the id
      property in this context:

      Depends { TBD: "gobject"; name: "gobject-2.0" }
      

      The possible names for the property could be "alias", "aliasName", "importName", "moduleName", "identifier".
      Note that the id prop might have special treatment in QML parser.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            arch Ivan Komissarov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes