Commit 9f96d7d0 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

qmakeprojectimporter: avoid adding duplicate entries



ios having multiple makefiles gets detected several times and one
ends up with 5 times the same entry when conviguring a project
that was already present

Change-Id: I5685208305d1f489c5502d5aec0c08dded49da90
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent c1a71b1c
......@@ -48,6 +48,17 @@ public:
QString additionalArguments;
QString makefile;
bool operator==(const QmakeBuildInfo &o) {
return displayName == o.displayName
&& typeName == o.typeName
&& buildDirectory == o.buildDirectory
&& kitId == o.kitId
&& typeName == o.typeName
&& supportsShadowBuild == o.supportsShadowBuild
&& type == o.type
&& additionalArguments == o.additionalArguments;
}
QList<ProjectExplorer::Task> reportIssues(const QString &projectPath,
const QString &buildDir) const
{
......
......@@ -163,7 +163,17 @@ QList<ProjectExplorer::BuildInfo *> QmakeProjectImporter::import(const Utils::Fi
info->additionalArguments = additionalArguments;
info->makefile = makefile;
result << info;
bool found = false;
foreach (ProjectExplorer::BuildInfo *bInfo, result) {
if (*static_cast<QmakeBuildInfo *>(bInfo) == *info) {
found = true;
break;
}
}
if (found)
delete info;
else
result << info;
}
}
......
Markdown is supported
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