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;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class QbsKitAspectImpl final : public KitAspect
|
class QbsKitAspectImpl final : public KitAspect
|
||||||
{
|
{
|
||||||
@@ -53,14 +52,6 @@ private:
|
|||||||
QPushButton * const m_changeButton;
|
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)
|
QString QbsKitAspect::representation(const Kit *kit)
|
||||||
{
|
{
|
||||||
const QVariantMap props = properties(kit);
|
const QVariantMap props = properties(kit);
|
||||||
@@ -90,20 +81,33 @@ Utils::Id QbsKitAspect::id()
|
|||||||
return "Qbs.KitInformation";
|
return "Qbs.KitInformation";
|
||||||
}
|
}
|
||||||
|
|
||||||
Tasks QbsKitAspectFactory::validate(const Kit *) const
|
// QbsKitAspectFactory
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
private:
|
||||||
{
|
Tasks validate(const Kit *) const override { return {}; }
|
||||||
return new QbsKitAspectImpl(k, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
ItemList toUserOutput(const Kit *k) const override
|
||||||
} // namespace QbsProjectManager
|
{
|
||||||
|
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>
|
#include <projectexplorer/kitaspects.h>
|
||||||
|
|
||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class QbsKitAspect final
|
class QbsKitAspect final
|
||||||
{
|
{
|
||||||
@@ -18,16 +17,4 @@ public:
|
|||||||
static Utils::Id id();
|
static Utils::Id id();
|
||||||
};
|
};
|
||||||
|
|
||||||
class QbsKitAspectFactory final : public ProjectExplorer::KitAspectFactory
|
} // QbsProjectManager::Internal
|
||||||
{
|
|
||||||
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
|
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
#include "qbsbuildstep.h"
|
#include "qbsbuildstep.h"
|
||||||
#include "qbscleanstep.h"
|
#include "qbscleanstep.h"
|
||||||
#include "qbsinstallstep.h"
|
#include "qbsinstallstep.h"
|
||||||
#include "qbskitinformation.h"
|
|
||||||
#include "qbsnodes.h"
|
#include "qbsnodes.h"
|
||||||
#include "qbsprofilemanager.h"
|
#include "qbsprofilemanager.h"
|
||||||
#include "qbsprofilessettingspage.h"
|
#include "qbsprofilessettingspage.h"
|
||||||
@@ -74,7 +73,6 @@ public:
|
|||||||
QbsInstallStepFactory installStepFactory;
|
QbsInstallStepFactory installStepFactory;
|
||||||
QbsSettingsPage settingsPage;
|
QbsSettingsPage settingsPage;
|
||||||
QbsProfilesSettingsPage profilesSetttingsPage;
|
QbsProfilesSettingsPage profilesSetttingsPage;
|
||||||
QbsKitAspectFactory qbsKitAspectFactory;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QbsProjectManagerPlugin::~QbsProjectManagerPlugin()
|
QbsProjectManagerPlugin::~QbsProjectManagerPlugin()
|
||||||
|
Reference in New Issue
Block a user