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()) {
|
switch (proFileNode->projectType()) {
|
||||||
case ApplicationTemplate:
|
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;
|
actions << AddNewFile;
|
||||||
if (m_recursiveEnumerateFiles.contains(node->path())) {
|
if (m_recursiveEnumerateFiles.contains(node->path())) {
|
||||||
actions << EraseFile;
|
actions << EraseFile;
|
||||||
@@ -1506,6 +1511,8 @@ static Qt4ProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::Templat
|
|||||||
return LibraryTemplate;
|
return LibraryTemplate;
|
||||||
case ProFileEvaluator::TT_Script:
|
case ProFileEvaluator::TT_Script:
|
||||||
return ScriptTemplate;
|
return ScriptTemplate;
|
||||||
|
case ProFileEvaluator::TT_Aux:
|
||||||
|
return AuxTemplate;
|
||||||
case ProFileEvaluator::TT_Subdirs:
|
case ProFileEvaluator::TT_Subdirs:
|
||||||
return SubDirsTemplate;
|
return SubDirsTemplate;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ enum Qt4ProjectType {
|
|||||||
ApplicationTemplate,
|
ApplicationTemplate,
|
||||||
LibraryTemplate,
|
LibraryTemplate,
|
||||||
ScriptTemplate,
|
ScriptTemplate,
|
||||||
|
AuxTemplate,
|
||||||
SubDirsTemplate
|
SubDirsTemplate
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3395,6 +3395,8 @@ ProFileEvaluator::TemplateType ProFileEvaluator::templateType() const
|
|||||||
return TT_Library;
|
return TT_Library;
|
||||||
if (!t.compare(QLatin1String("script"), Qt::CaseInsensitive))
|
if (!t.compare(QLatin1String("script"), Qt::CaseInsensitive))
|
||||||
return TT_Script;
|
return TT_Script;
|
||||||
|
if (!t.compare(QLatin1String("aux"), Qt::CaseInsensitive))
|
||||||
|
return TT_Aux;
|
||||||
if (!t.compare(QLatin1String("subdirs"), Qt::CaseInsensitive))
|
if (!t.compare(QLatin1String("subdirs"), Qt::CaseInsensitive))
|
||||||
return TT_Subdirs;
|
return TT_Subdirs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public:
|
|||||||
TT_Application,
|
TT_Application,
|
||||||
TT_Library,
|
TT_Library,
|
||||||
TT_Script,
|
TT_Script,
|
||||||
|
TT_Aux,
|
||||||
TT_Subdirs
|
TT_Subdirs
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user