forked from qt-creator/qt-creator
Generic Project: Use relative paths for importing
Task-number: QTCREATORBUG-10387 Change-Id: I75746491dc7dee358748aa89829ba2d6f12c0e1b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -163,11 +163,15 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
|
|||||||
|
|
||||||
QStringList includePaths;
|
QStringList includePaths;
|
||||||
foreach (const QString &path, paths) {
|
foreach (const QString &path, paths) {
|
||||||
QFileInfo fileInfo(dir, path);
|
QFileInfo fileInfo(path);
|
||||||
QDir thisDir(fileInfo.absoluteFilePath());
|
QDir thisDir(fileInfo.absoluteFilePath());
|
||||||
|
|
||||||
if (! thisDir.entryList(nameFilters, QDir::Files).isEmpty())
|
if (! thisDir.entryList(nameFilters, QDir::Files).isEmpty()) {
|
||||||
includePaths.append(path);
|
QString relative = dir.relativeFilePath(path);
|
||||||
|
if (relative.isEmpty())
|
||||||
|
relative = QLatin1String(".");
|
||||||
|
includePaths.append(relative);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::GeneratedFile generatedCreatorFile(creatorFileName);
|
Core::GeneratedFile generatedCreatorFile(creatorFileName);
|
||||||
|
|||||||
Reference in New Issue
Block a user