summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qmlvisitor.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-26 22:30:27 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-26 22:35:48 +0100
commit4a8273a6fc2e741e811cf5dabc9a3c240306cf7f (patch)
tree2148abc88f8543eecdc0b97b2dd92594836af9b2 /src/tools/qdoc/qmlvisitor.cpp
parent036c5db468164297d213764c59a4b59daa76d90a (diff)
parent1c2be58fecaff1de5f2849192eb712984ebd59bd (diff)
Merge remote-tracking branch 'origin/stable' into dev
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
Diffstat (limited to 'src/tools/qdoc/qmlvisitor.cpp')
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 323c312eb5..ec1ef41256 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -404,7 +404,6 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
}
}
else if (command == COMMAND_INTERNAL) {
- node->setAccess(Node::Private);
node->setStatus(Node::Internal);
}
else if (command == COMMAND_OBSOLETE) {
@@ -465,6 +464,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
QmlClassNode *component = new QmlClassNode(current, name);
component->setTitle(name);
component->setImportList(importList);
+ importList.clear();
if (applyDocumentation(definition->firstSourceLocation(), component)) {
QmlClassNode::addInheritedBy(type, component);
component->setQmlBaseName(type);
@@ -489,34 +489,21 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::UiObjectDefinition *definition)
lastEndOffset = definition->lastSourceLocation().end();
}
-/*!
- Note that the imports list can be traversed by iteration to obtain
- all the imports in the document at once, having found just one:
-
- *it = imports; it; it = it->next
-
- */
-bool QmlDocVisitor::visit(QQmlJS::AST::UiImportList *imports)
+bool QmlDocVisitor::visit(QQmlJS::AST::UiImport *import)
{
- while (imports != 0) {
- QQmlJS::AST::UiImport* imp = imports->import;
-
- QString name = document.mid(imp->fileNameToken.offset, imp->fileNameToken.length);
- if (name[0] == '\"')
- name = name.mid(1, name.length()-2);
- QString version = document.mid(imp->versionToken.offset, imp->versionToken.length);
- QString importId = document.mid(imp->importIdToken.offset, imp->importIdToken.length);
- QString importUri = getFullyQualifiedId(imp->importUri);
- importList.append(ImportRec(name, version, importId, importUri));
- imports = imports->next;
- }
+ QString name = document.mid(import->fileNameToken.offset, import->fileNameToken.length);
+ if (name[0] == '\"')
+ name = name.mid(1, name.length()-2);
+ QString version = document.mid(import->versionToken.offset, import->versionToken.length);
+ QString importId = document.mid(import->importIdToken.offset, import->importIdToken.length);
+ QString importUri = getFullyQualifiedId(import->importUri);
+ QString reconstructed = importUri + QString(" ") + version;
+ importList.append(ImportRec(name, version, importId, importUri));
+
return true;
}
-/*!
- End the visit of the imports list.
- */
-void QmlDocVisitor::endVisit(QQmlJS::AST::UiImportList *definition)
+void QmlDocVisitor::endVisit(QQmlJS::AST::UiImport *definition)
{
lastEndOffset = definition->lastSourceLocation().end();
}