summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-01-23 12:40:41 +0100
committerMartin Smith <martin.smith@digia.com>2015-02-03 11:52:06 +0000
commit7708c4b85465c08e6ba45a6485288f9459db6bb3 (patch)
treec02d4aea70d2a3d42f4fa5665c0c4440caf0d42c /src/tools
parentc5db8fc74a9d437a4e7c0af077aed7c1f1bd4e26 (diff)
qdoc: Change uses of module and qmlModule
The uses of moduleName and qmlModuleName are changed to physicalModuleName and logicalModuleName respectively. A few other names are also changed in the same way. These changes are being done both to support documentation of javascript but also to emphasize that moduleName is really the name of the physical library module the entity is part of, and qmlModuleName is really the name of a collection of logical entities that is versionable and that may contain entities located in different physical modules. Change-Id: If49392aabf5950dc7b97c84f8134e9369e76dd1b Task-number: QTBUG-43715 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/codeparser.cpp4
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp14
-rw-r--r--src/tools/qdoc/cppcodeparser.h2
-rw-r--r--src/tools/qdoc/generator.cpp12
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp20
-rw-r--r--src/tools/qdoc/node.cpp58
-rw-r--r--src/tools/qdoc/node.h86
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp10
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp54
-rw-r--r--src/tools/qdoc/tree.cpp18
-rw-r--r--src/tools/qdoc/tree.h4
11 files changed, 152 insertions, 130 deletions
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp
index 5a1a6a528e..d0fcd86f7a 100644
--- a/src/tools/qdoc/codeparser.cpp
+++ b/src/tools/qdoc/codeparser.cpp
@@ -402,8 +402,8 @@ bool CodeParser::isParsingQdoc() const
*/
void CodeParser::checkModuleInclusion(Node* n)
{
- if (n->moduleName().isEmpty()) {
- n->setModuleName(Generator::defaultModuleName());
+ if (n->physicalModuleName().isEmpty()) {
+ n->setPhysicalModuleName(Generator::defaultModuleName());
switch (n->type()) {
case Node::Class:
if (n->access() != Node::Private && !n->doc().isEmpty()) {
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index f05615972c..1338417bab 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -1021,7 +1021,7 @@ void CppCodeParser::reset()
access = Node::Public;
metaness = FunctionNode::Plain;
lastPath_.clear();
- moduleName.clear();
+ physicalModuleName.clear();
}
/*!
@@ -1615,8 +1615,8 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent,
classe->setLocation(location());
if (compat)
classe->setStatus(Node::Compat);
- if (!moduleName.isEmpty())
- classe->setModuleName(moduleName);
+ if (!physicalModuleName.isEmpty())
+ classe->setPhysicalModuleName(physicalModuleName);
classe->setTemplateStuff(templateStuff);
if (match(Tok_Colon) && !matchBaseList(classe, isClass))
@@ -2035,9 +2035,9 @@ bool CppCodeParser::matchDeclList(InnerNode *parent)
case Tok_QT_MODULE:
readToken();
if (match(Tok_LeftParen) && match(Tok_Ident))
- moduleName = previousLexeme();
- if (!moduleName.startsWith("Qt"))
- moduleName.prepend("Qt");
+ physicalModuleName = previousLexeme();
+ if (!physicalModuleName.startsWith("Qt"))
+ physicalModuleName.prepend("Qt");
match(Tok_RightParen);
break;
default:
@@ -2174,7 +2174,7 @@ bool CppCodeParser::matchDocsAndStuff()
checkModuleInclusion(*n);
if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) {
InnerNode *m = static_cast<InnerNode *>(*n);
- while (m->parent() && m->moduleName().isEmpty()) {
+ while (m->parent() && m->physicalModuleName().isEmpty()) {
m = m->parent();
}
if (m == *n)
diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h
index f70f7937b8..f7a46b093a 100644
--- a/src/tools/qdoc/cppcodeparser.h
+++ b/src/tools/qdoc/cppcodeparser.h
@@ -156,7 +156,7 @@ protected:
int tok;
Node::Access access;
FunctionNode::Metaness metaness;
- QString moduleName;
+ QString physicalModuleName;
QStringList lastPath_;
QRegExp varComment;
QRegExp sep;
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 6c606e828a..5506188829 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -225,7 +225,7 @@ void Generator::appendSortedQmlNames(Text& text, const Node* base, const NodeLis
for (int i = 0; i < subs.size(); ++i) {
Text t;
if (!base->isQtQuickNode() || !subs[i]->isQtQuickNode() ||
- (base->qmlModuleName() == subs[i]->qmlModuleName())) {
+ (base->logicalModuleName() == subs[i]->logicalModuleName())) {
appendFullName(t, subs[i], base);
classMap[t.toString().toLower()] = t;
}
@@ -316,7 +316,7 @@ QString Generator::fileBase(const Node *node) const
base.truncate(base.length() - 5);
if (node->isExample() || node->isExampleFile()) {
- QString modPrefix(node->moduleName());
+ QString modPrefix(node->physicalModuleName());
if (modPrefix.isEmpty()) {
modPrefix = project_;
}
@@ -328,8 +328,8 @@ QString Generator::fileBase(const Node *node) const
}
else if (node->isQmlType() || node->isQmlBasicType()) {
base = node->name();
- if (!node->qmlModuleName().isEmpty()) {
- base.prepend(node->qmlModuleName() + QLatin1Char('-'));
+ if (!node->logicalModuleName().isEmpty()) {
+ base.prepend(node->logicalModuleName() + QLatin1Char('-'));
}
/*
To avoid file name conflicts in the html directory,
@@ -462,8 +462,8 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
return fb + QLatin1Char('.') + currentGenerator()->fileExtension();
else {
QString mq;
- if (!node->qmlModuleName().isEmpty()) {
- mq = node->qmlModuleName().replace(QChar('.'),QChar('-'));
+ if (!node->logicalModuleName().isEmpty()) {
+ mq = node->logicalModuleName().replace(QChar('.'),QChar('-'));
mq = mq.toLower() + QLatin1Char('-');
}
return fdl+ Generator::outputPrefix(QLatin1String("QML")) + mq +
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 7cf6c3b609..3a67ba3626 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -683,9 +683,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
generateCompactList(Generic, relative, qdb_->getQmlTypes(), true, QStringLiteral(""));
}
else if (atom->string().contains("classesbymodule")) {
- QString moduleName = atom->string().mid(atom->string().indexOf("classesbymodule") + 15).trimmed();
+ QString physicalModuleName = atom->string().mid(atom->string().indexOf("classesbymodule") + 15).trimmed();
QDocDatabase* qdb = QDocDatabase::qdocDB();
- ModuleNode* mn = qdb->findModule(moduleName);
+ ModuleNode* mn = qdb->findModule(physicalModuleName);
if (mn) {
NodeMap m;
mn->getMemberClasses(m);
@@ -1857,7 +1857,7 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
if (node->isClass()) {
const ClassNode *cn = static_cast<const ClassNode *>(node);
- QString name = node->moduleName();
+ QString name = node->physicalModuleName();
if (!cppclassespage.isEmpty())
navigationbar << Atom(Atom::ListItemLeft)
@@ -2132,8 +2132,8 @@ void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker)
if (inner->type() == Node::Class || inner->type() == Node::Namespace) {
//add the QT variable to the map
- if (!inner->moduleName().isEmpty()) {
- ModuleNode* moduleNode = qdb_->findModule(inner->moduleName());
+ if (!inner->physicalModuleName().isEmpty()) {
+ ModuleNode* moduleNode = qdb_->findModule(inner->physicalModuleName());
if (moduleNode && !moduleNode->qtVariable().isEmpty()) {
text.clear();
text << "QT += " + moduleNode->qtVariable();
@@ -2242,14 +2242,14 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
<< inheritedBytext;
//add the module name and version to the map
- QString qmlModuleVersion;
- QmlModuleNode* qmn = qdb_->findQmlModule(qcn->qmlModuleName());
+ QString logicalModuleVersion;
+ QmlModuleNode* qmn = qdb_->findQmlModule(qcn->logicalModuleName());
if (qmn)
- qmlModuleVersion = qmn->qmlModuleVersion();
+ logicalModuleVersion = qmn->logicalModuleVersion();
else
- qmlModuleVersion = qcn->qmlModuleVersion();
+ logicalModuleVersion = qcn->logicalModuleVersion();
text.clear();
- text << "import " + qcn->qmlModuleName() + " " + qmlModuleVersion;
+ text << "import " + qcn->logicalModuleName() + " " + logicalModuleVersion;
requisites.insert(importText, text);
//add the since and project into the map
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index 1bc1ebe92c..d9905baac3 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -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();
@@ -2146,7 +2146,7 @@ QmlTypeNode::QmlTypeNode(InnerNode *parent, const QString& name)
cnodeRequired_(false),
wrapper_(false),
cnode_(0),
- qmlModule_(0),
+ logicalModule_(0),
qmlBaseNode_(0)
{
int i = 0;
@@ -2209,14 +2209,14 @@ void QmlTypeNode::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";
}
}
@@ -2237,7 +2237,7 @@ 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 QmlTypeNode::qmlFullBaseName() const
module name from the QML module node. Otherwise, return the
empty string.
*/
-QString QmlTypeNode::qmlModuleName() const
+QString QmlTypeNode::logicalModuleName() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleName() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleName() : QString());
}
/*!
@@ -2257,9 +2257,9 @@ QString QmlTypeNode::qmlModuleName() const
module version from the QML module node. Otherwise, return
the empty string.
*/
-QString QmlTypeNode::qmlModuleVersion() const
+QString QmlTypeNode::logicalModuleVersion() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleVersion() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleVersion() : QString());
}
/*!
@@ -2267,9 +2267,9 @@ QString QmlTypeNode::qmlModuleVersion() const
module identifier from the QML module node. Otherwise, return
the empty string.
*/
-QString QmlTypeNode::qmlModuleIdentifier() const
+QString QmlTypeNode::logicalModuleIdentifier() const
{
- return (qmlModule_ ? qmlModule_->qmlModuleIdentifier() : QString());
+ return (logicalModule_ ? logicalModule_->logicalModuleIdentifier() : QString());
}
/*!
@@ -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;
@@ -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;
}
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index 6fd4cbf83c..a60d53b1e2 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -182,7 +182,7 @@ public:
void setThreadSafeness(ThreadSafeness safeness) { safeness_ = safeness; }
void setSince(const QString &since);
void setRelates(InnerNode* pseudoParent);
- void setModuleName(const QString &name) { moduleName_ = name; }
+ void setPhysicalModuleName(const QString &name) { physicalModuleName_ = name; }
void setUrl(const QString& url) { url_ = url; }
void setTemplateStuff(const QString &templateStuff) { templateStuff_ = templateStuff; }
void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; }
@@ -252,7 +252,7 @@ public:
const Node* root() const;
InnerNode* relates() const { return relatesTo_; }
const QString& name() const { return name_; }
- QString moduleName() const;
+ QString physicalModuleName() const;
QString url() const { return url_; }
virtual QString nameForLists() const { return name_; }
virtual QString outputFileName() const { return QString(); }
@@ -290,11 +290,11 @@ public:
QString extractClassName(const QString &string) const;
virtual QString qmlTypeName() const { return name_; }
virtual QString qmlFullBaseName() const { return QString(); }
- virtual QString qmlModuleName() const { return QString(); }
- virtual QString qmlModuleVersion() const { return QString(); }
- virtual QString qmlModuleIdentifier() const { return QString(); }
+ virtual QString logicalModuleName() const { return QString(); }
+ virtual QString logicalModuleVersion() const { return QString(); }
+ virtual QString logicalModuleIdentifier() const { return QString(); }
virtual void setQmlModuleInfo(const QString& ) { }
- virtual QmlModuleNode* qmlModule() const { return 0; }
+ virtual QmlModuleNode* logicalModule() const { return 0; }
virtual void setQmlModule(QmlModuleNode* ) { }
virtual ClassNode* classNode() { return 0; }
virtual void setClassNode(ClassNode* ) { }
@@ -338,7 +338,7 @@ private:
Doc doc_;
QMap<LinkType, QPair<QString, QString> > linkMap_;
QString fileNameBase_;
- QString moduleName_;
+ QString physicalModuleName_;
QString url_;
QString since_;
QString templateStuff_;
@@ -585,7 +585,9 @@ public:
virtual ~QmlTypeNode();
virtual bool isQmlNode() const Q_DECL_OVERRIDE { return true; }
virtual bool isQmlType() const Q_DECL_OVERRIDE { return true; }
- virtual bool isQtQuickNode() const Q_DECL_OVERRIDE { return (qmlModuleName() == QLatin1String("QtQuick")); }
+ virtual bool isQtQuickNode() const Q_DECL_OVERRIDE {
+ return (logicalModuleName() == QLatin1String("QtQuick"));
+ }
virtual ClassNode* classNode() Q_DECL_OVERRIDE { return cnode_; }
virtual void setClassNode(ClassNode* cn) Q_DECL_OVERRIDE { cnode_ = cn; }
virtual bool isAbstract() const Q_DECL_OVERRIDE { return abstract_; }
@@ -596,11 +598,11 @@ public:
virtual QString qmlFullBaseName() const Q_DECL_OVERRIDE;
virtual QString obsoleteLink() const Q_DECL_OVERRIDE { return obsoleteLink_; }
virtual void setObsoleteLink(const QString& t) Q_DECL_OVERRIDE { obsoleteLink_ = t; };
- virtual QString qmlModuleName() const Q_DECL_OVERRIDE;
- virtual QString qmlModuleVersion() const Q_DECL_OVERRIDE;
- virtual QString qmlModuleIdentifier() const Q_DECL_OVERRIDE;
- virtual QmlModuleNode* qmlModule() const Q_DECL_OVERRIDE { return qmlModule_; }
- virtual void setQmlModule(QmlModuleNode* t) Q_DECL_OVERRIDE { qmlModule_ = t; }
+ virtual QString logicalModuleName() const Q_DECL_OVERRIDE;
+ virtual QString logicalModuleVersion() const Q_DECL_OVERRIDE;
+ virtual QString logicalModuleIdentifier() const Q_DECL_OVERRIDE;
+ virtual QmlModuleNode* logicalModule() const Q_DECL_OVERRIDE { return logicalModule_; }
+ virtual void setQmlModule(QmlModuleNode* t) Q_DECL_OVERRIDE { logicalModule_ = t; }
virtual Node::Genus genus() const Q_DECL_OVERRIDE { return Node::QML; }
const ImportList& importList() const { return importList_; }
void setImportList(const ImportList& il) { importList_ = il; }
@@ -626,7 +628,7 @@ private:
ClassNode* cnode_;
QString qmlBaseName_;
QString obsoleteLink_;
- QmlModuleNode* qmlModule_;
+ QmlModuleNode* logicalModule_;
QmlTypeNode* qmlBaseNode_;
ImportList importList_;
};
@@ -650,9 +652,15 @@ public:
virtual bool isQmlNode() const Q_DECL_OVERRIDE { return true; }
virtual bool isQtQuickNode() const Q_DECL_OVERRIDE { return parent()->isQtQuickNode(); }
virtual QString qmlTypeName() const Q_DECL_OVERRIDE { return parent()->qmlTypeName(); }
- virtual QString qmlModuleName() const Q_DECL_OVERRIDE { return parent()->qmlModuleName(); }
- virtual QString qmlModuleVersion() const Q_DECL_OVERRIDE { return parent()->qmlModuleVersion(); }
- virtual QString qmlModuleIdentifier() const Q_DECL_OVERRIDE { return parent()->qmlModuleIdentifier(); }
+ virtual QString logicalModuleName() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleName();
+ }
+ virtual QString logicalModuleVersion() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleVersion();
+ }
+ virtual QString logicalModuleIdentifier() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleIdentifier();
+ }
virtual QString idNumber() Q_DECL_OVERRIDE;
virtual bool isQmlPropertyGroup() const Q_DECL_OVERRIDE { return true; }
virtual Node::Genus genus() const Q_DECL_OVERRIDE { return Node::QML; }
@@ -694,9 +702,15 @@ public:
virtual bool isQmlNode() const Q_DECL_OVERRIDE { return true; }
virtual bool isQtQuickNode() const Q_DECL_OVERRIDE { return parent()->isQtQuickNode(); }
virtual QString qmlTypeName() const Q_DECL_OVERRIDE { return parent()->qmlTypeName(); }
- virtual QString qmlModuleName() const Q_DECL_OVERRIDE { return parent()->qmlModuleName(); }
- virtual QString qmlModuleVersion() const Q_DECL_OVERRIDE { return parent()->qmlModuleVersion(); }
- virtual QString qmlModuleIdentifier() const Q_DECL_OVERRIDE { return parent()->qmlModuleIdentifier(); }
+ virtual QString logicalModuleName() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleName();
+ }
+ virtual QString logicalModuleVersion() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleVersion();
+ }
+ virtual QString logicalModuleIdentifier() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleIdentifier();
+ }
virtual QString element() const Q_DECL_OVERRIDE;
private:
@@ -865,12 +879,20 @@ public:
(type() == QmlSignalHandler));
}
virtual bool isCppNode() const Q_DECL_OVERRIDE { return !isQmlNode(); }
- virtual Node::Genus genus() const Q_DECL_OVERRIDE { return (isQmlNode() ? Node::QML : Node::CPP); }
+ virtual Node::Genus genus() const Q_DECL_OVERRIDE {
+ return (isQmlNode() ? Node::QML : Node::CPP);
+ }
virtual bool isQtQuickNode() const Q_DECL_OVERRIDE { return parent()->isQtQuickNode(); }
virtual QString qmlTypeName() const Q_DECL_OVERRIDE { return parent()->qmlTypeName(); }
- virtual QString qmlModuleName() const Q_DECL_OVERRIDE { return parent()->qmlModuleName(); }
- virtual QString qmlModuleVersion() const Q_DECL_OVERRIDE { return parent()->qmlModuleVersion(); }
- virtual QString qmlModuleIdentifier() const Q_DECL_OVERRIDE { return parent()->qmlModuleIdentifier(); }
+ virtual QString logicalModuleName() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleName();
+ }
+ virtual QString logicalModuleVersion() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleVersion();
+ }
+ virtual QString logicalModuleIdentifier() const Q_DECL_OVERRIDE {
+ return parent()->logicalModuleIdentifier();
+ }
void debug() const;
@@ -1098,21 +1120,21 @@ class QmlModuleNode : public CollectionNode
virtual bool isQmlNode() const Q_DECL_OVERRIDE { return true; }
virtual bool isQmlModule() const Q_DECL_OVERRIDE { return true; }
- virtual QString qmlModuleName() const Q_DECL_OVERRIDE { return qmlModuleName_; }
- virtual QString qmlModuleVersion() const Q_DECL_OVERRIDE {
- return qmlModuleVersionMajor_ + "." + qmlModuleVersionMinor_;
+ virtual QString logicalModuleName() const Q_DECL_OVERRIDE { return logicalModuleName_; }
+ virtual QString logicalModuleVersion() const Q_DECL_OVERRIDE {
+ return logicalModuleVersionMajor_ + "." + logicalModuleVersionMinor_;
}
- virtual QString qmlModuleIdentifier() const Q_DECL_OVERRIDE {
- return qmlModuleName_ + qmlModuleVersionMajor_;
+ virtual QString logicalModuleIdentifier() const Q_DECL_OVERRIDE {
+ return logicalModuleName_ + logicalModuleVersionMajor_;
}
virtual void setQmlModuleInfo(const QString& ) Q_DECL_OVERRIDE;
virtual void setQtVariable(const QString& v) Q_DECL_OVERRIDE { qtVariable_ = v; }
virtual QString qtVariable() const Q_DECL_OVERRIDE { return qtVariable_; }
private:
- QString qmlModuleName_;
- QString qmlModuleVersionMajor_;
- QString qmlModuleVersionMinor_;
+ QString logicalModuleName_;
+ QString logicalModuleVersionMajor_;
+ QString logicalModuleVersionMinor_;
QString qtVariable_;
};
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index bf9baf2282..30dee21afd 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -160,7 +160,7 @@ void QDocForest::setSearchOrder(QStringList& t)
moduleNames_.clear();
/* The primary tree is always first in the search order. */
- QString primaryName = primaryTree()->moduleName();
+ QString primaryName = primaryTree()->physicalModuleName();
searchOrder_.append(primaryTree_);
moduleNames_.append(primaryName);
forest_.remove(primaryName);
@@ -359,7 +359,7 @@ void QDocForest::printLinkCounts(const QString& project)
QMultiMap<int, QString> m;
foreach (Tree* t, searchOrder()) {
if (t->linkCount() < 0)
- m.insert(t->linkCount(), t->moduleName());
+ m.insert(t->linkCount(), t->physicalModuleName());
}
QString depends = "depends +=";
QString module = project.toLower();
@@ -388,7 +388,7 @@ QString QDocForest::getLinkCounts(QStringList& strings, QVector<int>& counts)
QMultiMap<int, QString> m;
foreach (Tree* t, searchOrder()) {
if (t->linkCount() < 0)
- m.insert(t->linkCount(), t->moduleName());
+ m.insert(t->linkCount(), t->physicalModuleName());
}
QString depends = "depends +=";
QString module = Generator::defaultModuleName().toLower();
@@ -1124,7 +1124,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node)
else if ((*c)->isQmlType()) {
if (name.startsWith(QLatin1String("QML:")))
name = name.mid(4);
- name = (*c)->qmlModuleName() + "::" + name;
+ name = (*c)->logicalModuleName() + "::" + name;
obsoleteQmlTypes_.insert(name,*c);
}
}
@@ -1642,7 +1642,7 @@ const Node* QDocDatabase::findNodeForAtom(const Atom* a, const Node* relative, Q
target = targetPath.at(0);
targetPath.removeFirst();
}
- if (relative && relative->tree()->moduleName() != domain->moduleName())
+ if (relative && relative->tree()->physicalModuleName() != domain->physicalModuleName())
relative = 0;
node = domain->findNodeForTarget(nodePath, target, relative, flags, genus, ref);
return node;
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index 01a3efcaca..103148d175 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -210,9 +210,9 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
else if (element.nodeName() == "qmlclass") {
QmlTypeNode* qcn = new QmlTypeNode(parent, name);
qcn->setTitle(element.attribute("title"));
- QString qmlModuleName = element.attribute("qml-module-name");
- if (!qmlModuleName.isEmpty())
- qdb_->addToQmlModule(qmlModuleName, qcn);
+ QString logicalModuleName = element.attribute("qml-module-name");
+ if (!logicalModuleName.isEmpty())
+ qdb_->addToQmlModule(logicalModuleName, qcn);
bool abstract = false;
if (element.attribute("abstract") == "true")
abstract = true;
@@ -524,9 +524,9 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
else
node->setStatus(Node::Commendable);
- QString moduleName = element.attribute("module");
- if (!moduleName.isEmpty())
- qdb_->addToModule(moduleName, node);
+ QString physicalModuleName = element.attribute("module");
+ if (!physicalModuleName.isEmpty())
+ qdb_->addToModule(physicalModuleName, node);
if (!href.isEmpty()) {
if (node->isExternalPage())
node->setUrl(href);
@@ -634,8 +634,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
return false;
QString nodeName;
- QString qmlModuleName;
- QString qmlModuleVersion;
+ QString logicalModuleName;
+ QString logicalModuleVersion;
QString qmlFullBaseName;
switch (node->type()) {
case Node::Namespace:
@@ -647,9 +647,9 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
case Node::QmlType:
{
nodeName = "qmlclass";
- QmlModuleNode* qmn = node->qmlModule();
+ QmlModuleNode* qmn = node->logicalModule();
if (qmn)
- qmlModuleName = qmn->qmlModuleName();
+ logicalModuleName = qmn->logicalModuleName();
qmlFullBaseName = node->qmlFullBaseName();
}
break;
@@ -789,13 +789,13 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("name", objName);
if (node->isQmlModule()) {
- qmlModuleName = node->qmlModuleName();
- qmlModuleVersion = node->qmlModuleVersion();
+ logicalModuleName = node->logicalModuleName();
+ logicalModuleVersion = node->logicalModuleVersion();
}
- if (!qmlModuleName.isEmpty()) {
- writer.writeAttribute("qml-module-name", qmlModuleName);
+ if (!logicalModuleName.isEmpty()) {
+ writer.writeAttribute("qml-module-name", logicalModuleName);
if (node->isQmlModule())
- writer.writeAttribute("qml-module-version", qmlModuleVersion);
+ writer.writeAttribute("qml-module-version", logicalModuleVersion);
if (!qmlFullBaseName.isEmpty())
writer.writeAttribute("qml-base-type", qmlFullBaseName);
}
@@ -860,8 +860,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
}
if (!baseStrings.isEmpty())
writer.writeAttribute("bases", QStringList(baseStrings.toList()).join(","));
- if (!node->moduleName().isEmpty())
- writer.writeAttribute("module", node->moduleName());
+ if (!node->physicalModuleName().isEmpty())
+ writer.writeAttribute("module", node->physicalModuleName());
if (!classNode->groupNames().isEmpty())
writer.writeAttribute("groups", classNode->groupNames().join(","));
if (!brief.isEmpty())
@@ -871,8 +871,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
case Node::Namespace:
{
const NamespaceNode* namespaceNode = static_cast<const NamespaceNode*>(node);
- if (!namespaceNode->moduleName().isEmpty())
- writer.writeAttribute("module", namespaceNode->moduleName());
+ if (!namespaceNode->physicalModuleName().isEmpty())
+ writer.writeAttribute("module", namespaceNode->physicalModuleName());
if (!namespaceNode->groupNames().isEmpty())
writer.writeAttribute("groups", namespaceNode->groupNames().join(","));
if (!brief.isEmpty())
@@ -924,8 +924,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("title", docNode->title());
writer.writeAttribute("fulltitle", docNode->fullTitle());
writer.writeAttribute("subtitle", docNode->subTitle());
- if (!node->moduleName().isEmpty() && writeModuleName) {
- writer.writeAttribute("module", node->moduleName());
+ if (!node->physicalModuleName().isEmpty() && writeModuleName) {
+ writer.writeAttribute("module", node->physicalModuleName());
}
if (!docNode->groupNames().isEmpty())
writer.writeAttribute("groups", docNode->groupNames().join(","));
@@ -940,8 +940,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("title", gn->title());
if (!gn->subTitle().isEmpty())
writer.writeAttribute("subtitle", gn->subTitle());
- if (!gn->moduleName().isEmpty())
- writer.writeAttribute("module", gn->moduleName());
+ if (!gn->physicalModuleName().isEmpty())
+ writer.writeAttribute("module", gn->physicalModuleName());
if (!gn->groupNames().isEmpty())
writer.writeAttribute("groups", gn->groupNames().join(","));
/*
@@ -965,8 +965,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("title", mn->title());
if (!mn->subTitle().isEmpty())
writer.writeAttribute("subtitle", mn->subTitle());
- if (!mn->moduleName().isEmpty())
- writer.writeAttribute("module", mn->moduleName());
+ if (!mn->physicalModuleName().isEmpty())
+ writer.writeAttribute("module", mn->physicalModuleName());
if (!mn->groupNames().isEmpty())
writer.writeAttribute("groups", mn->groupNames().join(","));
/*
@@ -990,8 +990,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
writer.writeAttribute("title", qmn->title());
if (!qmn->subTitle().isEmpty())
writer.writeAttribute("subtitle", qmn->subTitle());
- if (!qmn->moduleName().isEmpty())
- writer.writeAttribute("module", qmn->moduleName());
+ if (!qmn->physicalModuleName().isEmpty())
+ writer.writeAttribute("module", qmn->physicalModuleName());
if (!qmn->groupNames().isEmpty())
writer.writeAttribute("groups", qmn->groupNames().join(","));
/*
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index 5c7a2143e9..d25e1bc345 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -65,16 +65,16 @@ QT_BEGIN_NAMESPACE
qdoc database that is constructing the tree. This might not
be necessary, and it might be removed later.
*/
-Tree::Tree(const QString& module, QDocDatabase* qdb)
+Tree::Tree(const QString& physicalModuleName, QDocDatabase* qdb)
: treeHasBeenAnalyzed_(false),
docsHaveBeenGenerated_(false),
linkCount_(0),
- module_(module),
+ physicalModuleName_(physicalModuleName),
qdb_(qdb),
root_(0, QString()),
targetListMap_(0)
{
- root_.setModuleName(module_);
+ root_.setPhysicalModuleName(physicalModuleName_);
root_.setTree(this);
if (Generator::writeQaPages()) {
targetListMap_ = new TargetListMap;
@@ -1348,7 +1348,7 @@ ModuleNode* Tree::addToModule(const QString& name, Node* node)
{
ModuleNode* mn = findModule(name);
mn->addMember(node);
- node->setModuleName(name);
+ node->setPhysicalModuleName(name);
return mn;
}
@@ -1431,23 +1431,23 @@ QString Tree::getNewLinkTarget(const Node* locNode,
QString& text,
bool broken)
{
- QString moduleName;
+ QString physicalModuleName;
if (t && !broken) {
Tree* tree = t->tree();
if (tree != this)
tree->incrementLinkCount();
- moduleName = tree->moduleName();
+ physicalModuleName = tree->physicalModuleName();
}
else
- moduleName = "broken";
+ physicalModuleName = "broken";
incrementLinkCount();
QString target = QString("qa-target-%1").arg(-(linkCount()));
TargetLoc* tloc = new TargetLoc(locNode, target, fileName, text, broken);
TargetList* tList = 0;
- TargetListMap::iterator i = targetListMap_->find(moduleName);
+ TargetListMap::iterator i = targetListMap_->find(physicalModuleName);
if (i == targetListMap_->end()) {
tList = new TargetList;
- i = targetListMap_->insert(moduleName, tList);
+ i = targetListMap_->insert(physicalModuleName, tList);
}
else
tList = i.value();
diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h
index 677e473bd9..e14931639d 100644
--- a/src/tools/qdoc/tree.h
+++ b/src/tools/qdoc/tree.h
@@ -216,7 +216,7 @@ class Tree
QStringList getTargetListKeys() { return targetListMap_->keys(); }
public:
- const QString& moduleName() const { return module_; }
+ const QString& physicalModuleName() const { return physicalModuleName_; }
const QString& indexFileName() const { return indexFileName_; }
long incrementLinkCount() { return --linkCount_; }
void clearLinkCount() { linkCount_ = 0; }
@@ -226,7 +226,7 @@ private:
bool treeHasBeenAnalyzed_;
bool docsHaveBeenGenerated_;
long linkCount_;
- QString module_;
+ QString physicalModuleName_;
QString indexFileName_;
QDocDatabase* qdb_;
NamespaceNode root_;