Support both qrc and qml files for qmlimportscanner
Some projects can be configured to have both qrcFiles and qml-root-path included in the deployment settings file. The addition to qrc scanning prevented the qml root directory from being scanned. Change-Id: Idadb62f5572be45d0083294440bdb29740c2c47e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
c15d6a155c
commit
3162345670
@ -1717,17 +1717,18 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
|
||||
qmlImportScanner += QLatin1String(" -qrcFiles");
|
||||
for (const QString &qrcFile : options->qrcFiles)
|
||||
qmlImportScanner += QLatin1Char(' ') + shellQuote(qrcFile);
|
||||
} else {
|
||||
if (rootPath.isEmpty())
|
||||
rootPath = QFileInfo(options->inputFileName).absolutePath();
|
||||
else
|
||||
rootPath = QFileInfo(rootPath).absoluteFilePath();
|
||||
|
||||
if (!rootPath.endsWith(QLatin1Char('/')))
|
||||
rootPath += QLatin1Char('/');
|
||||
qmlImportScanner += QLatin1String(" -rootPath %1").arg(shellQuote(rootPath));
|
||||
}
|
||||
|
||||
if (rootPath.isEmpty())
|
||||
rootPath = QFileInfo(options->inputFileName).absolutePath();
|
||||
else
|
||||
rootPath = QFileInfo(rootPath).absoluteFilePath();
|
||||
|
||||
if (!rootPath.endsWith(QLatin1Char('/')))
|
||||
rootPath += QLatin1Char('/');
|
||||
|
||||
qmlImportScanner += QLatin1String(" -rootPath %1").arg(shellQuote(rootPath));
|
||||
|
||||
QStringList importPaths;
|
||||
importPaths += shellQuote(options->qtInstallDirectory + QLatin1String("/qml"));
|
||||
if (!rootPath.isEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user