55static void generate(QTextStream &out,
const Package &package,
const QDir &baseDir)
58 for (
const QString &part : package.qtParts) {
59 out <<
"\\ingroup attributions-" << package.qdocModule <<
"-" << part <<
"\n";
60 out <<
"\\ingroup attributions-" << part <<
"\n";
63 if (package.qtParts.contains(
"libs"_L1)) {
65 out <<
"\\ingroup attributions-" << package.qdocModule <<
"\n";
67 out <<
"\\page " << package.qdocModule <<
"-attribution-" << package.id
69 out <<
"\\attribution\n";
71 out <<
"\\page " << package.qdocModule <<
"-attribution-" << package.id
77 out <<
"\\meta {toc} {nonessential}\n";
79 out <<
"\\target " << package.id <<
"\n\n";
80 out <<
"\\title " << package.name;
81 if (!package.version.isEmpty())
82 out <<
", version " << package.version;
83 out <<
"\n\n\\brief " << package.license <<
"\n\n";
85 if (!package.description.isEmpty())
86 out << package.description <<
"\n\n";
88 if (!package.qtUsage.isEmpty())
89 out << package.qtUsage <<
"\n\n";
92 QStringList sourcePaths;
93 if (package.files.isEmpty()) {
94 sourcePaths << baseDir.relativeFilePath(package.path);
96 const QDir packageDir(package.path);
97 for (
const QString &filePath : package.files) {
98 const QString absolutePath = packageDir.absoluteFilePath(filePath);
99 sourcePaths << baseDir.relativeFilePath(absolutePath);
103 out <<
"The sources can be found in " << languageJoin(sourcePaths) <<
".\n\n";
106 const bool hasPackageVersion = !package.version.isEmpty();
107 const bool hasPackageDownloadLocation = !package.downloadLocation.isEmpty();
108 if (!package.homepage.isEmpty()) {
109 out <<
"\\l{" << package.homepage <<
"}{Project Homepage}";
110 if (hasPackageVersion)
113 if (hasPackageVersion) {
114 out <<
"upstream version: ";
115 if (hasPackageDownloadLocation)
116 out <<
"\\l{" << package.downloadLocation <<
"}{";
117 out << package.version;
118 if (hasPackageDownloadLocation)
125 if (!package.copyright.isEmpty())
126 copyright = package.copyright;
127 else if (!package.copyrightFileContents.isEmpty())
128 copyright = package.copyrightFileContents;
130 if (!copyright.isEmpty()) {
132 sourceCode(out, copyright);
135 if (isSpdxLicenseId(package.licenseId) && !package.licenseId.startsWith(
"LicenseRef-"_L1)
136 && package.licenseId !=
"NONE"_L1) {
137 out <<
"\\l{https://spdx.org/licenses/" << package.licenseId <<
".html}"
138 <<
"{" << package.license <<
"}.\n\n";
140 out << package.license <<
".\n\n";
143 for (
const QString &license : package.licenseFilesContents)
144 sourceCode(out, license);