- Qbs Manual
- Scanner Item
- Qt Build Suite 1.4.3

# Scanner Item

An `Scanner` item can appear inside a Module Item, and allows to define artifacts dependency, according to the artifacts contents. For example scanner for "qrc" files:

    import qbs.Xml

    Module {
      Scanner {
        condition: true
        inputs: 'qrc'
        scan: {
          xml = XmlDomDocument(input.fileName);
          dependencies = [];
          // do something with the xml
          return dependencies;
        }
      }
    }

## Scanner Properties

Property | Type | Default | Description
--- | --- | --- | ---
condition | bool | true | If true, the scanner is enabled, otherwise it does nothing.
inputs | string list | undefined | File tags the input artifacts must match.
recursive | bool | false | Determines whether to scan dependencies recursively.
searchPaths | script | undefined | Script that returns paths to look for dependencies. The code in this script is treated as a function with the signature `function(project, product, input)`.
scan | script | undefined | Script that reads the input artifact and returns string list with dependencies. The code in this script is treated as a function with the signature `function(project, product, input)`.