summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2012-09-13 11:38:45 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 15:23:15 +0200
commit14f7eb86ca2275d91f284279af5f77205d4ae3c0 (patch)
treeed4e91d6422dd814ac3e81739ad4a3b55bf050c7 /src/tools/qdoc/cppcodemarker.cpp
parent817a4474676b30a964de476d26bd70ddba3d379a (diff)
qdoc: Refactoring of qdoc data structures
This commit is the beginning of a significant overhaul of qdoc. A new class, QDocDatabase, is added, which will eventually encapsulate all the data structures used by qdoc. In this commit, the Tree class is made private and only accessible from QDocDatabase. Several maps structures are also moved into QDocDatabase from other classes. Much dead code and unused parameters were removed. Further simplification will follow. Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.cpp')
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 61f1b76ede..749f60d9cd 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -116,38 +116,6 @@ Atom::Type CppCodeMarker::atomType() const
return Atom::Code;
}
-/*!
- Returns the \a node name, or "()" if \a node is a
- Node::Function node.
- */
-QString CppCodeMarker::plainName(const Node *node)
-{
- QString name = node->name();
- if (node->type() == Node::Function)
- name += QLatin1String("()");
- return name;
-}
-
-QString CppCodeMarker::plainFullName(const Node *node, const Node *relative)
-{
- if (node->name().isEmpty()) {
- return QLatin1String("global");
- }
- else {
- QString fullName;
- while (node) {
- fullName.prepend(plainName(node));
- if (node->parent() == relative ||
- node->parent()->subType() == Node::Collision ||
- node->parent()->name().isEmpty())
- break;
- fullName.prepend(QLatin1String("::"));
- node = node->parent();
- }
- return fullName;
- }
-}
-
QString CppCodeMarker::markedUpCode(const QString &code,
const Node *relative,
const Location &location)
@@ -834,40 +802,6 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
return sections;
}
-/*!
- Search the \a tree for a node named \a target
- */
-const Node *CppCodeMarker::resolveTarget(const QString& target,
- const Tree* tree,
- const Node* relative,
- const Node* self)
-{
- const Node* node = 0;
- if (target.endsWith("()")) {
- QString funcName = target;
- funcName.chop(2);
- QStringList path = funcName.split("::");
- const FunctionNode* fn = tree->findFunctionNode(path, relative, Tree::SearchBaseClasses);
- if (fn) {
- /*
- Why is this case not accepted?
- */
- if (fn->metaness() != FunctionNode::MacroWithoutParams)
- node = fn;
- }
- }
- else if (target.contains(QLatin1Char('#'))) {
- // This error message is never printed; I think we can remove the case.
- qDebug() << "qdoc: target case not handled:" << target;
- }
- else {
- QStringList path = target.split("::");
- int flags = Tree::SearchBaseClasses | Tree::SearchEnumValues | Tree::NonFunction;
- node = tree->findNode(path, relative, flags, self);
- }
- return node;
-}
-
static const char * const typeTable[] = {
"bool", "char", "double", "float", "int", "long", "short",
"signed", "unsigned", "uint", "ulong", "ushort", "uchar", "void",