diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2012-05-10 17:35:00 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-11 12:52:21 +0200 |
commit | d4672da26441582b1ad9012bc2f94afc94f3d981 (patch) | |
tree | ec31a30c64c6f51b8051a7544f80b6e8d52b4b10 /src/tools | |
parent | 85c3f6a74df94dc76c343732d2f4be700ec59c50 (diff) |
QDoc: Return correct path when quoting example files.
When the exampledirs qdocconf variable is . the first 2 characters of
the file to quote from were being cut off, since there was a string
comparison between the size of the strings with and without './'
Change-Id: Iede54b5f77ec8a7530c608908f08e7eb4351f0f1
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 3d2cc60d8b..b77d6682d1 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -2509,6 +2509,8 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) } int sizeOfBoringPartOfName = fullPath.size() - proFileName.size(); + if (fullPath.startsWith("./")) + sizeOfBoringPartOfName = sizeOfBoringPartOfName - 2; fullPath.truncate(fullPath.lastIndexOf('/')); QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter); |