forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user