summaryrefslogtreecommitdiff
path: root/tools/qdoc3/cppcodeparser.cpp
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-04-22 14:58:11 +1000
committerYann Bodson <yann.bodson@nokia.com>2010-04-22 14:58:11 +1000
commite9da512e321c6ea7795a4abc0b9d24bf4d3d2527 (patch)
treec20e29c211fe6cb330d2a9718cc615f1c7a61186 /tools/qdoc3/cppcodeparser.cpp
parentadb16277869ad4d588ef7b3c7112f94abdeb9b8b (diff)
downloadqt4-tools-e9da512e321c6ea7795a4abc0b9d24bf4d3d2527.tar.gz
Do not treat images in qml examples differently.
Diffstat (limited to 'tools/qdoc3/cppcodeparser.cpp')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 730f12205b..13678afc12 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()) {