remove broken validation of QMLIMPORTSCANNER
the variable may contain a complex command, so an exists() check is doomed to failure if the tool is built dynamically. also, the check is not really necessary: it failing indicates a bug in the qt build system, and we don't really need to complicate the code to deal with such corner cases. Change-Id: I2e6087dcc6dd4a4f70bdf739550276f364c880dd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
bae926e66d
commit
ab17a3c3c4
@ -78,21 +78,16 @@ if(contains(QT, qml)|contains(QT_PRIVATE, qml)): \
|
||||
contains(QT_CONFIG, static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
|
||||
# run qmlimportscanner
|
||||
qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner)
|
||||
exists($$QMLIMPORTSCANNER) {
|
||||
for (MODULE, QT_MODULES) {
|
||||
PATH = $$eval(QT.$${MODULE}.qml)
|
||||
!isEmpty(PATH): QMLPATHS += $$PATH
|
||||
}
|
||||
QMLPATHS = $$unique(QMLPATHS)
|
||||
for (QMLPATH, QMLPATHS): \
|
||||
IMPORTPATHS += -importPath $$QMLPATH
|
||||
|
||||
#message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
|
||||
JSON = $$system($$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
|
||||
} else {
|
||||
error("qmlimportscanner is missing. Rebuild qtdeclarative/tools/qmlimportscanner.")
|
||||
JSON = []
|
||||
for (MODULE, QT_MODULES) {
|
||||
PATH = $$eval(QT.$${MODULE}.qml)
|
||||
!isEmpty(PATH): QMLPATHS += $$PATH
|
||||
}
|
||||
QMLPATHS = $$unique(QMLPATHS)
|
||||
for (QMLPATH, QMLPATHS): \
|
||||
IMPORTPATHS += -importPath $$QMLPATH
|
||||
|
||||
#message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
|
||||
JSON = $$system($$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
|
||||
|
||||
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user