forked from qt-creator/qt-creator
ProjectExplorer: Using function objects for kit matching
Change-Id: I377298385df345a6d30217bb018964a64897d42e Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -94,12 +94,17 @@ public:
|
||||
Core::Context m_projectLanguages;
|
||||
QVariantMap m_pluginSettings;
|
||||
Internal::UserFileAccessor *m_accessor;
|
||||
|
||||
KitMatcher m_requiredKitMatcher;
|
||||
KitMatcher m_preferredKitMatcher;
|
||||
};
|
||||
|
||||
ProjectPrivate::ProjectPrivate() :
|
||||
m_activeTarget(0),
|
||||
m_editorConfiguration(new EditorConfiguration()),
|
||||
m_accessor(0)
|
||||
m_accessor(0),
|
||||
m_requiredKitMatcher([](const Kit*) { return true; }),
|
||||
m_preferredKitMatcher([](const Kit*) { return true; })
|
||||
{ }
|
||||
|
||||
ProjectPrivate::~ProjectPrivate()
|
||||
@@ -519,6 +524,26 @@ ProjectImporter *Project::createProjectImporter() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
KitMatcher Project::requiredKitMatcher() const
|
||||
{
|
||||
return d->m_requiredKitMatcher;
|
||||
}
|
||||
|
||||
void Project::setRequiredKitMatcher(const KitMatcher &matcher)
|
||||
{
|
||||
d->m_preferredKitMatcher = matcher;
|
||||
}
|
||||
|
||||
KitMatcher Project::preferredKitMatcher() const
|
||||
{
|
||||
return d->m_preferredKitMatcher;
|
||||
}
|
||||
|
||||
void Project::setPreferredKitMatcher(const KitMatcher &matcher)
|
||||
{
|
||||
d->m_requiredKitMatcher = matcher;
|
||||
}
|
||||
|
||||
void Project::onBuildDirectoryChanged()
|
||||
{
|
||||
Target *target = qobject_cast<Target *>(sender());
|
||||
|
||||
Reference in New Issue
Block a user