qdoc: Duplicate QML types in the "All QML Types" list are distinguished
We have two State types in the All QML Types list. One is in QtQuick and the other is in QtQml, but they are both just listed as "State" with no way to tell which is which. Now they look like this: State: QtQml State: QtQuick Change-Id: I48bb3deda10a61f565d1aed1910360fea4fb7891 Task-number: QTBUG-45141 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
parent
040e201ba2
commit
1341161998
@ -705,11 +705,6 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
|
|||||||
else if (atom->string() == "classhierarchy") {
|
else if (atom->string() == "classhierarchy") {
|
||||||
generateClassHierarchy(relative, qdb_->getCppClasses());
|
generateClassHierarchy(relative, qdb_->getCppClasses());
|
||||||
}
|
}
|
||||||
else if (atom->string() == "compatclasses") {
|
|
||||||
// "compatclasses" is no longer used. Delete this at some point.
|
|
||||||
// mws 03/10/2013
|
|
||||||
generateCompactList(Generic, relative, qdb_->getCompatibilityClasses(), false, QStringLiteral("Q"));
|
|
||||||
}
|
|
||||||
else if (atom->string() == "obsoleteclasses") {
|
else if (atom->string() == "obsoleteclasses") {
|
||||||
generateCompactList(Generic, relative, qdb_->getObsoleteClasses(), false, QStringLiteral("Q"));
|
generateCompactList(Generic, relative, qdb_->getObsoleteClasses(), false, QStringLiteral("Q"));
|
||||||
}
|
}
|
||||||
@ -728,16 +723,6 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
|
|||||||
else if (atom->string() == "legalese") {
|
else if (atom->string() == "legalese") {
|
||||||
generateLegaleseList(relative, marker);
|
generateLegaleseList(relative, marker);
|
||||||
}
|
}
|
||||||
else if (atom->string() == "mainclasses") {
|
|
||||||
// "mainclasses" is no longer used. Delete this at some point.
|
|
||||||
// mws 03/10/2013
|
|
||||||
generateCompactList(Generic, relative, qdb_->getMainClasses(), true, QStringLiteral("Q"));
|
|
||||||
}
|
|
||||||
else if (atom->string() == "services") {
|
|
||||||
// "services" is no longer used. Delete this at some point.
|
|
||||||
// mws 03/10/2013
|
|
||||||
generateCompactList(Generic, relative, qdb_->getServiceClasses(), false, QStringLiteral("Q"));
|
|
||||||
}
|
|
||||||
else if (atom->string() == "overviews") {
|
else if (atom->string() == "overviews") {
|
||||||
generateList(relative, marker, "overviews");
|
generateList(relative, marker, "overviews");
|
||||||
}
|
}
|
||||||
@ -1772,23 +1757,23 @@ void HtmlGenerator::generateCollectionNode(CollectionNode* cn, CodeMarker* marke
|
|||||||
generateStatus(cn, marker);
|
generateStatus(cn, marker);
|
||||||
generateSince(cn, marker);
|
generateSince(cn, marker);
|
||||||
|
|
||||||
NodeMap nm;
|
NodeMultiMap nmm;
|
||||||
cn->getMemberNamespaces(nm);
|
cn->getMemberNamespaces(nmm);
|
||||||
if (!nm.isEmpty()) {
|
if (!nmm.isEmpty()) {
|
||||||
ref = registerRef("namespaces");
|
ref = registerRef("namespaces");
|
||||||
out() << "<a name=\"" << ref << "\"></a>" << divNavTop << '\n';
|
out() << "<a name=\"" << ref << "\"></a>" << divNavTop << '\n';
|
||||||
out() << "<h2 id=\"" << ref << "\">Namespaces</h2>\n";
|
out() << "<h2 id=\"" << ref << "\">Namespaces</h2>\n";
|
||||||
generateAnnotatedList(cn, marker, nm);
|
generateAnnotatedList(cn, marker, nmm);
|
||||||
}
|
}
|
||||||
nm.clear();
|
nmm.clear();
|
||||||
cn->getMemberClasses(nm);
|
cn->getMemberClasses(nmm);
|
||||||
if (!nm.isEmpty()) {
|
if (!nmm.isEmpty()) {
|
||||||
ref = registerRef("classes");
|
ref = registerRef("classes");
|
||||||
out() << "<a name=\"" << ref << "\"></a>" << divNavTop << '\n';
|
out() << "<a name=\"" << ref << "\"></a>" << divNavTop << '\n';
|
||||||
out() << "<h2 id=\"" << ref << "\">Classes</h2>\n";
|
out() << "<h2 id=\"" << ref << "\">Classes</h2>\n";
|
||||||
generateAnnotatedList(cn, marker, nm);
|
generateAnnotatedList(cn, marker, nmm);
|
||||||
}
|
}
|
||||||
nm.clear();
|
nmm.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
sections = marker->sections(cn, CodeMarker::Summary, CodeMarker::Okay);
|
sections = marker->sections(cn, CodeMarker::Summary, CodeMarker::Okay);
|
||||||
@ -2837,11 +2822,11 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap& classM
|
|||||||
*/
|
*/
|
||||||
void HtmlGenerator::generateAnnotatedList(const Node* relative,
|
void HtmlGenerator::generateAnnotatedList(const Node* relative,
|
||||||
CodeMarker* marker,
|
CodeMarker* marker,
|
||||||
const NodeMap& nodeMap)
|
const NodeMultiMap& nmm)
|
||||||
{
|
{
|
||||||
if (nodeMap.isEmpty())
|
if (nmm.isEmpty())
|
||||||
return;
|
return;
|
||||||
generateAnnotatedList(relative, marker, nodeMap.values());
|
generateAnnotatedList(relative, marker, nmm.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -2850,19 +2835,19 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
|
|||||||
CodeMarker *marker,
|
CodeMarker *marker,
|
||||||
const NodeList& unsortedNodes)
|
const NodeList& unsortedNodes)
|
||||||
{
|
{
|
||||||
NodeMap nm;
|
NodeMultiMap nmm;
|
||||||
bool allInternal = true;
|
bool allInternal = true;
|
||||||
foreach (Node* node, unsortedNodes) {
|
foreach (Node* node, unsortedNodes) {
|
||||||
if (!node->isInternal() && !node->isObsolete()) {
|
if (!node->isInternal() && !node->isObsolete()) {
|
||||||
allInternal = false;
|
allInternal = false;
|
||||||
nm.insert(node->fullName(relative), node);
|
nmm.insert(node->fullName(relative), node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (allInternal)
|
if (allInternal)
|
||||||
return;
|
return;
|
||||||
out() << "<div class=\"table\"><table class=\"annotated\">\n";
|
out() << "<div class=\"table\"><table class=\"annotated\">\n";
|
||||||
int row = 0;
|
int row = 0;
|
||||||
NodeList nodes = nm.values();
|
NodeList nodes = nmm.values();
|
||||||
foreach (const Node* node, nodes) {
|
foreach (const Node* node, nodes) {
|
||||||
if (++row % 2 == 1)
|
if (++row % 2 == 1)
|
||||||
out() << "<tr class=\"odd topAlign\">";
|
out() << "<tr class=\"odd topAlign\">";
|
||||||
@ -2901,20 +2886,21 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
This function finds the common prefix of the names of all
|
This function finds the common prefix of the names of all
|
||||||
the classes in \a classMap and then generates a compact
|
the classes in the class map \a nmm and then generates a
|
||||||
list of the class names alphabetized on the part of the
|
compact list of the class names alphabetized on the part
|
||||||
name not including the common prefix. You can tell the
|
of the name not including the common prefix. You can tell
|
||||||
function to use \a comonPrefix as the common prefix, but
|
the function to use \a comonPrefix as the common prefix,
|
||||||
normally you let it figure it out itself by looking at
|
but normally you let it figure it out itself by looking at
|
||||||
the name of the first and last classes in \a classMap.
|
the name of the first and last classes in the class map
|
||||||
|
\a nmm.
|
||||||
*/
|
*/
|
||||||
void HtmlGenerator::generateCompactList(ListType listType,
|
void HtmlGenerator::generateCompactList(ListType listType,
|
||||||
const Node *relative,
|
const Node *relative,
|
||||||
const NodeMap &classMap,
|
const NodeMultiMap &nmm,
|
||||||
bool includeAlphabet,
|
bool includeAlphabet,
|
||||||
QString commonPrefix)
|
QString commonPrefix)
|
||||||
{
|
{
|
||||||
if (classMap.isEmpty())
|
if (nmm.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_'
|
const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_'
|
||||||
@ -2924,14 +2910,14 @@ void HtmlGenerator::generateCompactList(ListType listType,
|
|||||||
Divide the data into 37 paragraphs: 0, ..., 9, A, ..., Z,
|
Divide the data into 37 paragraphs: 0, ..., 9, A, ..., Z,
|
||||||
underscore (_). QAccel will fall in paragraph 10 (A) and
|
underscore (_). QAccel will fall in paragraph 10 (A) and
|
||||||
QXtWidget in paragraph 33 (X). This is the only place where we
|
QXtWidget in paragraph 33 (X). This is the only place where we
|
||||||
assume that NumParagraphs is 37. Each paragraph is a NodeMap.
|
assume that NumParagraphs is 37. Each paragraph is a NodeMultiMap.
|
||||||
*/
|
*/
|
||||||
NodeMap paragraph[NumParagraphs+1];
|
NodeMultiMap paragraph[NumParagraphs+1];
|
||||||
QString paragraphName[NumParagraphs+1];
|
QString paragraphName[NumParagraphs+1];
|
||||||
QSet<char> usedParagraphNames;
|
QSet<char> usedParagraphNames;
|
||||||
|
|
||||||
NodeMap::ConstIterator c = classMap.constBegin();
|
NodeMultiMap::ConstIterator c = nmm.constBegin();
|
||||||
while (c != classMap.constEnd()) {
|
while (c != nmm.constEnd()) {
|
||||||
QStringList pieces = c.key().split("::");
|
QStringList pieces = c.key().split("::");
|
||||||
QString key;
|
QString key;
|
||||||
int idx = commonPrefixLen;
|
int idx = commonPrefixLen;
|
||||||
@ -2991,8 +2977,10 @@ void HtmlGenerator::generateCompactList(ListType listType,
|
|||||||
|
|
||||||
int curParNr = 0;
|
int curParNr = 0;
|
||||||
int curParOffset = 0;
|
int curParOffset = 0;
|
||||||
|
QString previousName;
|
||||||
|
bool multipleOccurrences = false;
|
||||||
|
|
||||||
for (int i=0; i<classMap.count(); i++) {
|
for (int i=0; i<nmm.count(); i++) {
|
||||||
while ((curParNr < NumParagraphs) &&
|
while ((curParNr < NumParagraphs) &&
|
||||||
(curParOffset == paragraph[curParNr].count())) {
|
(curParOffset == paragraph[curParNr].count())) {
|
||||||
++curParNr;
|
++curParNr;
|
||||||
@ -3026,7 +3014,8 @@ void HtmlGenerator::generateCompactList(ListType listType,
|
|||||||
out() << "<dd>";
|
out() << "<dd>";
|
||||||
if ((curParNr < NumParagraphs) &&
|
if ((curParNr < NumParagraphs) &&
|
||||||
!paragraphName[curParNr].isEmpty()) {
|
!paragraphName[curParNr].isEmpty()) {
|
||||||
NodeMap::Iterator it;
|
NodeMultiMap::Iterator it;
|
||||||
|
NodeMultiMap::Iterator next;
|
||||||
it = paragraph[curParNr].begin();
|
it = paragraph[curParNr].begin();
|
||||||
for (int i=0; i<curParOffset; i++)
|
for (int i=0; i<curParOffset; i++)
|
||||||
++it;
|
++it;
|
||||||
@ -3049,8 +3038,20 @@ void HtmlGenerator::generateCompactList(ListType listType,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QStringList pieces;
|
QStringList pieces;
|
||||||
if (it.value()->isQmlType() || it.value()->isJsType())
|
if (it.value()->isQmlType() || it.value()->isJsType()) {
|
||||||
pieces << it.value()->name();
|
QString name = it.value()->name();
|
||||||
|
next = it;
|
||||||
|
++next;
|
||||||
|
if (name != previousName)
|
||||||
|
multipleOccurrences = false;
|
||||||
|
if ((next != paragraph[curParNr].end()) && (name == next.value()->name())) {
|
||||||
|
multipleOccurrences = true;
|
||||||
|
previousName = name;
|
||||||
|
}
|
||||||
|
if (multipleOccurrences)
|
||||||
|
name += ": " + it.value()->tree()->camelCaseModuleName();
|
||||||
|
pieces << name;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
pieces = it.value()->fullName(relative).split("::");
|
pieces = it.value()->fullName(relative).split("::");
|
||||||
out() << protectEnc(pieces.last());
|
out() << protectEnc(pieces.last());
|
||||||
@ -3064,7 +3065,7 @@ void HtmlGenerator::generateCompactList(ListType listType,
|
|||||||
out() << "</dd>\n";
|
out() << "</dd>\n";
|
||||||
curParOffset++;
|
curParOffset++;
|
||||||
}
|
}
|
||||||
if (classMap.count() > 0)
|
if (nmm.count() > 0)
|
||||||
out() << "</dl>\n";
|
out() << "</dl>\n";
|
||||||
|
|
||||||
out() << "</div>\n";
|
out() << "</div>\n";
|
||||||
|
@ -159,11 +159,11 @@ private:
|
|||||||
CodeMarker *marker,
|
CodeMarker *marker,
|
||||||
CodeMarker::Status status);
|
CodeMarker::Status status);
|
||||||
void generateClassHierarchy(const Node *relative, NodeMap &classMap);
|
void generateClassHierarchy(const Node *relative, NodeMap &classMap);
|
||||||
void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMap& nodeMap);
|
void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMultiMap& nodeMap);
|
||||||
void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeList& nodes);
|
void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeList& nodes);
|
||||||
void generateCompactList(ListType listType,
|
void generateCompactList(ListType listType,
|
||||||
const Node *relative,
|
const Node *relative,
|
||||||
const NodeMap &classMap,
|
const NodeMultiMap &classMap,
|
||||||
bool includeAlphabet,
|
bool includeAlphabet,
|
||||||
QString commonPrefix);
|
QString commonPrefix);
|
||||||
void generateFunctionIndex(const Node *relative);
|
void generateFunctionIndex(const Node *relative);
|
||||||
|
@ -341,17 +341,16 @@ static void processQdocconfFile(const QString &fileName)
|
|||||||
Location outputFormatsLocation = config.lastLocation();
|
Location outputFormatsLocation = config.lastLocation();
|
||||||
|
|
||||||
qdb->clearSearchOrder();
|
qdb->clearSearchOrder();
|
||||||
QString p = config.getString(CONFIG_PROJECT).toLower();
|
|
||||||
if (!Generator::singleExec()) {
|
if (!Generator::singleExec()) {
|
||||||
Generator::debug(" loading index files");
|
Generator::debug(" loading index files");
|
||||||
loadIndexFiles(config);
|
loadIndexFiles(config);
|
||||||
Generator::debug(" done loading index files");
|
Generator::debug(" done loading index files");
|
||||||
qdb->newPrimaryTree(p);
|
qdb->newPrimaryTree(project);
|
||||||
}
|
}
|
||||||
else if (Generator::preparing())
|
else if (Generator::preparing())
|
||||||
qdb->newPrimaryTree(p);
|
qdb->newPrimaryTree(project);
|
||||||
else
|
else
|
||||||
qdb->setPrimaryTree(p);
|
qdb->setPrimaryTree(project);
|
||||||
|
|
||||||
dependModules = config.getStringList(CONFIG_DEPENDS);
|
dependModules = config.getStringList(CONFIG_DEPENDS);
|
||||||
dependModules.removeDuplicates();
|
dependModules.removeDuplicates();
|
||||||
|
@ -138,8 +138,9 @@ Tree* QDocForest::nextTree()
|
|||||||
*/
|
*/
|
||||||
void QDocForest::setPrimaryTree(const QString& t)
|
void QDocForest::setPrimaryTree(const QString& t)
|
||||||
{
|
{
|
||||||
primaryTree_ = findTree(t);
|
QString T = t.toLower();
|
||||||
forest_.remove(t);
|
primaryTree_ = findTree(T);
|
||||||
|
forest_.remove(T);
|
||||||
if (!primaryTree_)
|
if (!primaryTree_)
|
||||||
qDebug() << "ERROR: Could not set primary tree to:" << t;
|
qDebug() << "ERROR: Could not set primary tree to:" << t;
|
||||||
}
|
}
|
||||||
@ -841,7 +842,7 @@ TextToNodeMap& QDocDatabase::getLegaleseTexts()
|
|||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of C++ classes with obsolete members.
|
the map of C++ classes with obsolete members.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getClassesWithObsoleteMembers()
|
NodeMultiMap& QDocDatabase::getClassesWithObsoleteMembers()
|
||||||
{
|
{
|
||||||
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllObsoleteThings);
|
processForest(&QDocDatabase::findAllObsoleteThings);
|
||||||
@ -853,7 +854,7 @@ NodeMap& QDocDatabase::getClassesWithObsoleteMembers()
|
|||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of obsolete QML types.
|
the map of obsolete QML types.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getObsoleteQmlTypes()
|
NodeMultiMap& QDocDatabase::getObsoleteQmlTypes()
|
||||||
{
|
{
|
||||||
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllObsoleteThings);
|
processForest(&QDocDatabase::findAllObsoleteThings);
|
||||||
@ -865,38 +866,24 @@ NodeMap& QDocDatabase::getObsoleteQmlTypes()
|
|||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of QML types with obsolete members.
|
the map of QML types with obsolete members.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getQmlTypesWithObsoleteMembers()
|
NodeMultiMap& QDocDatabase::getQmlTypesWithObsoleteMembers()
|
||||||
{
|
{
|
||||||
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllObsoleteThings);
|
processForest(&QDocDatabase::findAllObsoleteThings);
|
||||||
return qmlTypesWithObsoleteMembers_;
|
return qmlTypesWithObsoleteMembers_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \fn NodeMap& QDocDatabase::getNamespaces()
|
/*! \fn NodeMultiMap& QDocDatabase::getNamespaces()
|
||||||
Returns a reference to the map of all namespace nodes.
|
Returns a reference to the map of all namespace nodes.
|
||||||
This function must not be called in the -prepare phase.
|
This function must not be called in the -prepare phase.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
Construct the C++ class data structures, if they have not
|
|
||||||
already been constructed. Returns a reference to the map
|
|
||||||
of C++ service clases.
|
|
||||||
|
|
||||||
\note This is currently not used.
|
|
||||||
*/
|
|
||||||
NodeMap& QDocDatabase::getServiceClasses()
|
|
||||||
{
|
|
||||||
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
|
||||||
return serviceClasses_;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Construct the data structures for QML basic types, if they
|
Construct the data structures for QML basic types, if they
|
||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of QML basic types.
|
the map of QML basic types.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getQmlBasicTypes()
|
NodeMultiMap& QDocDatabase::getQmlBasicTypes()
|
||||||
{
|
{
|
||||||
if (cppClasses_.isEmpty() && qmlBasicTypes_.isEmpty())
|
if (cppClasses_.isEmpty() && qmlBasicTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
processForest(&QDocDatabase::findAllClasses);
|
||||||
@ -906,9 +893,9 @@ NodeMap& QDocDatabase::getQmlBasicTypes()
|
|||||||
/*!
|
/*!
|
||||||
Construct the data structures for obsolete things, if they
|
Construct the data structures for obsolete things, if they
|
||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of obsolete QML types.
|
the multimap of QML types.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getQmlTypes()
|
NodeMultiMap& QDocDatabase::getQmlTypes()
|
||||||
{
|
{
|
||||||
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
processForest(&QDocDatabase::findAllClasses);
|
||||||
@ -920,46 +907,19 @@ NodeMap& QDocDatabase::getQmlTypes()
|
|||||||
have not already been constructed. Returns a reference to
|
have not already been constructed. Returns a reference to
|
||||||
the map of obsolete C++ clases.
|
the map of obsolete C++ clases.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getObsoleteClasses()
|
NodeMultiMap& QDocDatabase::getObsoleteClasses()
|
||||||
{
|
{
|
||||||
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
if (obsoleteClasses_.isEmpty() && obsoleteQmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllObsoleteThings);
|
processForest(&QDocDatabase::findAllObsoleteThings);
|
||||||
return obsoleteClasses_;
|
return obsoleteClasses_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
Construct the C++ class data structures, if they have not
|
|
||||||
already been constructed. Returns a reference to the map
|
|
||||||
of compatibility C++ clases.
|
|
||||||
*/
|
|
||||||
NodeMap& QDocDatabase::getCompatibilityClasses()
|
|
||||||
{
|
|
||||||
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
|
||||||
return compatClasses_;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Construct the C++ class data structures, if they have not
|
|
||||||
already been constructed. Returns a reference to the map
|
|
||||||
of main C++ clases.
|
|
||||||
|
|
||||||
\note The main C++ classes data structure is currently not
|
|
||||||
used.
|
|
||||||
*/
|
|
||||||
NodeMap& QDocDatabase::getMainClasses()
|
|
||||||
{
|
|
||||||
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
|
||||||
return mainClasses_;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Construct the C++ class data structures, if they have not
|
Construct the C++ class data structures, if they have not
|
||||||
already been constructed. Returns a reference to the map
|
already been constructed. Returns a reference to the map
|
||||||
of all C++ classes.
|
of all C++ classes.
|
||||||
*/
|
*/
|
||||||
NodeMap& QDocDatabase::getCppClasses()
|
NodeMultiMap& QDocDatabase::getCppClasses()
|
||||||
{
|
{
|
||||||
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
if (cppClasses_.isEmpty() && qmlTypes_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllClasses);
|
processForest(&QDocDatabase::findAllClasses);
|
||||||
@ -974,7 +934,8 @@ void QDocDatabase::findAllClasses(InnerNode* node)
|
|||||||
{
|
{
|
||||||
NodeList::const_iterator c = node->childNodes().constBegin();
|
NodeList::const_iterator c = node->childNodes().constBegin();
|
||||||
while (c != node->childNodes().constEnd()) {
|
while (c != node->childNodes().constEnd()) {
|
||||||
if ((*c)->access() != Node::Private && (!(*c)->isInternal() || showInternal_)) {
|
if ((*c)->access() != Node::Private && (!(*c)->isInternal() || showInternal_) &&
|
||||||
|
(*c)->tree()->camelCaseModuleName() != QString("QDoc")) {
|
||||||
if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) {
|
if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) {
|
||||||
QString className = (*c)->name();
|
QString className = (*c)->name();
|
||||||
if ((*c)->parent() &&
|
if ((*c)->parent() &&
|
||||||
@ -982,19 +943,7 @@ void QDocDatabase::findAllClasses(InnerNode* node)
|
|||||||
!(*c)->parent()->name().isEmpty())
|
!(*c)->parent()->name().isEmpty())
|
||||||
className = (*c)->parent()->name()+"::"+className;
|
className = (*c)->parent()->name()+"::"+className;
|
||||||
|
|
||||||
if ((*c)->status() == Node::Compat) {
|
cppClasses_.insert(className, *c);
|
||||||
compatClasses_.insert(className, *c);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
cppClasses_.insert(className, *c);
|
|
||||||
if ((*c)->status() == Node::Main)
|
|
||||||
mainClasses_.insert(className, *c);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString serviceName = (static_cast<const ClassNode *>(*c))->serviceName();
|
|
||||||
if (!serviceName.isEmpty()) {
|
|
||||||
serviceClasses_.insert(serviceName, *c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (((*c)->isQmlType() || (*c)->isQmlBasicType() ||
|
else if (((*c)->isQmlType() || (*c)->isQmlBasicType() ||
|
||||||
(*c)->isJsType() || (*c)->isJsBasicType()) && !(*c)->doc().isEmpty()) {
|
(*c)->isJsType() || (*c)->isJsBasicType()) && !(*c)->doc().isEmpty()) {
|
||||||
@ -1299,7 +1248,7 @@ const NodeMap& QDocDatabase::getQmlTypeMap(const QString& key)
|
|||||||
a reference to the value, which is a NodeMultiMap. If \a key
|
a reference to the value, which is a NodeMultiMap. If \a key
|
||||||
is not found, return a reference to an empty NodeMultiMap.
|
is not found, return a reference to an empty NodeMultiMap.
|
||||||
*/
|
*/
|
||||||
const NodeMultiMap& QDocDatabase::getSinceMap(const QString& key)
|
const NodeMap& QDocDatabase::getSinceMap(const QString& key)
|
||||||
{
|
{
|
||||||
if (newSinceMaps_.isEmpty() && newClassMaps_.isEmpty() && newQmlTypeMaps_.isEmpty())
|
if (newSinceMaps_.isEmpty() && newClassMaps_.isEmpty() && newQmlTypeMaps_.isEmpty())
|
||||||
processForest(&QDocDatabase::findAllSince);
|
processForest(&QDocDatabase::findAllSince);
|
||||||
|
@ -271,22 +271,19 @@ class QDocDatabase
|
|||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
special collection access functions
|
special collection access functions
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
NodeMap& getCppClasses();
|
NodeMultiMap& getCppClasses();
|
||||||
NodeMap& getMainClasses();
|
NodeMultiMap& getObsoleteClasses();
|
||||||
NodeMap& getCompatibilityClasses();
|
NodeMultiMap& getClassesWithObsoleteMembers();
|
||||||
NodeMap& getObsoleteClasses();
|
NodeMultiMap& getObsoleteQmlTypes();
|
||||||
NodeMap& getClassesWithObsoleteMembers();
|
NodeMultiMap& getQmlTypesWithObsoleteMembers();
|
||||||
NodeMap& getObsoleteQmlTypes();
|
NodeMultiMap& getNamespaces() { resolveNamespaces(); return namespaceIndex_; }
|
||||||
NodeMap& getQmlTypesWithObsoleteMembers();
|
NodeMultiMap& getQmlBasicTypes();
|
||||||
NodeMap& getNamespaces() { resolveNamespaces(); return namespaceIndex_; }
|
NodeMultiMap& getQmlTypes();
|
||||||
NodeMap& getServiceClasses();
|
|
||||||
NodeMap& getQmlBasicTypes();
|
|
||||||
NodeMap& getQmlTypes();
|
|
||||||
NodeMapMap& getFunctionIndex();
|
NodeMapMap& getFunctionIndex();
|
||||||
TextToNodeMap& getLegaleseTexts();
|
TextToNodeMap& getLegaleseTexts();
|
||||||
const NodeMap& getClassMap(const QString& key);
|
const NodeMap& getClassMap(const QString& key);
|
||||||
const NodeMap& getQmlTypeMap(const QString& key);
|
const NodeMap& getQmlTypeMap(const QString& key);
|
||||||
const NodeMultiMap& getSinceMap(const QString& key);
|
const NodeMap& getSinceMap(const QString& key);
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Many of these will be either eliminated or replaced.
|
Many of these will be either eliminated or replaced.
|
||||||
@ -438,18 +435,15 @@ class QDocDatabase
|
|||||||
QString version_;
|
QString version_;
|
||||||
QDocForest forest_;
|
QDocForest forest_;
|
||||||
|
|
||||||
NodeMap cppClasses_;
|
NodeMultiMap cppClasses_;
|
||||||
NodeMap mainClasses_; // MWS: not needed, should be delete
|
NodeMultiMap obsoleteClasses_;
|
||||||
NodeMap compatClasses_;
|
NodeMultiMap classesWithObsoleteMembers_;
|
||||||
NodeMap obsoleteClasses_;
|
NodeMultiMap obsoleteQmlTypes_;
|
||||||
NodeMap classesWithObsoleteMembers_;
|
NodeMultiMap qmlTypesWithObsoleteMembers_;
|
||||||
NodeMap obsoleteQmlTypes_;
|
NodeMultiMap namespaceIndex_;
|
||||||
NodeMap qmlTypesWithObsoleteMembers_;
|
|
||||||
NodeMap namespaceIndex_;
|
|
||||||
NodeMultiMap nmm_;
|
NodeMultiMap nmm_;
|
||||||
NodeMap serviceClasses_; // MWS: not needed, should be deleted
|
NodeMultiMap qmlBasicTypes_;
|
||||||
NodeMap qmlBasicTypes_;
|
NodeMultiMap qmlTypes_;
|
||||||
NodeMap qmlTypes_;
|
|
||||||
NodeMapMap newClassMaps_;
|
NodeMapMap newClassMaps_;
|
||||||
NodeMapMap newQmlTypeMaps_;
|
NodeMapMap newQmlTypeMaps_;
|
||||||
NodeMultiMapMap newSinceMaps_;
|
NodeMultiMapMap newSinceMaps_;
|
||||||
|
@ -64,12 +64,17 @@ QT_BEGIN_NAMESPACE
|
|||||||
Constructs a Tree. \a qdb is the pointer to the singleton
|
Constructs a Tree. \a qdb is the pointer to the singleton
|
||||||
qdoc database that is constructing the tree. This might not
|
qdoc database that is constructing the tree. This might not
|
||||||
be necessary, and it might be removed later.
|
be necessary, and it might be removed later.
|
||||||
|
|
||||||
|
\a camelCaseModuleName is the project name for this tree,
|
||||||
|
which was obtained from the qdocconf file via the Config
|
||||||
|
singleton.
|
||||||
*/
|
*/
|
||||||
Tree::Tree(const QString& physicalModuleName, QDocDatabase* qdb)
|
Tree::Tree(const QString& camelCaseModuleName, QDocDatabase* qdb)
|
||||||
: treeHasBeenAnalyzed_(false),
|
: treeHasBeenAnalyzed_(false),
|
||||||
docsHaveBeenGenerated_(false),
|
docsHaveBeenGenerated_(false),
|
||||||
linkCount_(0),
|
linkCount_(0),
|
||||||
physicalModuleName_(physicalModuleName),
|
camelCaseModuleName_(camelCaseModuleName),
|
||||||
|
physicalModuleName_(camelCaseModuleName.toLower()),
|
||||||
qdb_(qdb),
|
qdb_(qdb),
|
||||||
root_(0, QString()),
|
root_(0, QString()),
|
||||||
targetListMap_(0)
|
targetListMap_(0)
|
||||||
|
@ -95,7 +95,7 @@ class Tree
|
|||||||
typedef QMap<PropertyNode::FunctionRole, QString> RoleMap;
|
typedef QMap<PropertyNode::FunctionRole, QString> RoleMap;
|
||||||
typedef QMap<PropertyNode*, RoleMap> PropertyMap;
|
typedef QMap<PropertyNode*, RoleMap> PropertyMap;
|
||||||
|
|
||||||
Tree(const QString& module, QDocDatabase* qdb);
|
Tree(const QString& camelCaseModuleName, QDocDatabase* qdb);
|
||||||
~Tree();
|
~Tree();
|
||||||
|
|
||||||
Node* findNodeForInclude(const QStringList& path) const;
|
Node* findNodeForInclude(const QStringList& path) const;
|
||||||
@ -212,6 +212,7 @@ class Tree
|
|||||||
QStringList getTargetListKeys() { return targetListMap_->keys(); }
|
QStringList getTargetListKeys() { return targetListMap_->keys(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
const QString& camelCaseModuleName() const { return camelCaseModuleName_; }
|
||||||
const QString& physicalModuleName() const { return physicalModuleName_; }
|
const QString& physicalModuleName() const { return physicalModuleName_; }
|
||||||
const QString& indexFileName() const { return indexFileName_; }
|
const QString& indexFileName() const { return indexFileName_; }
|
||||||
long incrementLinkCount() { return --linkCount_; }
|
long incrementLinkCount() { return --linkCount_; }
|
||||||
@ -222,6 +223,7 @@ private:
|
|||||||
bool treeHasBeenAnalyzed_;
|
bool treeHasBeenAnalyzed_;
|
||||||
bool docsHaveBeenGenerated_;
|
bool docsHaveBeenGenerated_;
|
||||||
long linkCount_;
|
long linkCount_;
|
||||||
|
QString camelCaseModuleName_;
|
||||||
QString physicalModuleName_;
|
QString physicalModuleName_;
|
||||||
QString indexFileName_;
|
QString indexFileName_;
|
||||||
QDocDatabase* qdb_;
|
QDocDatabase* qdb_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user