Project File Parsing: Add support for new "aux" template.

Reviewed-by: dt
This commit is contained in:
Christian Kandeler
2011-05-05 17:42:35 +02:00
parent 5e164ce1bf
commit e751a135db
4 changed files with 12 additions and 1 deletions

View File

@@ -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:

View File

@@ -88,6 +88,7 @@ enum Qt4ProjectType {
ApplicationTemplate,
LibraryTemplate,
ScriptTemplate,
AuxTemplate,
SubDirsTemplate
};

View File

@@ -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;
}

View File

@@ -103,6 +103,7 @@ public:
TT_Application,
TT_Library,
TT_Script,
TT_Aux,
TT_Subdirs
};