CppTools: Ensure that ProjectPart::id() != " "

Change-Id: Ic928380f711e58008ed66691137c238598a5c26a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-07-15 15:40:27 +02:00
parent b4464d8f4b
commit 2203565cad

View File

@@ -146,7 +146,10 @@ ProjectPart::Ptr ProjectPart::copy() const
QString ProjectPart::id() const
{
return QDir::fromNativeSeparators(projectFile) + QLatin1Char(' ') + displayName;
QString projectPartId = QDir::fromNativeSeparators(projectFile);
if (!displayName.isEmpty())
projectPartId.append(QLatin1Char(' ') + displayName);
return projectPartId;
}
QByteArray ProjectPart::readProjectConfigFile(const ProjectPart::Ptr &part)