Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:42.3:Rings:2-TestDVD
khelpcenter5
khelpcenter-fallback-to-kde4-docs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File khelpcenter-fallback-to-kde4-docs.patch of Package khelpcenter5
diff --git a/toc.cpp b/toc.cpp index e293ae8..42653d1 100644 --- a/toc.cpp +++ b/toc.cpp @@ -84,7 +84,9 @@ void TOC::build( const QString &file ) { QFileInfo fileInfo( file ); QString fileName = fileInfo.absoluteFilePath(); - const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML"); + QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML"); + QStringList fallbackresourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/kde/HTML"); + resourceDirs.append(fallbackresourceDirs); QStringList::ConstIterator it = resourceDirs.begin(); QStringList::ConstIterator end = resourceDirs.end(); for ( ; it != end; ++it ) { diff --git a/view.cpp b/view.cpp index 2e86960..2ab76f1 100644 --- a/view.cpp +++ b/view.cpp @@ -115,6 +115,19 @@ QString View::langLookup( const QString &fname ) } } + // assemble the local KDE4 search paths + const QStringList localkde4Doc = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); + + // look up the different languages + for (int id=localkde4Doc.count()-1; id >= 0; --id) + { + QDir kde4d(QStringLiteral("%1/doc/KDE/HTML/").arg(localkde4Doc[id])); + + foreach(const QString& entry, kde4d.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { + search.append(kde4d.absoluteFilePath(entry+'/'+fname)); + } + } + // try to locate the file for (QStringList::ConstIterator it = search.constBegin(); it != search.constEnd(); ++it) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor