summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-07-26 10:05:52 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-26 14:24:34 +0200
commit353069f974c62ef758b1496881a03fcb6ca51476 (patch)
treefd3b833a6f04fe5a5fc2e9fcba76d772b7ba617b /src/tools
parent28ae05e2f9371550bd826be994372f67dee90013 (diff)
Revert "QDoc: Allow '0' to be used as 2nd arg for \qmlclass."
This reverts commit 50dfd15dcc49d12c5335a37999aef041d7fdfaae. The change is not necessary anymore, since a new solution using \instantiates in in the works, having two ways to do exactly the same thing is not necessary. Change-Id: I6e139d760372fc6177023c470850418b2385fccd Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index 7fc2c14fe4..02b81eeb1b 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -728,17 +728,8 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
else if (command == COMMAND_QMLCLASS) {
ClassNode* classNode = 0;
QStringList names = arg.first.split(QLatin1Char(' '));
- bool ignoreCppClass = false;
- if (names.size() > 1) {
- /*
- If the second argument of the \\qmlclass command is 0 we should ignore the C++ class.
- The second argument should only be 0 when you are documenting QML in a .qdoc file.
- */
- if (names[1] != "0")
- classNode = tree_->findClassNode(names[1].split("::"));
- else
- ignoreCppClass = true;
- }
+ if (names.size() > 1)
+ classNode = tree_->findClassNode(names[1].split("::"));
/*
Search for a node with the same name. If there is one,
@@ -755,18 +746,17 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
QmlClassNode* qcn = new QmlClassNode(tree_->root(), names[0], classNode);
qcn->setLocation(doc.startLocation());
if (isParsingCpp() || isParsingQdoc()) {
- QString msg;
- if (names.size() < 2)
- msg = "C++ class name not specified for class documented as "
- "QML type: '\\qmlclass " + arg.first + " <class name>'."
- " '0' should be used as second argument if there is no C++ class.";
- else if (!classNode && !ignoreCppClass)
- msg = "C++ class not found in any .h file for class documented "
+ qcn->requireCppClass();
+ if (names.size() < 2) {
+ QString msg = "C++ class name not specified for class documented as "
+ "QML type: '\\qmlclass " + arg.first + " <class name>'";
+ doc.startLocation().warning(tr(msg.toLatin1().data()));
+ }
+ else if (!classNode) {
+ QString msg = "C++ class not found in any .h file for class documented "
"as QML type: '\\qmlclass " + arg.first + "'";
- else if (!ignoreCppClass)
- qcn->requireCppClass();
- if (!msg.isEmpty())
doc.startLocation().warning(tr(msg.toLatin1().data()));
+ }
}
if (ncn)
ncn->addCollision(qcn);