forked from qt-creator/qt-creator
FolderNodes: Specify filter for Add Existing Directory
Allow foldernodes to specify which files they care for when doing "Add Existing Directory". Before we used a fixed list with C++ header and source files, which does make no sense for e.g. adding to resources. Task-number: QTCREATORBUG-15278 Change-Id: I15dad133391485c2bcebd2d864623304b31b5f8f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
@@ -309,6 +309,11 @@ void FolderNode::setIcon(const QIcon &icon)
|
||||
m_icon = icon;
|
||||
}
|
||||
|
||||
QString FolderNode::addFileFilter() const
|
||||
{
|
||||
return parentFolderNode()->addFileFilter();
|
||||
}
|
||||
|
||||
bool FolderNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
|
||||
{
|
||||
if (projectNode())
|
||||
@@ -764,6 +769,11 @@ QList<ProjectNode*> SessionNode::projectNodes() const
|
||||
return m_projectNodes;
|
||||
}
|
||||
|
||||
QString SessionNode::addFileFilter() const
|
||||
{
|
||||
return QLatin1String("*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++; *.h; *.hh; *.hpp; *.hxx;");
|
||||
}
|
||||
|
||||
void SessionNode::addProjectNodes(const QList<ProjectNode*> &projectNodes)
|
||||
{
|
||||
if (!projectNodes.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user