summaryrefslogtreecommitdiffstats
path: root/src/doxygen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-12-24 16:12:24 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-12-24 16:12:24 (GMT)
commitfe6ff0cfd058b1b09bf389dd2c20be317183e094 (patch)
tree2e3f5d0757e53645fc902d0a87aa44dfd31d2d4d /src/doxygen.cpp
parent0014470c309dccbc2ac72c527391039900b8cf3d (diff)
downloadDoxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.zip
Doxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.tar.gz
Doxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.tar.bz2
Release-1.7.2-20101224
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r--src/doxygen.cpp72
1 files changed, 53 insertions, 19 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index f229ded..124c980 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -672,6 +672,7 @@ static void buildFileList(EntryNav *rootNav)
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
gd->addFile(fd);
+ fd->makePartOfGroup(gd);
//printf("File %s: in group %s\n",fd->name().data(),s->data());
}
}
@@ -8554,34 +8555,66 @@ static void readTagFile(Entry *root,const char *tl)
}
//----------------------------------------------------------------------------
+static void copyFile(const QCString &src,const QCString &dest)
+{
+ QFile sf(src);
+ if (sf.open(IO_ReadOnly))
+ {
+ QFileInfo fi(src);
+ QFile df(dest);
+ if (df.open(IO_WriteOnly))
+ {
+ char *buffer = new char[fi.size()];
+ sf.readBlock(buffer,fi.size());
+ df.writeBlock(buffer,fi.size());
+ df.flush();
+ delete[] buffer;
+ }
+ else
+ {
+ err("error: could not write to file %s\n",dest.data());
+ }
+ }
+ else
+ {
+ err("error: could not open user specified file %s\n",src.data());
+ }
+}
+
static void copyStyleSheet()
{
QCString &htmlStyleSheet = Config_getString("HTML_STYLESHEET");
if (!htmlStyleSheet.isEmpty())
{
- QFile cssf(htmlStyleSheet);
- QFileInfo cssfi(htmlStyleSheet);
- if (cssf.open(IO_ReadOnly))
+ QFileInfo fi(htmlStyleSheet);
+ if (!fi.exists())
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+cssfi.fileName().data();
- QFile df(destFileName);
- if (df.open(IO_WriteOnly))
- {
- char *buffer = new char[cssf.size()];
- cssf.readBlock(buffer,cssf.size());
- df.writeBlock(buffer,cssf.size());
- df.flush();
- delete[] buffer;
- }
- else
- {
- err("error: could not write to style sheet %s\n",destFileName.data());
- }
+ err("Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet.data());
+ htmlStyleSheet.resize(0); // revert to the default
}
else
{
- err("error: could not open user specified style sheet %s\n",Config_getString("HTML_STYLESHEET").data());
- htmlStyleSheet.resize(0); // revert to the default
+ QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ copyFile(htmlStyleSheet,destFileName);
+ }
+ }
+}
+
+static void copyLogo()
+{
+ QCString &projectLogo = Config_getString("PROJECT_LOGO");
+ if (!projectLogo.isEmpty())
+ {
+ QFileInfo fi(projectLogo);
+ if (!fi.exists())
+ {
+ err("Project logo '%s' specified by PROJECT_LOGO does not exist!\n",projectLogo.data());
+ projectLogo.resize(0); // revert to the default
+ }
+ else
+ {
+ QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ copyFile(projectLogo,destFileName);
}
}
}
@@ -10340,6 +10373,7 @@ void generateOutput()
#endif
//if (Config_getBool("HTML_DYNAMIC_SECTIONS")) HtmlGenerator::generateSectionImages();
copyStyleSheet();
+ copyLogo();
if (!generateTreeView && Config_getBool("USE_INLINE_TREES"))
{
FTVHelp::generateTreeViewImages();