forked from qt-creator/qt-creator
ProjectExplorer: Remove BuildConfigurationFactory::priority
It's essentially an intrusive hack that's used only to prioritize Ios+Qmake over plain Qmake. The effect is now achieved by an arguably equally evil dependency on the construction order of BuildConfiguration factories. It can be argued, however, that this is a feature as it allows user plugins to intentionally override core functionality by using the standard setup pattern and depending on the to-be- overridden plugin. Change-Id: Ic1efa305daf3ca19a880d2a7ccb40e2768d8f57c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -128,15 +128,10 @@ protected:
|
||||
~BuildConfigurationFactory() override;
|
||||
|
||||
public:
|
||||
// The priority is negative if this factory cannot create anything for the target.
|
||||
// It is 0 for the "default" factory that wants to handle the target.
|
||||
// Add 100 for each specialization.
|
||||
virtual int priority(const Target *parent) const;
|
||||
// List of build information that can be used to create a new build configuration via
|
||||
// "Add Build Configuration" button.
|
||||
const QList<BuildInfo> allAvailableBuilds(const Target *parent) const;
|
||||
|
||||
virtual int priority(const Kit *k, const QString &projectPath) const;
|
||||
// List of build information that can be used to initially set up a new build configuration.
|
||||
const QList<BuildInfo> allAvailableSetups(const Kit *k, const QString &projectPath) const;
|
||||
|
||||
@@ -162,7 +157,6 @@ protected:
|
||||
void setSupportedProjectMimeTypeName(const QString &mimeTypeName);
|
||||
void addSupportedTargetDeviceType(Core::Id id);
|
||||
void setDefaultDisplayName(const QString &defaultDisplayName);
|
||||
void setBasePriority(int basePriority);
|
||||
|
||||
using BuildConfigurationCreator = std::function<BuildConfiguration *(Target *)>;
|
||||
|
||||
@@ -183,8 +177,6 @@ private:
|
||||
QList<Core::Id> m_supportedTargetDeviceTypes;
|
||||
QString m_supportedProjectMimeTypeName;
|
||||
IssueReporter m_issueReporter;
|
||||
|
||||
int m_basePriority = 0; // Use higher numbers (1, 2, ...) for higher priorities.
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user