Changeset View
Changeset View
Standalone View
Standalone View
navigatorappitem.cpp
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 100 | if ( mToc ) { | |||
---|---|---|---|---|---|
101 | return; | 101 | return; | ||
102 | } | 102 | } | ||
103 | 103 | | |||
104 | const QUrl url(entry()->url()); | 104 | const QUrl url(entry()->url()); | ||
105 | if ( url.scheme() == QLatin1String( "help" ) ) { | 105 | if ( url.scheme() == QLatin1String( "help" ) ) { | ||
106 | mToc = new TOC( this ); | 106 | mToc = new TOC( this ); | ||
107 | 107 | | |||
108 | qCDebug(KHC_LOG) << "Trying to build TOC for" << entry()->name(); | 108 | qCDebug(KHC_LOG) << "Trying to build TOC for" << entry()->name(); | ||
109 | mToc->setApplication( url.toString( QUrl::RemoveScheme | QUrl::RemoveFilename | QUrl::StripTrailingSlash ) ); | 109 | mToc->setApplication( url.toString( QUrl::RemoveScheme | QUrl::RemoveFilename | QUrl::StripTrailingSlash | QUrl::RemoveFragment) ); | ||
110 | QString doc = View::langLookup( url.path() ); | 110 | QString doc = View::langLookup( url.path() ); | ||
111 | // Enforce the original .docbook version, in case langLookup returns a | 111 | // Enforce the original .docbook version, in case langLookup returns a | ||
112 | // cached version | 112 | // cached version | ||
113 | if ( !doc.isNull() ) { | 113 | if ( !doc.isNull() ) { | ||
114 | int pos = doc.indexOf( QLatin1String( ".html" ) ); | 114 | int pos = doc.indexOf( QLatin1String( ".html" ) ); | ||
115 | if ( pos >= 0 ) { | 115 | if ( pos >= 0 ) { | ||
116 | doc.replace( pos, 5, QStringLiteral( ".docbook" ) ); | 116 | doc.replace( pos, 5, QStringLiteral( ".docbook" ) ); | ||
117 | } | 117 | } | ||
Show All 10 Lines |