QString rootPath = options->rootPath;
if (rootPath.isEmpty())
- rootPath = QFileInfo(options->inputFileName).path();
+ rootPath = QFileInfo(options->inputFileName).absolutePath();
+ else
+ rootPath = QFileInfo(rootPath).absoluteFilePath();
+
+ if (!rootPath.endsWith(QLatin1Char('/')))
+ rootPath += QLatin1Char('/');
QStringList importPaths;
importPaths += shellQuote(options->qtInstallDirectory + QLatin1String("/qml"));
- importPaths += QFileInfo(rootPath).absoluteFilePath();
+ importPaths += rootPath;
foreach (QString qmlImportPath, options->qmlImportPaths)
importPaths += shellQuote(qmlImportPath);
continue;
}
+ QString absolutePath = info.absolutePath();
+ if (!absolutePath.endsWith(QLatin1Char('/')))
+ absolutePath += QLatin1Char('/');
+
+ if (absolutePath.startsWith(rootPath)) {
+ if (options->verbose)
+ fprintf(stdout, " -- Skipping because file is in QML root path.\n");
+ continue;
+ }
+
QString importPathOfThisImport;
foreach (QString importPath, importPaths) {
#if defined(Q_OS_WIN32)