14 #include <QHelpEngine>
18 #include <QDesktopServices>
23 : QTextBrowser(parent), mEngine(engine)
29 if (mEngine->engine())
31 QMap<QString, QUrl> links = mEngine->engine()->linksForIdentifier(
id);
41 if (name.scheme() ==
"qthelp")
42 QTextBrowser::setSource(name);
45 QDesktopServices::openUrl(name);
52 connect(mEngine.get(), SIGNAL(keywordActivated(QString)),
this, SLOT(
showHelpForKeyword(
const QString&)));
55 QVariant HelpBrowser::loadResource(
int type,
const QUrl &name)
57 if (type < 4 && mEngine->engine())
60 if (name.isRelative())
61 url = source().resolved(url);
63 if (url.scheme() ==
"qthelp")
64 return QVariant(mEngine->engine()->fileData(url));
66 return QTextBrowser::loadResource(type, url);