forked from qt-creator/qt-creator
Project File Parsing: Add support for new "aux" template.
Reviewed-by: dt
This commit is contained in:
@@ -784,7 +784,12 @@ QList<ProjectNode::ProjectAction> Qt4PriFileNode::supportedActions(Node *node) c
|
||||
|
||||
switch (proFileNode->projectType()) {
|
||||
case ApplicationTemplate:
|
||||
case LibraryTemplate: {
|
||||
case LibraryTemplate:
|
||||
case AuxTemplate: {
|
||||
// TODO: Some of the file types don't make much sense for aux
|
||||
// projects (e.g. cpp). It'd be nice if the "add" action could
|
||||
// work on a subset of the file types according to project type.
|
||||
|
||||
actions << AddNewFile;
|
||||
if (m_recursiveEnumerateFiles.contains(node->path())) {
|
||||
actions << EraseFile;
|
||||
@@ -1506,6 +1511,8 @@ static Qt4ProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::Templat
|
||||
return LibraryTemplate;
|
||||
case ProFileEvaluator::TT_Script:
|
||||
return ScriptTemplate;
|
||||
case ProFileEvaluator::TT_Aux:
|
||||
return AuxTemplate;
|
||||
case ProFileEvaluator::TT_Subdirs:
|
||||
return SubDirsTemplate;
|
||||
default:
|
||||
|
||||
@@ -88,6 +88,7 @@ enum Qt4ProjectType {
|
||||
ApplicationTemplate,
|
||||
LibraryTemplate,
|
||||
ScriptTemplate,
|
||||
AuxTemplate,
|
||||
SubDirsTemplate
|
||||
};
|
||||
|
||||
|
||||
@@ -3395,6 +3395,8 @@ ProFileEvaluator::TemplateType ProFileEvaluator::templateType() const
|
||||
return TT_Library;
|
||||
if (!t.compare(QLatin1String("script"), Qt::CaseInsensitive))
|
||||
return TT_Script;
|
||||
if (!t.compare(QLatin1String("aux"), Qt::CaseInsensitive))
|
||||
return TT_Aux;
|
||||
if (!t.compare(QLatin1String("subdirs"), Qt::CaseInsensitive))
|
||||
return TT_Subdirs;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ public:
|
||||
TT_Application,
|
||||
TT_Library,
|
||||
TT_Script,
|
||||
TT_Aux,
|
||||
TT_Subdirs
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user