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

Unable to inherit a Qbs item with the same name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 2.2.1
    • General
    • None

    Description

      I'm trying to create my own Project item which would contain some additional properties. So I write

      Project.qbs
      Project {
          property bool additionalFlag
      }
      

      This results in an error:

      ERROR: Loop detected when importing '~/Projects/mega/qbs/imports/Project.qbs'.
      

      Okay, fair enough, the item is not smart enough to exclude itself from the lookup and there is a loop indeed. So, I try to break the loop as following:

      Project.qbs
      import qbs as Qbs
      
      Qbs.Project {
          property bool additionalFlag
      }
      

      But this produces another error:

      ERROR: ~/Projects/mega/qbs/imports/Project.qbs:1:15 Import of qbs.base must have no 'as <Name>'
      

      Expected result:
      It should be possible to set a qualified name for any import.

      There are other use cases for this too. In the past, I already tried to extend the base Depends item, but had to use another (shitty) name for a new item.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            gooroo Serhii Olendarenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes