@@ -350,7 +350,7 @@ void Qhp::addContentsItem(bool /* isDir */, const QCString & name,
350350 blank << " <title>Validator / crawler helper</title>\n " ;
351351 blank << " <meta http-equiv=\" Content-Type\" content=\" text/xhtml;charset=UTF-8\" />\n " ;
352352 blank << " <meta http-equiv=\" X-UA-Compatible\" content=\" IE=11\" />\n " ;
353-
353+
354354 blank << " <meta name=\" generator\" content=\" Doxygen " + getDoxygenVersion () + " \" />\n " ;
355355 blank << " <meta name=\" viewport\" content=\" width=device-width, initial-scale=1\" />\n " ;
356356 blank << " </head>\n " ;
@@ -375,28 +375,17 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
375375 // md?md->name().data():"<none>",
376376 // qPrint(word));
377377
378- if (md) // member
378+ if (context && md) // member
379379 {
380- bool separateMemberPages = Config_getBool (SEPARATE_MEMBER_PAGES);
381- if (context==nullptr ) // global member
382- {
383- if (md->getGroupDef ())
384- context = md->getGroupDef ();
385- else if (md->getFileDef ())
386- context = md->getFileDef ();
387- }
388- if (context==nullptr ) return ; // should not happen
389380 QCString cfname = md->getOutputFileBase ();
390381 QCString argStr = md->argsString ();
391- QCString cfiname = context->getOutputFileBase ();
392382 QCString level1 = context->name ();
393383 QCString level2 = !word.isEmpty () ? word : md->name ();
394- QCString contRef = separateMemberPages ? cfname : cfiname;
395384 QCString anchor = !sectionAnchor.isEmpty () ? sectionAnchor : md->anchor ();
396385 QCString ref;
397386
398387 // <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/>
399- ref = makeRef (contRef , anchor);
388+ ref = makeRef (cfname , anchor);
400389 QCString id = level1+" ::" +level2;
401390 writeIndent (p->index ,3 );
402391 p->index << " <keyword name=\" " << convertToXML (level2 + argStr) << " \" "
0 commit comments