qbs - Subclassing Probe doesn't work -
i trying subclass probe clone custom repositories net before starting build.
gitprobe:
import qbs import qbs.file import qbs.process probe { property string giturl property string wd property string name property string dir: wd + "/" + name configure: { try { if(file.directoryentries(dir, file.allentries).length > 0){ file.remove(dir) } var gitprocess = process() gitprocess.setworkingdirectory(wd) gitprocess.exec("git", ["clone", giturl], true) found = true } catch(err) { console.warn("gitprobe : not clone repository " + giturl) console.error("gitprobe : " + err) found = false } } } i did put gitprobe.qbs in dir/imports/ , , in project did qbssearchpath: "path-to-dir", qbs tell me when parsing file unexpected item type 'gitprobe'.
this known limitation: search path needs set when current file parsed. workaround reference file project item in file , set search path there. might want vote on https://bugreports.qt.io/browse/qbs-667.
Comments
Post a Comment