summaryrefslogtreecommitdiffstats
path: root/src/htmlgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-11-15 23:24:58 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-11-15 23:26:58 (GMT)
commit9b7e4ffb6c5f7534e4ba11d5798b4eb74d4a2a70 (patch)
treecde604068dbe270c51a6790189c30594e0d78b70 /src/htmlgen.cpp
parente986e0039de21791bd1fbb1f59b13f58c4a46324 (diff)
downloadDoxygen-9b7e4ffb6c5f7534e4ba11d5798b4eb74d4a2a70.zip
Doxygen-9b7e4ffb6c5f7534e4ba11d5798b4eb74d4a2a70.tar.gz
Doxygen-9b7e4ffb6c5f7534e4ba11d5798b4eb74d4a2a70.tar.bz2
Fixed several Coverity warnings
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r--src/htmlgen.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index c4bd80a..3bb6792 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -737,17 +737,24 @@ void HtmlGenerator::init()
if (f.open(IO_WriteOnly))
{
const Resource *res = mgr.get("dynsections.js");
- FTextStream t(&f);
- t << (const char *)res->data;
- if (Config_getBool("SOURCE_BROWSER") && Config_getBool("SOURCE_TOOLTIPS"))
+ if (res)
+ {
+ FTextStream t(&f);
+ t << (const char *)res->data;
+ if (Config_getBool("SOURCE_BROWSER") && Config_getBool("SOURCE_TOOLTIPS"))
+ {
+ t << endl <<
+ "$(document).ready(function() {\n"
+ " $('.code,.codeRef').each(function() {\n"
+ " $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
+ " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
+ " });\n"
+ "});\n";
+ }
+ }
+ else
{
- t << endl <<
- "$(document).ready(function() {\n"
- " $('.code,.codeRef').each(function() {\n"
- " $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
- " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
- " });\n"
- "});\n";
+ err("Resource dynsections.js not compiled in");
}
}
}
@@ -896,7 +903,6 @@ void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &relPath)
t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
t << " onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n";
- writeSearchCategories(t);
t << "</div>\n";
t << "\n";
t << "<!-- iframe showing the search results (closed by default) -->\n";