diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-09-03 10:25:01 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-07 15:39:31 +0200 |
commit | 2e8763ca4484b9dfd7560487a4d2c43653f91021 (patch) | |
tree | 5d7032d58ef47f81fb6f4c7326a14e2082f4af1e /src/tools | |
parent | 51d40d7e9bdfc63c5109aef5b732aa2ba10f985a (diff) |
Fix a bug in qdoc where to look for index files.
This was only a problem if the qdocconf file was in the same
directory as the current directory (QDir::relativeFilePath()
returns an empty string in that case), so if the documentation was
generated with the makefile rules, this problem did not reveal itself.
Change-Id: I9c8956fdb46c4f307df7ab297dc94e8d3ef93fb4
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 3cc36e42a2..0d668203e3 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -264,7 +264,9 @@ static void processQdocconfFile(const QString &fileName) if (indexDirs.size() > 0) { for (int i = 0; i < indexDirs.size(); i++) { if (indexDirs[i].startsWith("..")) { - indexDirs[i].prepend(QDir(dir).relativeFilePath(prevCurrentDir) + QLatin1Char('/')); + const QString prefix(QDir(dir).relativeFilePath(prevCurrentDir)); + if (!prefix.isEmpty()) + indexDirs[i].prepend(prefix + QLatin1Char('/')); } } /* |