forked from qt-creator/qt-creator
QbsProjectManager: Hide QbsKitAspectFactory implementation
Change-Id: Ifbea98759283ea5017eb28ee4e0aec56cf1c5470 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
namespace QbsProjectManager::Internal {
|
||||
|
||||
class QbsKitAspectImpl final : public KitAspect
|
||||
{
|
||||
@@ -53,14 +52,6 @@ private:
|
||||
QPushButton * const m_changeButton;
|
||||
};
|
||||
|
||||
QbsKitAspectFactory::QbsKitAspectFactory()
|
||||
{
|
||||
setObjectName(QLatin1String("QbsKitAspect"));
|
||||
setId(QbsKitAspect::id());
|
||||
setDisplayName(Tr::tr("Additional Qbs Profile Settings"));
|
||||
setPriority(22000);
|
||||
}
|
||||
|
||||
QString QbsKitAspect::representation(const Kit *kit)
|
||||
{
|
||||
const QVariantMap props = properties(kit);
|
||||
@@ -90,20 +81,33 @@ Utils::Id QbsKitAspect::id()
|
||||
return "Qbs.KitInformation";
|
||||
}
|
||||
|
||||
Tasks QbsKitAspectFactory::validate(const Kit *) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
// QbsKitAspectFactory
|
||||
|
||||
KitAspectFactory::ItemList QbsKitAspectFactory::toUserOutput(const Kit *k) const
|
||||
class QbsKitAspectFactory final : public KitAspectFactory
|
||||
{
|
||||
return {{displayName(), QbsKitAspect::representation(k)}};
|
||||
}
|
||||
public:
|
||||
QbsKitAspectFactory()
|
||||
{
|
||||
setObjectName(QLatin1String("QbsKitAspect"));
|
||||
setId(QbsKitAspect::id());
|
||||
setDisplayName(Tr::tr("Additional Qbs Profile Settings"));
|
||||
setPriority(22000);
|
||||
}
|
||||
|
||||
KitAspect *QbsKitAspectFactory::createKitAspect(Kit *k) const
|
||||
{
|
||||
return new QbsKitAspectImpl(k, this);
|
||||
}
|
||||
private:
|
||||
Tasks validate(const Kit *) const override { return {}; }
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
ItemList toUserOutput(const Kit *k) const override
|
||||
{
|
||||
return {{displayName(), QbsKitAspect::representation(k)}};
|
||||
}
|
||||
|
||||
KitAspect *createKitAspect(Kit *k) const override
|
||||
{
|
||||
return new QbsKitAspectImpl(k, this);
|
||||
}
|
||||
};
|
||||
|
||||
const QbsKitAspectFactory theQbsKitAspectFactory;
|
||||
|
||||
} // QbsProjectManager::Internal
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <projectexplorer/kitaspects.h>
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
namespace QbsProjectManager::Internal {
|
||||
|
||||
class QbsKitAspect final
|
||||
{
|
||||
@@ -18,16 +17,4 @@ public:
|
||||
static Utils::Id id();
|
||||
};
|
||||
|
||||
class QbsKitAspectFactory final : public ProjectExplorer::KitAspectFactory
|
||||
{
|
||||
public:
|
||||
QbsKitAspectFactory();
|
||||
|
||||
private:
|
||||
ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *) const override;
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *) const override;
|
||||
ProjectExplorer::KitAspect *createKitAspect(ProjectExplorer::Kit *) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
} // QbsProjectManager::Internal
|
||||
|
@@ -7,7 +7,6 @@
|
||||
#include "qbsbuildstep.h"
|
||||
#include "qbscleanstep.h"
|
||||
#include "qbsinstallstep.h"
|
||||
#include "qbskitinformation.h"
|
||||
#include "qbsnodes.h"
|
||||
#include "qbsprofilemanager.h"
|
||||
#include "qbsprofilessettingspage.h"
|
||||
@@ -74,7 +73,6 @@ public:
|
||||
QbsInstallStepFactory installStepFactory;
|
||||
QbsSettingsPage settingsPage;
|
||||
QbsProfilesSettingsPage profilesSetttingsPage;
|
||||
QbsKitAspectFactory qbsKitAspectFactory;
|
||||
};
|
||||
|
||||
QbsProjectManagerPlugin::~QbsProjectManagerPlugin()
|
||||
|
Reference in New Issue
Block a user