summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/cppcodeparser.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-31 16:34:02 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-31 16:34:02 (GMT)
commitf14bbde351d90bed520f9503500f922f7aa18c92 (patch)
tree86fe9e3930aa3edbc142c207891d5856921270c3 /tools/qdoc3/cppcodeparser.cpp
parente546ecd3afd6660432178f2e9f692f8fcd16a712 (diff)
parent9c5f08452da280a90de48d0fa3862748cc428df4 (diff)
downloadQt-f14bbde351d90bed520f9503500f922f7aa18c92.zip
Qt-f14bbde351d90bed520f9503500f922f7aa18c92.tar.gz
Qt-f14bbde351d90bed520f9503500f922f7aa18c92.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: (25 commits) qdoc3: Updates to qdoc to print error message in ALL CAPS Doc: Added a note to Code Editor example docs Doc: QItemDelegate->QStyledItemDelegate in Star Delegate docs Doc: Added a link in Symbian Intro to Required Capabilities Doc: Added info on ordered targets for VS to qmake manual Doc: Small addition to the QML anchor layout docs Doc: Internalized QDeclarativeTypeLoader Doc: Said that QIODevice::isSequential returns false by default Doc: Said that QList::clear deallocates memory Doc: Updated platform notes for MultiMedia and Phonon Doc: Added links to the plugin deployment guide. Doc: Fix doc bug in QMouseEvent Doc: Fixed doc bug in QMetaObject Doc: Fixed date format doc bug in QDateTime/Qt namespace Doc: Removed internal Phonon classes from doce qdoc3: Updates for QTBUG-20776; include fileToOpen path. qdoc3: Updates for QTBUG-20776; clear map between runs. qdoc3: Updates for QTBUG-20739 (no read-only for QML components) qdoc3: Updates for QTBUG-20776 and QTBUG-20777 qdoc: Check pointer for null before dereferencing. ...
Diffstat (limited to 'tools/qdoc3/cppcodeparser.cpp')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 6f5baa0..1a4c344 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -47,7 +47,7 @@
#include <stdio.h>
#include <errno.h>
-
+#include <qdebug.h>
#include "codechunk.h"
#include "config.h"
#include "cppcodeparser.h"
@@ -704,7 +704,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (command == COMMAND_CLASS) {
if (paths.size() > 1) {
if (!paths[1].endsWith(".h")) {
- ClassNode*cnode = static_cast<ClassNode*>(node);
+ ClassNode* cnode = static_cast<ClassNode*>(node);
cnode->setQmlElement(paths[1]);
}
}
@@ -712,9 +712,9 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return node;
}
else if (command == COMMAND_EXAMPLE) {
- FakeNode *fake = new FakeNode(tre->root(), arg, Node::Example);
- createExampleFileNodes(fake);
- return fake;
+ ExampleNode* en = new ExampleNode(tre->root(), arg);
+ createExampleFileNodes(en);
+ return en;
}
else if (command == COMMAND_EXTERNALPAGE) {
return new FakeNode(tre->root(), arg, Node::ExternalPage);
@@ -2349,8 +2349,8 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
proFileName,
userFriendlyFilePath);
if (fullPath.isEmpty()) {
- fake->doc().location().warning(
- tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ fake->doc().location().warning(tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ fake->doc().location().warning(tr("EXAMPLE PATH DOES NOT EXIST: %1").arg(examplePath));
return;
}
}
@@ -2362,7 +2362,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter);
QString imagesPath = fullPath + "/images";
QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter);
-
if (!exampleFiles.isEmpty()) {
// move main.cpp and to the end, if it exists
QString mainCpp;
@@ -2382,7 +2381,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
exampleFiles.append(mainCpp);
// add any qmake Qt resource files and qmake project files
- exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro qmldir");
+ exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro *.qmlproject qmldir");
}
foreach (const QString &exampleFile, exampleFiles)