diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-04-22 04:58:11 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-04-22 04:58:11 (GMT) |
commit | e9da512e321c6ea7795a4abc0b9d24bf4d3d2527 (patch) | |
tree | c20e29c211fe6cb330d2a9718cc615f1c7a61186 /tools/qdoc3 | |
parent | adb16277869ad4d588ef7b3c7112f94abdeb9b8b (diff) | |
download | Qt-e9da512e321c6ea7795a4abc0b9d24bf4d3d2527.zip Qt-e9da512e321c6ea7795a4abc0b9d24bf4d3d2527.tar.gz Qt-e9da512e321c6ea7795a4abc0b9d24bf4d3d2527.tar.bz2 |
Do not treat images in qml examples differently.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r-- | tools/qdoc3/cppcodeparser.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 730f122..13678af 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -2268,44 +2268,35 @@ void CppCodeParser::instantiateIteratorMacro(const QString &container, void CppCodeParser::createExampleFileNodes(FakeNode *fake) { QString examplePath = fake->name(); + QString proFileName = examplePath + "/" + examplePath.split("/").last() + ".pro"; QString userFriendlyFilePath; - bool isQmlExample = false; - // let's check if this is a QML example - QString proFileName = examplePath + "/" + examplePath.split("/").last() + ".qmlproject"; QString fullPath = Config::findFile(fake->doc().location(), exampleFiles, exampleDirs, proFileName, userFriendlyFilePath); - if (!fullPath.isEmpty()) { - isQmlExample = true; - } else { - // let's check if there is a .pro file - proFileName = examplePath + "/" + examplePath.split("/").last() + ".pro"; + if (fullPath.isEmpty()) { + QString tmp = proFileName; + proFileName = examplePath + "/" + "qbuild.pro"; userFriendlyFilePath.clear(); - fullPath = Config::findFile(fake->doc().location(), exampleFiles, exampleDirs, proFileName, userFriendlyFilePath); - if (fullPath.isEmpty()) { - // let's check if there is a qbuild.pro file - QString tmp = proFileName; - proFileName = examplePath + "/" + "qbuild.pro"; + proFileName = examplePath + "/" + examplePath.split("/").last() + ".qmlproject"; userFriendlyFilePath.clear(); fullPath = Config::findFile(fake->doc().location(), exampleFiles, exampleDirs, proFileName, userFriendlyFilePath); - if (fullPath.isEmpty()) { fake->doc().location().warning( - tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName)); + tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName)); return; } } @@ -2315,14 +2306,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) fullPath.truncate(fullPath.lastIndexOf('/')); QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter); - - // QML examples do not put images in a "images" directory. - QString imagesPath; - if (isQmlExample) - imagesPath = fullPath; - else - imagesPath = fullPath + "/images"; - + QString imagesPath = fullPath + "/images"; QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter); if (!exampleFiles.isEmpty()) { |