summaryrefslogtreecommitdiffstats
path: root/src/docsets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docsets.cpp')
-rw-r--r--src/docsets.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 66ef115..bf589c4 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -71,7 +71,7 @@ void DocSets::initialize()
std::ofstream ts(mfName.str(),std::ofstream::out | std::ofstream::binary);
if (!ts.is_open())
{
- term("Could not open file %s for writing\n",mfName.data());
+ term("Could not open file %s for writing\n",qPrint(mfName));
}
ts << "DOCSET_NAME=" << bundleId << ".docset\n"
@@ -120,7 +120,7 @@ void DocSets::initialize()
std::ofstream ts(plName.str(),std::ofstream::out | std::ofstream::binary);
if (!ts.is_open())
{
- term("Could not open file %s for writing\n",plName.data());
+ term("Could not open file %s for writing\n",qPrint(plName));
}
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -154,7 +154,7 @@ void DocSets::initialize()
p->ntf.open(notes.str(),std::ofstream::out | std::ofstream::binary);
if (!p->ntf.is_open())
{
- term("Could not open file %s for writing\n",notes.data());
+ term("Could not open file %s for writing\n",qPrint(notes));
}
p->nts.setStream(&p->ntf);
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
@@ -172,7 +172,7 @@ void DocSets::initialize()
p->ttf.open(tokens.str(),std::ofstream::out | std::ofstream::binary);
if (!p->ttf.is_open())
{
- term("Could not open file %s for writing\n",tokens.data());
+ term("Could not open file %s for writing\n",qPrint(tokens));
}
p->tts.setStream(&p->ttf);
p->tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@@ -224,10 +224,10 @@ void DocSets::decContentsDepth()
}
void DocSets::addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
@@ -243,7 +243,7 @@ void DocSets::addContentsItem(bool isDir,
p->indentStack.top()=false;
p->nts << p->indent() << " <Node>\n";
p->nts << p->indent() << " <Name>" << convertToXML(name) << "</Name>\n";
- if (file && file[0]=='^') // URL marker
+ if (!file.isEmpty() && file[0]=='^') // URL marker
{
p->nts << p->indent() << " <URL>" << convertToXML(&file[1])
<< "</URL>\n";
@@ -251,16 +251,16 @@ void DocSets::addContentsItem(bool isDir,
else // relative file
{
p->nts << p->indent() << " <Path>";
- if (file && file[0]=='!') // user specified file
+ if (!file.isEmpty() && file[0]=='!') // user specified file
{
p->nts << convertToXML(&file[1]);
}
- else if (file) // doxygen generated file
+ else if (!file.isEmpty()) // doxygen generated file
{
p->nts << file << Doxygen::htmlFileExtension;
}
p->nts << "</Path>\n";
- if (file && anchor)
+ if (!file.isEmpty() && !anchor.isEmpty())
{
p->nts << p->indent() << " <Anchor>" << anchor << "</Anchor>\n";
}
@@ -269,7 +269,7 @@ void DocSets::addContentsItem(bool isDir,
}
void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
- const char *,const char *)
+ const QCString &,const QCString &)
{
if (md==0 && context==0) return;
@@ -477,7 +477,7 @@ void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
}
if (p->scopes.find(context->getOutputFileBase().str())==p->scopes.end())
{
- writeToken(p->tts,context,type,lang,scope,0,decl);
+ writeToken(p->tts,context,type,lang,scope,QCString(),decl);
p->scopes.insert(context->getOutputFileBase().str());
}
}
@@ -487,9 +487,9 @@ void DocSets::writeToken(TextStream &t,
const Definition *d,
const QCString &type,
const QCString &lang,
- const char *scope,
- const char *anchor,
- const char *decl)
+ const QCString &scope,
+ const QCString &anchor,
+ const QCString &decl)
{
t << " <Token>\n";
t << " <TokenIdentifier>\n";
@@ -504,14 +504,14 @@ void DocSets::writeToken(TextStream &t,
{
t << " <Type>" << type << "</Type>\n";
}
- if (scope)
+ if (!scope.isEmpty())
{
t << " <Scope>" << convertToXML(scope) << "</Scope>\n";
}
t << " </TokenIdentifier>\n";
t << " <Path>" << d->getOutputFileBase()
<< Doxygen::htmlFileExtension << "</Path>\n";
- if (anchor)
+ if (!anchor.isEmpty())
{
t << " <Anchor>" << anchor << "</Anchor>\n";
}
@@ -520,14 +520,14 @@ void DocSets::writeToken(TextStream &t,
{
t << " <Abstract>" << convertToXML(tooltip) << "</Abstract>\n";
}
- if (decl)
+ if (!decl.isEmpty())
{
t << " <DeclaredIn>" << convertToXML(decl) << "</DeclaredIn>\n";
}
t << " </Token>\n";
}
-void DocSets::addIndexFile(const char *name)
+void DocSets::addIndexFile(const QCString &name)
{
(void)name;
}