Move some knowledge from KitAspectWidget to KitAspect

The authoritative source of information about a KitAspect is the
KitAspect itself, not the associated widget.

Change-Id: I72d3d0425b845457846a940350bab59f1ff0cc2c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-02-06 16:16:07 +01:00
parent ce19540b77
commit 09a7d2bd45
13 changed files with 50 additions and 103 deletions

View File

@@ -54,7 +54,6 @@ public:
}
private:
QString displayName() const override { return QbsKitAspect::displayName(); }
void makeReadOnly() override { m_changeButton->setEnabled(false); }
void refresh() override { m_contentLabel->setText(QbsKitAspect::representation(kit())); }
QWidget *mainWidget() const override { return m_contentLabel; }
@@ -75,14 +74,10 @@ QbsKitAspect::QbsKitAspect()
{
setObjectName(QLatin1String("QbsKitAspect"));
setId(QbsKitAspect::id());
setDisplayName(tr("Additional Qbs Profile Settings"));
setPriority(22000);
}
QString QbsKitAspect::displayName()
{
return tr("Additional Qbs Profile Settings");
}
QString QbsKitAspect::representation(const Kit *kit)
{
const QVariantMap props = properties(kit);

View File

@@ -37,7 +37,6 @@ class QbsKitAspect final : public ProjectExplorer::KitAspect
public:
QbsKitAspect();
static QString displayName();
static QString representation(const ProjectExplorer::Kit *kit);
static QVariantMap properties(const ProjectExplorer::Kit *kit);
static void setProperties(ProjectExplorer::Kit *kit, const QVariantMap &properties);