summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/node.cpp')
-rw-r--r--src/tools/qdoc/node.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index ce655efef60..d5282af34b6 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -218,7 +218,7 @@ Node::Node(Type type, InnerNode *parent, const QString& name)
{
if (parent_)
parent_->addChild(this);
- outSubDir_ = CodeParser::currentOutputSubdirectory();
+ outSubDir_ = Generator::outputSubdir();
if (operators_.isEmpty()) {
operators_.insert("++","inc");
operators_.insert("--","dec");
@@ -628,14 +628,14 @@ QString Node::guid() const
If it is a child of a QML class node, return a pointer to
the QML class node. Otherwise, return 0;
*/
-QmlClassNode* Node::qmlClassNode()
+QmlTypeNode* Node::qmlTypeNode()
{
if (isQmlNode()) {
Node* n = this;
while (n && !n->isQmlType())
n = n->parent();
if (n && n->isQmlType())
- return static_cast<QmlClassNode*>(n);
+ return static_cast<QmlTypeNode*>(n);
}
return 0;
}
@@ -649,7 +649,7 @@ QmlClassNode* Node::qmlClassNode()
*/
ClassNode* Node::declarativeCppNode()
{
- QmlClassNode* qcn = qmlClassNode();
+ QmlTypeNode* qcn = qmlTypeNode();
if (qcn)
return qcn->classNode();
return 0;
@@ -732,7 +732,7 @@ Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const
if (!nodes.isEmpty()) {
for (int i=0; i<nodes.size(); ++i) {
Node* node = nodes.at(i);
- if (genus == node->genus() || genus == Node::DontCare)
+ if (genus == node->genus())
return node;
}
}
@@ -1292,10 +1292,10 @@ void InnerNode::removeChild(Node *child)
been defined in the header file with a QT_MODULE macro or with an
\inmodule command in the documentation.
*/
-QString Node::moduleName() const
+QString Node::physicalModuleName() const
{
- if (!moduleName_.isEmpty())
- return moduleName_;
+ if (!physicalModuleName_.isEmpty())
+ return physicalModuleName_;
QString path = location().filePath();
QString pattern = QString("src") + QDir::separator();
@@ -1310,27 +1310,27 @@ QString Node::moduleName() const
if (finish == -1)
return QString();
- QString moduleName = moduleDir.left(finish);
+ QString physicalModuleName = moduleDir.left(finish);
- if (moduleName == "corelib")
+ if (physicalModuleName == "corelib")
return "QtCore";
- else if (moduleName == "uitools")
+ else if (physicalModuleName == "uitools")
return "QtUiTools";
- else if (moduleName == "gui")
+ else if (physicalModuleName == "gui")
return "QtGui";
- else if (moduleName == "network")
+ else if (physicalModuleName == "network")
return "QtNetwork";
- else if (moduleName == "opengl")
+ else if (physicalModuleName == "opengl")
return "QtOpenGL";
- else if (moduleName == "svg")
+ else if (physicalModuleName == "svg")
return "QtSvg";
- else if (moduleName == "sql")
+ else if (physicalModuleName == "sql")
return "QtSql";
- else if (moduleName == "qtestlib")
+ else if (physicalModuleName == "qtestlib")
return "QtTest";
else if (moduleDir.contains("webkit"))
return "QtWebKit";
- else if (moduleName == "xml")
+ else if (physicalModuleName == "xml")
return "QtXml";
else
return QString();
@@ -1614,9 +1614,9 @@ PropertyNode* ClassNode::findPropertyNode(const QString& name)
finds one, it returns the pointer to that QML element. If
it doesn't find one, it returns null.
*/
-QmlClassNode* ClassNode::findQmlBaseNode()
+QmlTypeNode* ClassNode::findQmlBaseNode()
{
- QmlClassNode* result = 0;
+ QmlTypeNode* result = 0;
const QList<RelatedClass>& bases = baseClasses();
if (!bases.isEmpty()) {
@@ -2133,20 +2133,20 @@ QString PropertyNode::qualifiedDataType() const
}
}
-bool QmlClassNode::qmlOnly = false;
-QMultiMap<QString,Node*> QmlClassNode::inheritedBy;
+bool QmlTypeNode::qmlOnly = false;
+QMultiMap<QString,Node*> QmlTypeNode::inheritedBy;
/*!
Constructs a Qml class node. The new node has the given
\a parent and \a name.
*/
-QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name)
+QmlTypeNode::QmlTypeNode(InnerNode *parent, const QString& name)
: InnerNode(QmlType, parent, name),
abstract_(false),
cnodeRequired_(false),
wrapper_(false),
cnode_(0),
- qmlModule_(0),
+ logicalModule_(0),
qmlBaseNode_(0)
{
int i = 0;
@@ -2161,7 +2161,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name)
/*!
Needed for printing a debug messages.
*/
-QmlClassNode::~QmlClassNode()
+QmlTypeNode::~QmlTypeNode()
{
// nothing.
}
@@ -2170,7 +2170,7 @@ QmlClassNode::~QmlClassNode()
Clear the static maps so that subsequent runs don't try to use
contents from a previous run.
*/
-void QmlClassNode::terminate()
+void QmlTypeNode::terminate()
{
inheritedBy.clear();
}
@@ -2179,7 +2179,7 @@ void QmlClassNode::terminate()
Record the fact that QML class \a base is inherited by
QML class \a sub.
*/
-void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
+void QmlTypeNode::addInheritedBy(const QString& base, Node* sub)
{
if (inheritedBy.constFind(base,sub) == inheritedBy.constEnd()) {
inheritedBy.insert(base,sub);
@@ -2189,7 +2189,7 @@ void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
/*!
Loads the list \a subs with the nodes of all the subclasses of \a base.
*/
-void QmlClassNode::subclasses(const QString& base, NodeList& subs)
+void QmlTypeNode::subclasses(const QString& base, NodeList& subs)
{
subs.clear();
if (inheritedBy.count(base) > 0) {
@@ -2209,18 +2209,18 @@ void QmlClassNode::subclasses(const QString& base, NodeList& subs)
void QmlModuleNode::setQmlModuleInfo(const QString& arg)
{
QStringList blankSplit = arg.split(QLatin1Char(' '));
- qmlModuleName_ = blankSplit[0];
+ logicalModuleName_ = blankSplit[0];
if (blankSplit.size() > 1) {
QStringList dotSplit = blankSplit[1].split(QLatin1Char('.'));
- qmlModuleVersionMajor_ = dotSplit[0];
+ logicalModuleVersionMajor_ = dotSplit[0];
if (dotSplit.size() > 1)
- qmlModuleVersionMinor_ = dotSplit[1];
+ logicalModuleVersionMinor_ = dotSplit[1];
else
- qmlModuleVersionMinor_ = "0";
+ logicalModuleVersionMinor_ = "0";
}
}
-QmlClassNode* QmlClassNode::qmlBaseNode()
+QmlTypeNode* QmlTypeNode::qmlBaseNode()
{
if (!qmlBaseNode_ && !qmlBaseName_.isEmpty()) {
qmlBaseNode_ = QDocDatabase::qdocDB()->findQmlType(qmlBaseName_);
@@ -2233,11 +2233,11 @@ QmlClassNode* QmlClassNode::qmlBaseNode()
return the fully qualified name of that QML
type, i.e. <QML-module-name>::<QML-type-name>.
*/
-QString QmlClassNode::qmlFullBaseName() const
+QString QmlTypeNode::qmlFullBaseName() const
{
QString result;
if (qmlBaseNode_) {
- result = qmlBaseNode_->qmlModuleName() + "::" + qmlBaseNode_->name();
+ result = qmlBaseNode_->logicalModuleName() + "::" + qmlBaseNode_->name();
}
return result;
}
@@ -2247,9 +2247,9 @@ QString QmlClassNode::qmlFullBaseName() const
module name from the QML module node. Otherwise, return the
empty string.
*/
-QString QmlClassNode::qmlModuleName() const
+QString QmlTypeNode::logicalModuleName() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleName() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleName() : QString());
}
/*!
@@ -2257,9 +2257,9 @@ QString QmlClassNode::qmlModuleName() const
module version from the QML module node. Otherwise, return
the empty string.
*/
-QString QmlClassNode::qmlModuleVersion() const
+QString QmlTypeNode::logicalModuleVersion() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleVersion() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleVersion() : QString());
}
/*!
@@ -2267,9 +2267,9 @@ QString QmlClassNode::qmlModuleVersion() const
module identifier from the QML module node. Otherwise, return
the empty string.
*/
-QString QmlClassNode::qmlModuleIdentifier() const
+QString QmlTypeNode::logicalModuleIdentifier() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleIdentifier() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleIdentifier() : QString());
}
/*!
@@ -2285,9 +2285,9 @@ QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent,
/*!
Constructor for the Qml property group node. \a parent is
- always a QmlClassNode.
+ always a QmlTypeNode.
*/
-QmlPropertyGroupNode::QmlPropertyGroupNode(QmlClassNode* parent, const QString& name)
+QmlPropertyGroupNode::QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name)
: InnerNode(QmlPropertyGroup, parent, name)
{
idNumber_ = -1;
@@ -2347,7 +2347,7 @@ bool QmlPropertyNode::isWritable()
if (readOnly_ != FlagValueDefault)
return !fromFlagValue(readOnly_, false);
- QmlClassNode* qcn = qmlClassNode();
+ QmlTypeNode* qcn = qmlTypeNode();
if (qcn) {
if (qcn->cppClassRequired()) {
if (qcn->classNode()) {
@@ -2358,13 +2358,13 @@ bool QmlPropertyNode::isWritable()
location().warning(tr("No Q_PROPERTY for QML property %1::%2::%3 "
"in C++ class documented as QML type: "
"(property not found in the C++ class or its base classes)")
- .arg(qmlModuleName()).arg(qmlTypeName()).arg(name()));
+ .arg(logicalModuleName()).arg(qmlTypeName()).arg(name()));
}
else
location().warning(tr("No Q_PROPERTY for QML property %1::%2::%3 "
"in C++ class documented as QML type: "
"(C++ class not specified or not found).")
- .arg(qmlModuleName()).arg(qmlTypeName()).arg(name()));
+ .arg(logicalModuleName()).arg(qmlTypeName()).arg(name()));
}
}
return true;
@@ -2381,7 +2381,7 @@ PropertyNode* QmlPropertyNode::findCorrespondingCppProperty()
while (n && !n->isQmlType())
n = n->parent();
if (n) {
- QmlClassNode* qcn = static_cast<QmlClassNode*>(n);
+ QmlTypeNode* qcn = static_cast<QmlTypeNode*>(n);
ClassNode* cn = qcn->classNode();
if (cn) {
/*
@@ -2443,8 +2443,8 @@ QString Node::fullDocumentName() const
if (!n->name().isEmpty() && !n->isQmlPropertyGroup())
pieces.insert(0, n->name());
- if (n->isQmlType() && !n->qmlModuleName().isEmpty()) {
- pieces.insert(0, n->qmlModuleName());
+ if (n->isQmlType() && !n->logicalModuleName().isEmpty()) {
+ pieces.insert(0, n->logicalModuleName());
break;
}