forked from qt-creator/qt-creator
Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across all projects. Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -141,6 +141,8 @@ public:
|
||||
QVariantMap m_pluginSettings;
|
||||
Internal::UserFileAccessor *m_accessor = nullptr;
|
||||
|
||||
QString m_displayName;
|
||||
|
||||
Kit::Predicate m_requiredKitPredicate;
|
||||
Kit::Predicate m_preferredKitPredicate;
|
||||
|
||||
@@ -178,6 +180,11 @@ Project::~Project()
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString Project::displayName() const
|
||||
{
|
||||
return d->m_displayName;
|
||||
}
|
||||
|
||||
Core::Id Project::id() const
|
||||
{
|
||||
QTC_CHECK(d->m_id.isValid());
|
||||
@@ -455,6 +462,14 @@ bool Project::setupTarget(Target *t)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Project::setDisplayName(const QString &name)
|
||||
{
|
||||
if (name == d->m_displayName)
|
||||
return;
|
||||
d->m_displayName = name;
|
||||
emit displayNameChanged();
|
||||
}
|
||||
|
||||
void Project::setId(Core::Id id)
|
||||
{
|
||||
d->m_id = id;
|
||||
|
||||
Reference in New Issue
Block a user