qdoc: Fixed the relative link to installdir problem

Instead of using the fake "outputdir" to force qdoc
to generate a relative path to the actual output dir,
it now uses the value of HTML.outputsubdir, or just
"html" if HTML.outputsubdir is not specified.

Task-number: QTBUG-32580
Change-Id: I45c79a788e102213e6d343a7ed108a3d17d94759
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
Martin Smith 2013-08-23 11:52:57 +02:00 committed by The Qt Project
parent 404598b613
commit 94dca6d10c

View File

@ -133,7 +133,8 @@ void QDocIndexFiles::readIndexFile(const QString& path)
else { else {
// Use a fake directory, since we will copy the output to a sub directory of // Use a fake directory, since we will copy the output to a sub directory of
// installDir when using "make install". This is just for a proper relative path. // installDir when using "make install". This is just for a proper relative path.
QDir installDir(path.section('/', 0, -3) + "/outputdir"); //QDir installDir(path.section('/', 0, -3) + "/outputdir");
QDir installDir(path.section('/', 0, -3) + '/' + Generator::outputSubdir());
indexUrl = installDir.relativeFilePath(path).section('/', 0, -2); indexUrl = installDir.relativeFilePath(path).section('/', 0, -2);
} }
project_ = indexElement.attribute("project", QString()); project_ = indexElement.attribute("project", QString());