diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/config.h | 1 | ||||
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 10 | ||||
-rw-r--r-- | src/tools/qdoc/htmlgenerator.h | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h index f5c1999159..88c4db3e45 100644 --- a/src/tools/qdoc/config.h +++ b/src/tools/qdoc/config.h @@ -168,6 +168,7 @@ private: #define CONFIG_ENDHEADER "endheader" #define CONFIG_EXAMPLEDIRS "exampledirs" #define CONFIG_EXAMPLES "examples" +#define CONFIG_EXAMPLESINSTALLPATH "examplesinstallpath" #define CONFIG_EXCLUDEDIRS "excludedirs" #define CONFIG_EXCLUDEFILES "excludefiles" #define CONFIG_EXTRAIMAGES "extraimages" diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 5b752ffe2c..45c9777929 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -223,7 +223,9 @@ void HtmlGenerator::initializeGenerator(const Config &config) QString prefix = CONFIG_QHP + Config::dot + project + Config::dot; manifestDir = "qthelp://" + config.getString(prefix + "namespace"); manifestDir += QLatin1Char('/') + config.getString(prefix + "virtualFolder") + QLatin1Char('/'); - + examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH); + if (!examplesPath.isEmpty()) + examplesPath += QLatin1Char('/'); } /*! @@ -4094,7 +4096,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) } if (!proFiles.isEmpty()) { if (proFiles.size() == 1) { - writer.writeAttribute("projectPath", proFiles[0]); + writer.writeAttribute("projectPath", examplesPath + proFiles[0]); } else { QString exampleName = en->name().split('/').last(); @@ -4103,13 +4105,13 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) { if (proFiles[j].endsWith(QStringLiteral("%1/%1.pro").arg(exampleName)) || proFiles[j].endsWith(QStringLiteral("%1/%1.qmlproject").arg(exampleName))) { - writer.writeAttribute("projectPath", proFiles[j]); + writer.writeAttribute("projectPath", examplesPath + proFiles[j]); proWithExampleNameFound = true; break; } } if (!proWithExampleNameFound) - writer.writeAttribute("projectPath", proFiles[0]); + writer.writeAttribute("projectPath", examplesPath + proFiles[0]); } } if (!en->imageFileName().isEmpty()) diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index c4af3c499e..31895d923b 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -236,6 +236,7 @@ private: QString projectUrl; QString navigationLinks; QString manifestDir; + QString examplesPath; QStringList stylesheets; QStringList customHeadElements; bool obsoleteLinks; |