qdoc: More data member name changes

In preparation for refactoring the Node class hierarchy,
the names of a few enum types and the functions that set
and get them are changed so that they will not be confused
with other uses of the word Type.

Change-Id: I0496b46e5d7adffccadcb464aedb2806728e781d
Task-number: QTBUG-45450
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Martin Smith 2015-04-10 12:54:57 +02:00
parent 02a13a86fa
commit 8a2645b8f0
29 changed files with 171 additions and 171 deletions

View File

@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
\also Text
*/
/*! \enum Atom::Type
/*! \enum Atom::AtomType
\value AbstractLeft
\value AbstractRight
@ -237,27 +237,27 @@ static const struct {
{ 0, 0 }
};
/*! \fn Atom::Atom(Type type, const QString& string)
/*! \fn Atom::Atom(AtomType type, const QString& string)
Constructs an atom of the specified \a type with the single
parameter \a string and does not put the new atom in a list.
*/
/*! \fn Atom::Atom(Type type, const QString& p1, const QString& p2)
/*! \fn Atom::Atom(AtomType type, const QString& p1, const QString& p2)
Constructs an atom of the specified \a type with the two
parameters \a p1 and \a p2 and does not put the new atom
in a list.
*/
/*! \fn Atom(Atom *previous, Type type, const QString& string)
/*! \fn Atom(Atom *previous, AtomType type, const QString& string)
Constructs an atom of the specified \a type with the single
parameter \a string and inserts the new atom into the list
after the \a previous atom.
*/
/*! \fn Atom::Atom(Atom* previous, Type type, const QString& p1, const QString& p2)
/*! \fn Atom::Atom(Atom* previous, AtomType type, const QString& p1, const QString& p2)
Constructs an atom of the specified \a type with the two
parameters \a p1 and \a p2 and inserts the new atom into
@ -289,19 +289,19 @@ static const struct {
*/
/*!
Return the next Atom in the list if it is of Type \a t.
Return the next Atom in the list if it is of AtomType \a t.
Otherwise return 0.
*/
const Atom* Atom::next(Type t) const
const Atom* Atom::next(AtomType t) const
{
return (next_ && (next_->type() == t)) ? next_ : 0;
}
/*!
Return the next Atom in the list if it is of Type \a t
Return the next Atom in the list if it is of AtomType \a t
and its string part is \a s. Otherwise return 0.
*/
const Atom* Atom::next(Type t, const QString& s) const
const Atom* Atom::next(AtomType t, const QString& s) const
{
return (next_ && (next_->type() == t) && (next_->string() == s)) ? next_ : 0;
}
@ -311,7 +311,7 @@ const Atom* Atom::next(Type t, const QString& s) const
\also type(), string()
*/
/*! \fn Type Atom::type() const
/*! \fn AtomType Atom::type() const
Return the type of this atom.
\also string(), next()
*/

View File

@ -46,7 +46,7 @@ class LinkAtom;
class Atom
{
public:
enum Type {
enum AtomType {
AbstractLeft,
AbstractRight,
AnnotatedList,
@ -143,13 +143,13 @@ public:
strs << string;
}
Atom(Type type, const QString& string = "")
Atom(AtomType type, const QString& string = "")
: next_(0), type_(type)
{
strs << string;
}
Atom(Type type, const QString& p1, const QString& p2)
Atom(AtomType type, const QString& p1, const QString& p2)
: next_(0), type_(type)
{
strs << p1;
@ -157,14 +157,14 @@ public:
strs << p2;
}
Atom(Atom* previous, Type type, const QString& string = "")
Atom(Atom* previous, AtomType type, const QString& string = "")
: next_(previous->next_), type_(type)
{
strs << string;
previous->next_ = this;
}
Atom(Atom* previous, Type type, const QString& p1, const QString& p2)
Atom(Atom* previous, AtomType type, const QString& p1, const QString& p2)
: next_(previous->next_), type_(type)
{
strs << p1;
@ -183,9 +183,9 @@ public:
void setNext(Atom* newNext) { next_ = newNext; }
const Atom* next() const { return next_; }
const Atom* next(Type t) const;
const Atom* next(Type t, const QString& s) const;
Type type() const { return type_; }
const Atom* next(AtomType t) const;
const Atom* next(AtomType t, const QString& s) const;
AtomType type() const { return type_; }
QString typeString() const;
const QString& string() const { return strs[0]; }
const QString& string(int i) const { return strs[i]; }
@ -197,14 +197,14 @@ public:
virtual Node::Genus genus() { return Node::DontCare; }
virtual bool specifiesDomain() { return false; }
virtual Tree* domain() { return 0; }
virtual Node::Type goal() { return Node::NoType; }
virtual Node::NodeType goal() { return Node::NoType; }
virtual const QString& error() { return noError_; }
virtual void resolveSquareBracketParams() { }
protected:
static QString noError_;
Atom* next_;
Type type_;
AtomType type_;
QStringList strs;
};
@ -220,14 +220,14 @@ class LinkAtom : public Atom
virtual Node::Genus genus() Q_DECL_OVERRIDE { resolveSquareBracketParams(); return genus_; }
virtual bool specifiesDomain() Q_DECL_OVERRIDE { resolveSquareBracketParams(); return (domain_ != 0); }
virtual Tree* domain() Q_DECL_OVERRIDE { resolveSquareBracketParams(); return domain_; }
virtual Node::Type goal() Q_DECL_OVERRIDE { resolveSquareBracketParams(); return goal_; }
virtual Node::NodeType goal() Q_DECL_OVERRIDE { resolveSquareBracketParams(); return goal_; }
virtual const QString& error() Q_DECL_OVERRIDE { return error_; }
virtual void resolveSquareBracketParams() Q_DECL_OVERRIDE;
protected:
bool resolved_;
Node::Genus genus_;
Node::Type goal_;
Node::NodeType goal_;
Tree* domain_;
QString error_;
QString squareBracketParams_;

View File

@ -127,7 +127,7 @@ public:
virtual bool recognizeCode(const QString& code) = 0;
virtual bool recognizeExtension(const QString& ext) = 0;
virtual bool recognizeLanguage(const QString& lang) = 0;
virtual Atom::Type atomType() const = 0;
virtual Atom::AtomType atomType() const = 0;
virtual QString markedUpCode(const QString& code,
const Node *relative,
const Location &location) = 0;

View File

@ -426,21 +426,21 @@ void CodeParser::checkModuleInclusion(Node* n)
#if 0
case Node::Document:
if (n->access() != Node::Private && !n->doc().isEmpty()) {
if (n->subType() == Node::HeaderFile) {
if (n->docSubtype() == Node::HeaderFile) {
#if 0
n->doc().location().warning(tr("Header file with title \"%1\" has no \\inmodule command; "
"using project name by default: %2")
.arg(n->title()).arg(Generator::defaultModuleName()));
#endif
}
else if (n->subType() == Node::Page) {
else if (n->docSubtype() == Node::Page) {
#if 0
n->doc().location().warning(tr("Page with title \"%1\" has no \\inmodule command; "
"using project name by default: %2")
.arg(n->title()).arg(Generator::defaultModuleName()));
#endif
}
else if (n->subType() == Node::Example) {
else if (n->docSubtype() == Node::Example) {
#if 0
n->doc().location().warning(tr("Example with title \"%1\" has no \\inmodule command; "
"using project name by default: %2")

View File

@ -103,7 +103,7 @@ bool CppCodeMarker::recognizeLanguage(const QString &lang)
/*!
Returns the type of atom used to represent C++ code in the documentation.
*/
Atom::Type CppCodeMarker::atomType() const
Atom::AtomType CppCodeMarker::atomType() const
{
return Atom::Code;
}

View File

@ -53,7 +53,7 @@ public:
virtual bool recognizeCode(const QString& code) Q_DECL_OVERRIDE;
virtual bool recognizeExtension(const QString& ext) Q_DECL_OVERRIDE;
virtual bool recognizeLanguage(const QString& lang) Q_DECL_OVERRIDE;
virtual Atom::Type atomType() const Q_DECL_OVERRIDE;
virtual Atom::AtomType atomType() const Q_DECL_OVERRIDE;
virtual QString markedUpCode(const QString& code,
const Node *relative,
const Location &location) Q_DECL_OVERRIDE;

View File

@ -408,7 +408,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
this way to allow the writer to refer to the entity
without including the namespace qualifier.
*/
Node::Type type = nodeTypeMap[command];
Node::NodeType type = nodeTypeMap[command];
QStringList paths = arg.first.split(QLatin1Char(' '));
QStringList path = paths[0].split("::");
Node *node = 0;
@ -572,7 +572,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
QmlTypeNode* qmlType = qdb_->findQmlType(module, qmlTypeName);
if (qmlType) {
bool attached = false;
Node::Type nodeType = Node::QmlMethod;
Node::NodeType nodeType = Node::QmlMethod;
if ((command == COMMAND_QMLSIGNAL) ||
(command == COMMAND_JSSIGNAL))
nodeType = Node::QmlSignal;
@ -2342,7 +2342,7 @@ bool CppCodeParser::makeFunctionNode(const QString& signature,
FunctionNode* CppCodeParser::makeFunctionNode(const Doc& doc,
const QString& sig,
InnerNode* parent,
Node::Type type,
Node::NodeType type,
bool attached,
QString qdoctag)
{

View File

@ -53,11 +53,11 @@ class CppCodeParser : public CodeParser
struct ExtraFuncData {
InnerNode* root; // Used as the parent.
Node::Type type; // The node type: Function, etc.
Node::NodeType type; // The node type: Function, etc.
bool isAttached; // If true, the method is attached.
bool isMacro; // If true, we are parsing a macro signature.
ExtraFuncData() : root(0), type(Node::Function), isAttached(false), isMacro(false) { }
ExtraFuncData(InnerNode* r, Node::Type t, bool a)
ExtraFuncData(InnerNode* r, Node::NodeType t, bool a)
: root(r), type(t), isAttached(a), isMacro(false) { }
};
@ -141,7 +141,7 @@ protected:
FunctionNode* makeFunctionNode(const Doc& doc,
const QString& sig,
InnerNode* parent,
Node::Type type,
Node::NodeType type,
bool attached,
QString qdoctag);
void parseQiteratorDotH(const Location &location, const QString &filePath);
@ -151,7 +151,7 @@ protected:
void createExampleFileNodes(DocumentNode *dn);
protected:
QMap<QString, Node::Type> nodeTypeMap;
QMap<QString, Node::NodeType> nodeTypeMap;
Tokenizer *tokenizer;
int tok;
Node::Access access;

View File

@ -469,16 +469,16 @@ private:
void endSection(int unit, int endCmd);
void parseAlso();
void append(const QString &string);
void append(Atom::Type type, const QString& string = QString());
void append(Atom::Type type, const QString& p1, const QString& p2);
void append(Atom::AtomType type, const QString& string = QString());
void append(Atom::AtomType type, const QString& p1, const QString& p2);
void append(const QString& p1, const QString& p2);
void appendChar(QChar ch);
void appendWord(const QString &word);
void appendToCode(const QString &code);
void appendToCode(const QString &code, Atom::Type defaultType);
void appendToCode(const QString &code, Atom::AtomType defaultType);
void startNewPara();
void enterPara(Atom::Type leftType = Atom::ParaLeft,
Atom::Type rightType = Atom::ParaRight,
void enterPara(Atom::AtomType leftType = Atom::ParaLeft,
Atom::AtomType rightType = Atom::ParaRight,
const QString& string = QString());
void leavePara();
void leaveValue();
@ -525,8 +525,8 @@ private:
bool inTableRow;
bool inTableItem;
bool indexStartedPara; // ### rename
Atom::Type pendingParaLeftType;
Atom::Type pendingParaRightType;
Atom::AtomType pendingParaLeftType;
Atom::AtomType pendingParaRightType;
QString pendingParaString;
int braceDepth;
@ -1984,9 +1984,9 @@ void DocParser::parseAlso()
}
}
void DocParser::append(Atom::Type type, const QString &string)
void DocParser::append(Atom::AtomType type, const QString &string)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
priv->text << Atom(type, string);
@ -1994,15 +1994,15 @@ void DocParser::append(Atom::Type type, const QString &string)
void DocParser::append(const QString &string)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
priv->text << Atom(string); // The Atom type is Link.
}
void DocParser::append(Atom::Type type, const QString& p1, const QString& p2)
void DocParser::append(Atom::AtomType type, const QString& p1, const QString& p2)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
priv->text << Atom(type, p1, p2);
@ -2010,7 +2010,7 @@ void DocParser::append(Atom::Type type, const QString& p1, const QString& p2)
void DocParser::append(const QString& p1, const QString& p2)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
if (p2.isEmpty())
@ -2043,15 +2043,15 @@ void DocParser::appendWord(const QString &word)
void DocParser::appendToCode(const QString& markedCode)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if (lastType != Atom::Qml && lastType != Atom::Code && lastType != Atom::JavaScript)
append(Atom::Qml);
priv->text.lastAtom()->appendString(markedCode);
}
void DocParser::appendToCode(const QString &markedCode, Atom::Type defaultType)
void DocParser::appendToCode(const QString &markedCode, Atom::AtomType defaultType)
{
Atom::Type lastType = priv->text.lastAtom()->type();
Atom::AtomType lastType = priv->text.lastAtom()->type();
if (lastType != Atom::Qml && lastType != Atom::Code && lastType != Atom::JavaScript)
append(defaultType, markedCode);
else
@ -2064,8 +2064,8 @@ void DocParser::startNewPara()
enterPara();
}
void DocParser::enterPara(Atom::Type leftType,
Atom::Type rightType,
void DocParser::enterPara(Atom::AtomType leftType,
Atom::AtomType rightType,
const QString& string)
{
if (paraState == OutsideParagraph) {

View File

@ -697,7 +697,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
if (node->type() == Node::Document) {
const DocumentNode *dn = static_cast<const DocumentNode *>(node);
if ((dn->subType() == Node::File) || (dn->subType() == Node::Image)) {
if ((dn->docSubtype() == Node::File) || (dn->docSubtype() == Node::Image)) {
quiet = true;
}
}
@ -826,7 +826,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
if (dn->isExample()) {
generateExampleFiles(dn, marker);
}
else if (dn->subType() == Node::File) {
else if (dn->docSubtype() == Node::File) {
Text text;
Quoter quoter;
Doc::quoteFromFile(dn->doc().location(), quoter, dn->name());
@ -867,7 +867,7 @@ void Generator::generateCollectionNode(CollectionNode* , CodeMarker* )
*/
void Generator::generateFileList(const DocumentNode* dn,
CodeMarker* marker,
Node::SubType subtype,
Node::DocSubtype subtype,
const QString& tag)
{
int count = 0;
@ -878,7 +878,7 @@ void Generator::generateFileList(const DocumentNode* dn,
<< Atom(Atom::ListLeft, openedList.styleString());
foreach (const Node* child, dn->childNodes()) {
if (child->subType() == subtype) {
if (child->docSubtype() == subtype) {
++count;
QString file = child->name();
if (subtype == Node::Image) {
@ -982,11 +982,11 @@ void Generator::generateInnerNode(InnerNode* node)
if (node->isDocumentNode()) {
DocumentNode* docNode = static_cast<DocumentNode*>(node);
if (docNode->subType() == Node::ExternalPage)
if (docNode->docSubtype() == Node::ExternalPage)
return;
if (docNode->subType() == Node::Image)
if (docNode->docSubtype() == Node::Image)
return;
if (docNode->subType() == Node::Page) {
if (docNode->docSubtype() == Node::Page) {
if (node->count() > 0)
qDebug("PAGE %s HAS CHILDREN", qPrintable(docNode->title()));
}
@ -1705,7 +1705,7 @@ void Generator::initializeGenerator(const Config& config)
singleExec_ = config.getBool(CONFIG_SINGLEEXEC);
}
bool Generator::matchAhead(const Atom *atom, Atom::Type expectedAtomType)
bool Generator::matchAhead(const Atom *atom, Atom::AtomType expectedAtomType)
{
return atom->next() != 0 && atom->next()->type() == expectedAtomType;
}
@ -1852,7 +1852,7 @@ void Generator::singularPlural(Text& text, const NodeList& nodes)
text << " are";
}
int Generator::skipAtoms(const Atom *atom, Atom::Type type) const
int Generator::skipAtoms(const Atom *atom, Atom::AtomType type) const
{
int skipAhead = 0;
atom = atom->next();

View File

@ -130,10 +130,10 @@ protected:
const QString& qmlName);
virtual bool generateText(const Text& text, const Node *relative, CodeMarker *marker);
virtual QString imageFileName(const Node *relative, const QString& fileBase);
virtual int skipAtoms(const Atom *atom, Atom::Type type) const;
virtual int skipAtoms(const Atom *atom, Atom::AtomType type) const;
virtual QString typeString(const Node *node);
static bool matchAhead(const Atom *atom, Atom::Type expectedAtomType);
static bool matchAhead(const Atom *atom, Atom::AtomType expectedAtomType);
static QString outputPrefix(const QString &nodeType);
static void singularPlural(Text& text, const NodeList& nodes);
static void supplementAlsoList(const Node *node, QList<Text> &alsoList);
@ -152,7 +152,7 @@ protected:
void generateExampleFiles(const DocumentNode *dn, CodeMarker *marker);
void generateFileList(const DocumentNode* dn,
CodeMarker* marker,
Node::SubType subtype,
Node::DocSubtype subtype,
const QString& tag);
void generateSince(const Node *node, CodeMarker *marker);
void generateStatus(const Node *node, CodeMarker *marker);

View File

@ -122,7 +122,7 @@ void HelpProjectWriter::reset(const Config &config,
void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList &selectors)
{
QHash<QString, Node::Type> typeHash;
QHash<QString, Node::NodeType> typeHash;
typeHash["namespace"] = Node::Namespace;
typeHash["class"] = Node::Class;
typeHash["fake"] = Node::Document;
@ -142,14 +142,14 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
typeHash["qmlclass"] = Node::QmlType;
typeHash["qmlbasictype"] = Node::QmlBasicType;
QHash<QString, Node::SubType> subTypeHash;
subTypeHash["example"] = Node::Example;
subTypeHash["headerfile"] = Node::HeaderFile;
subTypeHash["file"] = Node::File;
subTypeHash["page"] = Node::Page;
subTypeHash["externalpage"] = Node::ExternalPage;
QHash<QString, Node::DocSubtype> docSubtypeHash;
docSubtypeHash["example"] = Node::Example;
docSubtypeHash["headerfile"] = Node::HeaderFile;
docSubtypeHash["file"] = Node::File;
docSubtypeHash["page"] = Node::Page;
docSubtypeHash["externalpage"] = Node::ExternalPage;
QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values());
QSet<Node::DocSubtype> allSubTypes = QSet<Node::DocSubtype>::fromList(docSubtypeHash.values());
foreach (const QString &selector, selectors) {
QStringList pieces = selector.split(QLatin1Char(':'));
@ -161,13 +161,13 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
QString lower = pieces[0].toLower();
pieces = pieces[1].split(QLatin1Char(','));
if (typeHash.contains(lower)) {
QSet<Node::SubType> subTypes;
QSet<Node::DocSubtype> docSubtypes;
for (int i = 0; i < pieces.size(); ++i) {
QString lower = pieces[i].toLower();
if (subTypeHash.contains(lower))
subTypes.insert(subTypeHash[lower]);
if (docSubtypeHash.contains(lower))
docSubtypes.insert(docSubtypeHash[lower]);
}
subproject.selectors[typeHash[lower]] = subTypes;
subproject.selectors[typeHash[lower]] = docSubtypes;
}
}
}
@ -274,8 +274,8 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
// Accept only fake nodes with subtypes contained in the selector's
// mask.
const DocumentNode *docNode = static_cast<const DocumentNode *>(node);
if (subproject.selectors[node->type()].contains(docNode->subType()) &&
docNode->subType() != Node::ExternalPage &&
if (subproject.selectors[node->type()].contains(docNode->docSubtype()) &&
docNode->docSubtype() != Node::ExternalPage &&
!docNode->fullTitle().isEmpty()) {
project.subprojects[i].nodes[objName] = node;
@ -417,11 +417,11 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
// attributes.
case Node::Document: {
const DocumentNode *docNode = static_cast<const DocumentNode*>(node);
if (docNode->subType() != Node::ExternalPage &&
docNode->subType() != Node::Image &&
if (docNode->docSubtype() != Node::ExternalPage &&
docNode->docSubtype() != Node::Image &&
!docNode->fullTitle().isEmpty()) {
if (docNode->subType() != Node::File) {
if (docNode->docSubtype() != Node::File) {
if (docNode->doc().hasKeywords()) {
foreach (const Atom *keyword, docNode->doc().keywords()) {
if (!keyword->string().isEmpty()) {
@ -467,7 +467,7 @@ void HelpProjectWriter::generateSections(HelpProject &project,
/*
Don't include index nodes in the help file. Or DITA map nodes.
*/
if (node->isIndexNode() || node->subType() == Node::DitaMap)
if (node->isIndexNode() || node->docSubtype() == Node::DitaMap)
return;
if (!generateSection(project, writer, node))
return;
@ -626,7 +626,7 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
writer.writeAttribute("ref", href);
writer.writeAttribute("title", docNode->fullTitle());
if (docNode->subType() == Node::HeaderFile)
if (docNode->docSubtype() == Node::HeaderFile)
addMembers(project, writer, node);
writer.writeEndElement(); // section

View File

@ -50,7 +50,7 @@ struct SubProject
{
QString title;
QString indexTitle;
QHash<Node::Type, QSet<DocumentNode::SubType> > selectors;
QHash<Node::NodeType, QSet<DocumentNode::DocSubtype> > selectors;
bool sortPages;
QString type;
QHash<QString, const Node *> nodes;

View File

@ -1644,7 +1644,7 @@ void HtmlGenerator::generateDocumentNode(DocumentNode* dn, CodeMarker* marker)
is DITA map page, write the node's contents as a dita
map and return without doing anything else.
*/
if (dn->subType() == Node::Page && dn->pageType() == Node::DitaMapPage) {
if (dn->docSubtype() == Node::Page && dn->pageType() == Node::DitaMapPage) {
const DitaMapNode* dmn = static_cast<const DitaMapNode*>(dn);
writeDitaMap(dmn);
return;
@ -1670,7 +1670,7 @@ void HtmlGenerator::generateDocumentNode(DocumentNode* dn, CodeMarker* marker)
dn,
marker);
if (dn->subType() == Node::HeaderFile) {
if (dn->docSubtype() == Node::HeaderFile) {
// Generate brief text and status for modules.
generateBrief(dn, marker);
generateStatus(dn, marker);
@ -3744,9 +3744,9 @@ QString HtmlGenerator::fileBase(const Node *node) const
QString HtmlGenerator::fileName(const Node *node)
{
if (node->type() == Node::Document) {
if (static_cast<const DocumentNode *>(node)->subType() == Node::ExternalPage)
if (static_cast<const DocumentNode *>(node)->docSubtype() == Node::ExternalPage)
return node->name();
if (static_cast<const DocumentNode *>(node)->subType() == Node::Image)
if (static_cast<const DocumentNode *>(node)->docSubtype() == Node::Image)
return node->name();
}
return Generator::fileName(node);
@ -3871,7 +3871,7 @@ QString HtmlGenerator::getAutoLink(const Atom *atom, const Node *relative, const
QString link = (*node)->url();
if (link.isEmpty()) {
link = linkForNode(*node, relative);
if ((*node)->subType() == Node::Image)
if ((*node)->docSubtype() == Node::Image)
link = "images/used-in-examples/" + link;
if (!ref.isEmpty())
link += QLatin1Char('#') + ref;
@ -4511,7 +4511,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
writer.writeAttribute("docUrl", docUrl);
QStringList proFiles;
foreach (const Node* child, en->childNodes()) {
if (child->subType() == Node::File) {
if (child->docSubtype() == Node::File) {
QString file = child->name();
if (file.endsWith(".pro") || file.endsWith(".qmlproject")) {
proFiles << file;
@ -4617,7 +4617,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
QString ename = en->name().mid(en->name().lastIndexOf('/')+1);
QMap<int, const Node*> filesToOpen;
foreach (const Node* child, en->childNodes()) {
if (child->subType() == Node::File) {
if (child->docSubtype() == Node::File) {
QFileInfo fileInfo(child->name());
QString fileName = fileInfo.fileName().toLower();
// open .qml, .cpp and .h files with a
@ -4738,7 +4738,7 @@ void HtmlGenerator::reportOrphans(const InnerNode* parent)
case Node::QmlModule:
break;
case Node::Document:
switch (child->subType()) {
switch (child->docSubtype()) {
case Node::Example:
break;
case Node::HeaderFile:

View File

@ -95,7 +95,7 @@ bool JsCodeMarker::recognizeLanguage(const QString &language)
/*!
Returns the type of atom used to represent JavaScript code in the documentation.
*/
Atom::Type JsCodeMarker::atomType() const
Atom::AtomType JsCodeMarker::atomType() const
{
return Atom::JavaScript;
}

View File

@ -53,7 +53,7 @@ public:
virtual bool recognizeCode(const QString &code) Q_DECL_OVERRIDE;
virtual bool recognizeExtension(const QString &ext) Q_DECL_OVERRIDE;
virtual bool recognizeLanguage(const QString &language) Q_DECL_OVERRIDE;
virtual Atom::Type atomType() const Q_DECL_OVERRIDE;
virtual Atom::AtomType atomType() const Q_DECL_OVERRIDE;
virtual QString markedUpCode(const QString &code,
const Node *relative,

View File

@ -44,16 +44,16 @@ QT_BEGIN_NAMESPACE
int Node::propertyGroupCount_ = 0;
QStringMap Node::operators_;
QMap<QString,Node::Type> Node::goals_;
QMap<QString,Node::NodeType> Node::goals_;
/*!
Initialize the map of search goals. This is called once
by QDocDatabase::initializeDB(). The map key is a string
representing a value in the enum Node::Type. The map value
representing a value in the enum Node::NodeType. The map value
is the enum value.
There should be an entry in the map for each value in the
Type enum.
NodeType enum.
*/
void Node::initialize()
{
@ -160,8 +160,8 @@ QString Node::fullName(const Node* relative) const
match is found, return false.
\a types is a list of type/subtype pairs, where the first
value in the pair is a Node::Type, and the second value is
a Node::SubType. The second value is used in the match if
value in the pair is a Node::NodeType, and the second value is
a Node::DocSubtype. The second value is used in the match if
this node's type is Node::Document.
*/
bool Node::match(const NodeTypeList& types) const
@ -169,7 +169,7 @@ bool Node::match(const NodeTypeList& types) const
for (int i=0; i<types.size(); ++i) {
if (type() == types.at(i).first) {
if (type() == Node::Document) {
if (subType() == types.at(i).second)
if (docSubtype() == types.at(i).second)
return true;
}
else
@ -200,7 +200,7 @@ void Node::setDoc(const Doc& doc, bool replace)
given \a parent and \a name. The new node is added to the
parent's child list.
*/
Node::Node(Type type, InnerNode *parent, const QString& name)
Node::Node(NodeType type, InnerNode *parent, const QString& name)
: nodeType_((unsigned char) type),
access_((unsigned char) Public),
safeness_((unsigned char) UnspecifiedSafeness),
@ -320,7 +320,7 @@ QString Node::nodeTypeString() const
*/
QString Node::nodeTypeString(unsigned char t)
{
switch ((Type)t) {
switch ((NodeType)t) {
case Namespace:
return "namespace";
case Class:
@ -370,7 +370,7 @@ QString Node::nodeTypeString(unsigned char t)
*/
QString Node::nodeSubtypeString() const
{
return nodeSubtypeString(subType());
return nodeSubtypeString(docSubtype());
}
/*!
@ -380,7 +380,7 @@ QString Node::nodeSubtypeString() const
*/
QString Node::nodeSubtypeString(unsigned char t)
{
switch ((SubType)t) {
switch ((DocSubtype)t) {
case Example:
return "example";
case HeaderFile:
@ -395,7 +395,7 @@ QString Node::nodeSubtypeString(unsigned char t)
return "external page";
case DitaMap:
return "ditamap";
case NoSubType:
case NoSubtype:
default:
break;
}
@ -773,7 +773,7 @@ void InnerNode::findChildren(const QString& name, NodeList& nodes) const
with the specified \a name is found but it is not of the
specified \a type, 0 is returned.
*/
Node* InnerNode::findChildNode(const QString& name, Type type)
Node* InnerNode::findChildNode(const QString& name, NodeType type)
{
if (type == Function)
return primaryFunctionMap.value(name);
@ -1040,7 +1040,7 @@ NodeList InnerNode::overloads(const QString &funcName) const
Construct an inner node (i.e., not a leaf node) of the
given \a type and having the given \a parent and \a name.
*/
InnerNode::InnerNode(Type type, InnerNode *parent, const QString& name)
InnerNode::InnerNode(NodeType type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
{
switch (type) {
@ -1317,7 +1317,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) cons
Constructs a leaf node named \a name of the specified
\a type. The new leaf node becomes a child of \a parent.
*/
LeafNode::LeafNode(Type type, InnerNode *parent, const QString& name)
LeafNode::LeafNode(NodeType type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
{
switch (type) {
@ -1344,7 +1344,7 @@ LeafNode::LeafNode(Type type, InnerNode *parent, const QString& name)
documentation case where a \e{qmlproperty} command is used
to override the QML definition of a QML property.
*/
LeafNode::LeafNode(InnerNode* parent, Type type, const QString& name)
LeafNode::LeafNode(InnerNode* parent, NodeType type, const QString& name)
: Node(type, 0, name)
{
setParent(parent);
@ -1582,7 +1582,7 @@ QmlTypeNode* ClassNode::findQmlBaseNode()
which specifies the type of DocumentNode. The page type for
the page index is set here.
*/
DocumentNode::DocumentNode(InnerNode* parent, const QString& name, SubType subtype, Node::PageType ptype)
DocumentNode::DocumentNode(InnerNode* parent, const QString& name, DocSubtype subtype, Node::PageType ptype)
: InnerNode(Document, parent, name), nodeSubtype_(subtype)
{
setGenus(Node::DOC);
@ -1616,7 +1616,7 @@ void DocumentNode::setTitle(const QString &title)
/*!
Returns the document node's full title, which is usually
just title(), but for some SubType values is different
just title(), but for some DocSubtype values is different
from title()
*/
QString DocumentNode::fullTitle() const
@ -1813,7 +1813,7 @@ FunctionNode::FunctionNode(InnerNode *parent, const QString& name)
by \a type. It's parent is \a parent, and it's name is \a name.
If \a attached is true, it is an attached method or signal.
*/
FunctionNode::FunctionNode(Type type, InnerNode *parent, const QString& name, bool attached)
FunctionNode::FunctionNode(NodeType type, InnerNode *parent, const QString& name, bool attached)
: LeafNode(type, parent, name),
metaness_(Plain),
virtualness_(NonVirtual),
@ -2569,7 +2569,7 @@ QString Node::idForNode() const
str = "js-method-" + parent_->name().toLower() + "-" + func->name();
else if (parent_->type() == Document) {
qDebug() << "qdoc internal error: Node subtype not handled:"
<< parent_->subType() << func->name();
<< parent_->docSubtype() << func->name();
}
else
qDebug() << "qdoc internal error: Node type not handled:"
@ -2594,7 +2594,7 @@ QString Node::idForNode() const
break;
case Node::Document:
{
switch (subType()) {
switch (docSubtype()) {
case Node::Page:
case Node::HeaderFile:
str = title();
@ -2615,7 +2615,7 @@ QString Node::idForNode() const
break;
default:
qDebug() << "ERROR: A case was not handled in Node::idForNode():"
<< "subType():" << subType() << "type():" << type();
<< "docSubtype():" << docSubtype() << "type():" << type();
break;
}
}
@ -2685,12 +2685,12 @@ QString Node::idForNode() const
break;
default:
qDebug() << "ERROR: A case was not handled in Node::idForNode():"
<< "type():" << type() << "subType():" << subType();
<< "type():" << type() << "docSubtype():" << docSubtype();
break;
}
if (str.isEmpty()) {
qDebug() << "ERROR: A link text was empty in Node::idForNode():"
<< "type():" << type() << "subType():" << subType()
<< "type():" << type() << "docSubtype():" << docSubtype()
<< "name():" << name()
<< "title():" << title();
}

View File

@ -71,7 +71,7 @@ class Node
Q_DECLARE_TR_FUNCTIONS(QDoc::Node)
public:
enum Type {
enum NodeType {
NoType,
Namespace,
Class,
@ -94,8 +94,8 @@ public:
LastType
};
enum SubType {
NoSubType,
enum DocSubtype {
NoSubtype,
Example,
HeaderFile,
File,
@ -247,15 +247,15 @@ public:
virtual bool isInternal() const;
virtual void setDataType(const QString& ) { }
virtual void setReadOnly(bool ) { }
virtual Node* disambiguate(Type , SubType ) { return this; }
virtual Node* disambiguate(NodeType , DocSubtype ) { return this; }
virtual bool wasSeen() const { return false; }
virtual void appendGroupName(const QString& ) { }
virtual QString element() const { return QString(); }
virtual Tree* tree() const;
virtual void findChildren(const QString& , NodeList& nodes) const { nodes.clear(); }
bool isIndexNode() const { return indexNodeFlag_; }
Type type() const { return (Type) nodeType_; }
virtual SubType subType() const { return NoSubType; }
NodeType type() const { return (NodeType) nodeType_; }
virtual DocSubtype docSubtype() const { return NoSubtype; }
bool match(const NodeTypeList& types) const;
InnerNode* parent() const { return parent_; }
const Node* root() const;
@ -327,10 +327,10 @@ public:
static int incPropertyGroupCount();
static void clearPropertyGroupCount();
static void initialize();
static Type goal(const QString& t) { return goals_.value(t); }
static NodeType goal(const QString& t) { return goals_.value(t); }
protected:
Node(Type type, InnerNode* parent, const QString& name);
Node(NodeType type, InnerNode* parent, const QString& name);
private:
@ -358,7 +358,7 @@ private:
QString outSubDir_;
static QStringMap operators_;
static int propertyGroupCount_;
static QMap<QString,Node::Type> goals_;
static QMap<QString,Node::NodeType> goals_;
};
class InnerNode : public Node
@ -367,7 +367,7 @@ public:
virtual ~InnerNode();
Node* findChildNode(const QString& name, Node::Genus genus) const;
Node* findChildNode(const QString& name, Type type);
Node* findChildNode(const QString& name, NodeType type);
virtual void findChildren(const QString& name, NodeList& nodes) const Q_DECL_OVERRIDE;
FunctionNode* findFunctionNode(const QString& name) const;
FunctionNode* findFunctionNode(const FunctionNode* clone) const;
@ -407,7 +407,7 @@ public:
virtual void setOutputSubdirectory(const QString& t);
protected:
InnerNode(Type type, InnerNode* parent, const QString& name);
InnerNode(NodeType type, InnerNode* parent, const QString& name);
private:
friend class Node;
@ -437,8 +437,8 @@ public:
virtual bool isLeaf() const Q_DECL_OVERRIDE { return true; }
protected:
LeafNode(Type type, InnerNode* parent, const QString& name);
LeafNode(InnerNode* parent, Type type, const QString& name);
LeafNode(NodeType type, InnerNode* parent, const QString& name);
LeafNode(InnerNode* parent, NodeType type, const QString& name);
};
class NamespaceNode : public InnerNode
@ -544,7 +544,7 @@ public:
DocumentNode(InnerNode* parent,
const QString& name,
SubType subType,
DocSubtype docSubtype,
PageType ptype);
virtual ~DocumentNode() { }
@ -552,7 +552,7 @@ public:
virtual void setTitle(const QString &title) Q_DECL_OVERRIDE;
virtual void setSubTitle(const QString &subTitle) Q_DECL_OVERRIDE { subtitle_ = subTitle; }
SubType subType() const Q_DECL_OVERRIDE { return nodeSubtype_; }
DocSubtype docSubtype() const Q_DECL_OVERRIDE { return nodeSubtype_; }
virtual QString title() const Q_DECL_OVERRIDE { return title_; }
virtual QString fullTitle() const Q_DECL_OVERRIDE;
virtual QString subTitle() const Q_DECL_OVERRIDE;
@ -560,13 +560,13 @@ public:
virtual QString nameForLists() const Q_DECL_OVERRIDE { return title(); }
virtual void setImageFileName(const QString& ) { }
virtual bool isHeaderFile() const Q_DECL_OVERRIDE { return (subType() == Node::HeaderFile); }
virtual bool isExample() const Q_DECL_OVERRIDE { return (subType() == Node::Example); }
virtual bool isHeaderFile() const Q_DECL_OVERRIDE { return (docSubtype() == Node::HeaderFile); }
virtual bool isExample() const Q_DECL_OVERRIDE { return (docSubtype() == Node::Example); }
virtual bool isExampleFile() const Q_DECL_OVERRIDE { return (parent() && parent()->isExample()); }
virtual bool isExternalPage() const Q_DECL_OVERRIDE { return nodeSubtype_ == ExternalPage; }
protected:
SubType nodeSubtype_;
DocSubtype nodeSubtype_;
QString title_;
QString subtitle_;
};
@ -852,7 +852,7 @@ public:
enum Virtualness { NonVirtual, NormalVirtual, PureVirtual };
FunctionNode(InnerNode* parent, const QString &name);
FunctionNode(Type type, InnerNode* parent, const QString &name, bool attached);
FunctionNode(NodeType type, InnerNode* parent, const QString &name, bool attached);
virtual ~FunctionNode() { }
void setReturnType(const QString& t) { returnType_ = t; }
@ -1077,7 +1077,7 @@ public:
class CollectionNode : public InnerNode
{
public:
CollectionNode(Type type,
CollectionNode(NodeType type,
InnerNode* parent,
const QString& name,
Genus genus) : InnerNode(type, parent, name), seen_(false)

View File

@ -58,7 +58,7 @@ bool PlainCodeMarker::recognizeLanguage( const QString& /* lang */ )
return false;
}
Atom::Type PlainCodeMarker::atomType() const
Atom::AtomType PlainCodeMarker::atomType() const
{
return Atom::Code;
}

View File

@ -51,7 +51,7 @@ public:
bool recognizeCode( const QString& code ) Q_DECL_OVERRIDE;
bool recognizeExtension( const QString& ext ) Q_DECL_OVERRIDE;
bool recognizeLanguage( const QString& lang ) Q_DECL_OVERRIDE;
Atom::Type atomType() const Q_DECL_OVERRIDE;
Atom::AtomType atomType() const Q_DECL_OVERRIDE;
QString markedUpCode( const QString& code, const Node *relative, const Location &location ) Q_DECL_OVERRIDE;
QString markedUpSynopsis( const Node *node, const Node *relative,
SynopsisStyle style ) Q_DECL_OVERRIDE;

View File

@ -1515,7 +1515,7 @@ FunctionNode* QDocDatabase::findNodeInOpenNamespace(const QStringList& parentPat
This function only searches in the current primary tree.
*/
Node* QDocDatabase::findNodeInOpenNamespace(QStringList& path, Node::Type type)
Node* QDocDatabase::findNodeInOpenNamespace(QStringList& path, Node::NodeType type)
{
if (path.isEmpty())
return 0;
@ -1626,7 +1626,7 @@ const Node* QDocDatabase::findNodeForAtom(const Atom* a, const Node* relative, Q
Tree* domain = 0;
Node::Genus genus = Node::DontCare;
// Reserved for future use
//Node::Type goal = Node::NoType;
//Node::NodeType goal = Node::NoType;
if (atom->isLinkAtom()) {
domain = atom->domain();

View File

@ -103,7 +103,7 @@ class QDocForest
return 0;
}
Node* findNodeByNameAndType(const QStringList& path, Node::Type type) {
Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) {
foreach (Tree* t, searchOrder()) {
Node* n = t->findNodeByNameAndType(path, type);
if (n)
@ -297,7 +297,7 @@ class QDocDatabase
void insertTarget(const QString& name,
const QString& title,
TargetRec::Type type,
TargetRec::TargetType type,
Node* node,
int priority) {
primaryTree()->insertTarget(name, title, type, node, priority);
@ -310,7 +310,7 @@ class QDocDatabase
return primaryTree()->findFunctionNode(parentPath, clone);
}
FunctionNode* findNodeInOpenNamespace(const QStringList& parentPath, const FunctionNode* clone);
Node* findNodeInOpenNamespace(QStringList& path, Node::Type type);
Node* findNodeInOpenNamespace(QStringList& path, Node::NodeType type);
const Node* checkForCollision(const QString& name) {
return primaryTree()->checkForCollision(name);
}
@ -336,7 +336,7 @@ class QDocDatabase
const DocumentNode* findDocumentNodeByTitle(const QString& title) {
return forest_.findDocumentNodeByTitle(title);
}
Node* findNodeByNameAndType(const QStringList& path, Node::Type type) {
Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) {
return forest_.findNodeByNameAndType(path, type);
}

View File

@ -342,7 +342,7 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
else if ((element.nodeName() == "qmlmethod") ||
(element.nodeName() == "qmlsignal") ||
(element.nodeName() == "qmlsignalhandler")) {
Node::Type t = Node::QmlMethod;
Node::NodeType t = Node::QmlMethod;
if (element.nodeName() == "qmlsignal")
t = Node::QmlSignal;
else if (element.nodeName() == "qmlsignalhandler")
@ -354,7 +354,7 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
else if ((element.nodeName() == "jsmethod") ||
(element.nodeName() == "jssignal") ||
(element.nodeName() == "jssignalhandler")) {
Node::Type t = Node::QmlMethod;
Node::NodeType t = Node::QmlMethod;
if (element.nodeName() == "jssignal")
t = Node::QmlSignal;
else if (element.nodeName() == "jssignalhandler")
@ -405,7 +405,7 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
node = cn;
}
else if (element.nodeName() == "page") {
Node::SubType subtype;
Node::DocSubtype subtype;
Node::PageType ptype = Node::NoPageType;
QString attr = element.attribute("subtype");
if (attr == "example") {
@ -726,7 +726,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
/*
Don't include index nodes in a new index file. Or DITA map nodes.
*/
if (node->isIndexNode() || node->subType() == Node::DitaMap)
if (node->isIndexNode() || node->docSubtype() == Node::DitaMap)
return false;
QString nodeName;
@ -1019,7 +1019,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
*/
bool writeModuleName = false;
const DocumentNode* docNode = static_cast<const DocumentNode*>(node);
switch (docNode->subType()) {
switch (docNode->docSubtype()) {
case Node::Example:
writer.writeAttribute("subtype", "example");
writeModuleName = true;
@ -1316,7 +1316,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
bool external = false;
if (node->type() == Node::Document) {
const DocumentNode* docNode = static_cast<const DocumentNode*>(node);
if (docNode->subType() == Node::ExternalPage)
if (docNode->docSubtype() == Node::ExternalPage)
external = true;
}
foreach (const Atom* target, node->doc().targets()) {

View File

@ -96,7 +96,7 @@ bool QmlCodeMarker::recognizeLanguage(const QString &language)
/*!
Returns the type of atom used to represent QML code in the documentation.
*/
Atom::Type QmlCodeMarker::atomType() const
Atom::AtomType QmlCodeMarker::atomType() const
{
return Atom::Qml;
}

View File

@ -54,7 +54,7 @@ public:
virtual bool recognizeCode(const QString &code) Q_DECL_OVERRIDE;
virtual bool recognizeExtension(const QString &ext) Q_DECL_OVERRIDE;
virtual bool recognizeLanguage(const QString &language) Q_DECL_OVERRIDE;
virtual Atom::Type atomType() const Q_DECL_OVERRIDE;
virtual Atom::AtomType atomType() const Q_DECL_OVERRIDE;
virtual QString markedUpCode(const QString &code,
const Node *relative,
const Location &location) Q_DECL_OVERRIDE;

View File

@ -72,7 +72,7 @@ Text& Text::operator=(const Text& text)
return *this;
}
Text& Text::operator<<(Atom::Type atomType)
Text& Text::operator<<(Atom::AtomType atomType)
{
return operator<<(Atom(atomType));
}
@ -177,7 +177,7 @@ QString Text::toString() const
return str;
}
Text Text::subText(Atom::Type left, Atom::Type right, const Atom* from, bool inclusive) const
Text Text::subText(Atom::AtomType left, Atom::AtomType right, const Atom* from, bool inclusive) const
{
const Atom* begin = from ? from : firstAtom();
const Atom* end;

View File

@ -54,7 +54,7 @@ public:
Atom *firstAtom() { return first; }
Atom *lastAtom() { return last; }
Text& operator<<(Atom::Type atomType);
Text& operator<<(Atom::AtomType atomType);
Text& operator<<(const QString& string);
Text& operator<<(const Atom& atom);
Text& operator<<(const LinkAtom& atom);
@ -66,7 +66,7 @@ public:
QString toString() const;
const Atom *firstAtom() const { return first; }
const Atom *lastAtom() const { return last; }
Text subText(Atom::Type left, Atom::Type right, const Atom *from = 0, bool inclusive = false) const;
Text subText(Atom::AtomType left, Atom::AtomType right, const Atom *from = 0, bool inclusive = false) const;
void dump() const;
void clear();

View File

@ -301,8 +301,8 @@ static const NodeTypeList& relatesTypes()
{
if (t.isEmpty()) {
t.reserve(3);
t.append(NodeTypePair(Node::Class, Node::NoSubType));
t.append(NodeTypePair(Node::Namespace, Node::NoSubType));
t.append(NodeTypePair(Node::Class, Node::NoSubtype));
t.append(NodeTypePair(Node::Namespace, Node::NoSubtype));
t.append(NodeTypePair(Node::Document, Node::HeaderFile));
}
return t;
@ -586,7 +586,7 @@ NodeList Tree::allBaseClasses(const ClassNode* classNode) const
search at the tree root. \a subtype is not used unless
\a type is \c{Document}.
*/
Node* Tree::findNodeByNameAndType(const QStringList& path, Node::Type type) const
Node* Tree::findNodeByNameAndType(const QStringList& path, Node::NodeType type) const
{
return findNodeRecursive(path, 0, root(), type);
}
@ -610,7 +610,7 @@ Node* Tree::findNodeByNameAndType(const QStringList& path, Node::Type type) cons
Node* Tree::findNodeRecursive(const QStringList& path,
int pathIndex,
const Node* start,
Node::Type type) const
Node::NodeType type) const
{
if (!start || path.isEmpty())
return 0; // no place to start, or nothing to search for.
@ -979,7 +979,7 @@ QString Tree::getRef(const QString& target, const Node* node) const
*/
void Tree::insertTarget(const QString& name,
const QString& title,
TargetRec::Type type,
TargetRec::TargetType type,
Node* node,
int priority)
{
@ -1004,7 +1004,7 @@ void Tree::resolveTargets(InnerNode* root)
bool alreadyThere = false;
if (!nodes.empty()) {
for (int i=0; i< nodes.size(); ++i) {
if (nodes[i]->subType() == Node::ExternalPage) {
if (nodes[i]->docSubtype() == Node::ExternalPage) {
if (node->name() == nodes[i]->name()) {
alreadyThere = true;
break;
@ -1251,7 +1251,7 @@ CollectionNode* Tree::findCollection(const QString& name, Node::Genus genus)
CNMap::const_iterator i = m->find(name);
if (i != m->end())
return i.value();
Node::Type t = Node::NoType;
Node::NodeType t = Node::NoType;
switch (genus) {
case Node::DOC:
t = Node::Group;

View File

@ -49,11 +49,11 @@ class QDocDatabase;
struct TargetRec
{
public:
enum Type { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
enum TargetType { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
TargetRec(const QString& name,
const QString& title,
TargetRec::Type type,
TargetRec::TargetType type,
Node* node,
int priority)
: node_(node), ref_(name), title_(title), priority_(priority), type_(type) { }
@ -64,7 +64,7 @@ struct TargetRec
QString ref_;
QString title_;
int priority_;
Type type_;
TargetType type_;
};
struct TargetLoc
@ -107,7 +107,7 @@ class Tree
Node* findNodeRecursive(const QStringList& path,
int pathIndex,
const Node* start,
Node::Type type) const;
Node::NodeType type) const;
Node* findNodeRecursive(const QStringList& path,
int pathIndex,
Node* start,
@ -134,12 +134,12 @@ class Tree
QmlTypeNode* findQmlTypeNode(const QStringList& path);
Node* findNodeByNameAndType(const QStringList& path, Node::Type type) const;
Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) const;
InnerNode* findRelatesNode(const QStringList& path);
QString getRef(const QString& target, const Node* node) const;
void insertTarget(const QString& name,
const QString& title,
TargetRec::Type type,
TargetRec::TargetType type,
Node* node,
int priority);
void resolveTargets(InnerNode* root);