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

Using product id property vs context property in a base item has different values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 1.11.0
    • 1.5.1
    • General
    • None
    • Qt Creator 4.0.3
    • 712c5474b08af11b34c37b545f4e2b7baab27a9f

      BaseProduct.qbs

      import qbs 1.0
      
      Product {
          id: baseId
      
          property bool myBool: false
      
          Group {
              qbs.install: {
                  console.error("Test:" + baseId.myBool + " " + myBool)
                  return baseId.myBool
              }
              fileTagsFilter: ["qml"]
          }
      }
      

      SubProduct.qbs

      import "BaseProduct.qbs" as BaseProduct
      
      BaseProduct {
          myBool: true
      }
      

      The error message shows "Test:false true" instead of "Test:true true". It's a bit confusing since baseId.myBool and myBool should be accessing the same property. Why do they have two different values?

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

            jbornema Joerg Bornemann
            vpicaver Philip Schuchardt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes