summaryrefslogtreecommitdiffstats
path: root/src/index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.cpp')
-rw-r--r--src/index.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/index.cpp b/src/index.cpp
index 7e494f8..390fc55 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2605,6 +2605,7 @@ void writeJavascriptSearchIndex()
if (outFile.open(IO_WriteOnly))
{
QTextStream t(&outFile);
+ t.setEncoding(QTextStream::UnicodeUTF8);
t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\""
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
t << "<html><head><title></title>" << endl;
@@ -2641,12 +2642,17 @@ void writeJavascriptSearchIndex()
<< "class=\"SRSymbol\" ";
if (!d->getReference().isEmpty())
{
- QCString *dest;
- t << "doxygen=\"" << d->getReference() << ":../";
- if ((dest=Doxygen::tagDestinationDict[d->getReference()])) t << *dest << "/";
- t << "\" ";
- t << "href=\"../";
- if ((dest=Doxygen::tagDestinationDict[d->getReference()])) t << *dest << "/";
+ QCString *dest = Doxygen::tagDestinationDict[d->getReference()];
+ if (dest && *dest=='.') // relative path (see bug 593679)
+ {
+ t << "doxygen=\"" << d->getReference() << ":../"
+ << *dest << "/\" href=\"../" << *dest << "/";
+ }
+ else if (dest) // absolute path
+ {
+ t << "doxygen=\"" << d->getReference() << ":"
+ << *dest << "/\" href=\"" << *dest << "/";
+ }
}
else
{
@@ -2842,6 +2848,7 @@ void writeJavascriptSearchIndex()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
t << "// Search script generated by doxygen" << endl;
t << "// Copyright (C) 2009 by Dimitri van Heesch." << endl << endl;
t << "// The code in this file is loosly based on main.js, part of Natural Docs," << endl;
@@ -2892,6 +2899,7 @@ void writeJavascriptSearchIndex()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
t << "<html><head><title></title>" << endl;