forked from qt-creator/qt-creator
QmakeAndroid: Replace remaining AndroidQtSupport
This uses the same approach as in the previous patches: Have some generic interface in the base classes (here ProjectNode::targetData() setTargetData()) and implement on the qmake project side. Implementation for Cmake/QBS is architecture-wise possible, but not used right now, and left for later. Change-Id: I3bbf66170020cf9027a894cd66db15ec7ffbf499 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -525,16 +525,16 @@ void FolderNode::forEachProjectNode(const std::function<void(const ProjectNode *
|
||||
}
|
||||
}
|
||||
|
||||
const ProjectNode *FolderNode::findProjectNode(const std::function<bool(const ProjectNode *)> &predicate) const
|
||||
ProjectNode *FolderNode::findProjectNode(const std::function<bool(const ProjectNode *)> &predicate)
|
||||
{
|
||||
if (const ProjectNode *projectNode = asProjectNode()) {
|
||||
if (ProjectNode *projectNode = asProjectNode()) {
|
||||
if (predicate(projectNode))
|
||||
return projectNode;
|
||||
}
|
||||
|
||||
for (const std::unique_ptr<Node> &n : m_nodes) {
|
||||
if (FolderNode *fn = n->asFolderNode()) {
|
||||
if (const ProjectNode *pn = fn->findProjectNode(predicate))
|
||||
if (ProjectNode *pn = fn->findProjectNode(predicate))
|
||||
return pn;
|
||||
}
|
||||
}
|
||||
@@ -883,6 +883,21 @@ ProjectNode *ProjectNode::projectNode(const Utils::FileName &file) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QVariant ProjectNode::targetData(Core::Id role, const Target *target) const
|
||||
{
|
||||
Q_UNUSED(role);
|
||||
Q_UNUSED(target);
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool ProjectNode::setTargetData(Core::Id role, const QVariant &value, const Target *target) const
|
||||
{
|
||||
Q_UNUSED(role);
|
||||
Q_UNUSED(target);
|
||||
Q_UNUSED(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FolderNode::isEmpty() const
|
||||
{
|
||||
return m_nodes.size() == 0;
|
||||
|
||||
Reference in New Issue
Block a user