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

The "base.concat" pattern does not work for product types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 1.3.2
    • 1.3.0
    • General
    • None
    • d324f213c0f339fd0af5669cb022b0744d12bd19

      Consider this project:

      import qbs
      import qbs.TextFile
      
      CppApplication {
          type: base.concat("mytype") // Does not work
          // type: ["application", "mytype"] // Works
          files: "main.cpp"
          Transformer {
              Artifact {
                  filePath: "mytype.txt"
                  fileTags: "mytype"
              }
              prepare: {
                  var cmd = new JavaScriptCommand();
                  cmd.description = "Generating file";
                  cmd.sourceCode = function() {
                      var f = new TextFile(output.filePath, TextFile.WriteOnly);
                      f.writeLine("Huhu!");
                      f.close();
                  }
                  return cmd;
              }
          }
      }
      

      Only the "mytype" type is being acted upon, i.e. the Transformer is being run, but the cpp file is not compiled.
      I'm pretty sure I've also seen the opposite behavior. But never are both types being taken into account.

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

            jbornema Joerg Bornemann
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes