Commit 6a4ecce8 authored by Petar Perisin's avatar Petar Perisin
Browse files

GenericProject: add only existing files

when refreshing project check if files exist, and add only existing
files to the project

Change-Id: I5937bbe39e56c089b97350e095458c014fd294fb
Reviewed-by: default avatarThorbjørn Lindeijer <>
parent c5228e64
......@@ -328,6 +328,7 @@ QStringList GenericProject::processEntries(const QStringList &paths,
const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
const QDir projectDir(QFileInfo(m_fileName).dir());
QFileInfo fileInfo;
QStringList absolutePaths;
foreach (const QString &path, paths) {
QString trimmedPath = path.trimmed();
......@@ -338,10 +339,13 @@ QStringList GenericProject::processEntries(const QStringList &paths,
trimmedPath = Utils::FileName::fromUserInput(trimmedPath).toString();
const QString absPath = QFileInfo(projectDir, trimmedPath).absoluteFilePath();
if (map)
map->insert(absPath, trimmedPath);
fileInfo.setFile(projectDir, trimmedPath);
if (fileInfo.exists()) {
const QString absPath = fileInfo.absoluteFilePath();
if (map)
map->insert(absPath, trimmedPath);
return absolutePaths;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment