summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2014-01-24 14:22:46 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2014-01-24 14:22:46 -0600
commit123c26a0e95aa7672cb33ff29588ca22727d56df (patch)
tree862ea6cef6c795f5934c6a86413776cc43ec728f
parent90013d8150049d8faadb84957805443ea4398c3b (diff)
downloadtdelibs-123c26a0e95aa7672cb33ff29588ca22727d56df.tar.gz
tdelibs-123c26a0e95aa7672cb33ff29588ca22727d56df.zip
Add support for new default help handbook page for non-existent handbooks.
This partially resolves bug report 1839.
-rw-r--r--kdoctools/tdeio_help.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/kdoctools/tdeio_help.cpp b/kdoctools/tdeio_help.cpp
index fc40dd3fa..86fd71730 100644
--- a/kdoctools/tdeio_help.cpp
+++ b/kdoctools/tdeio_help.cpp
@@ -102,20 +102,34 @@ TQString HelpProtocol::lookupFile(const TQString &fname,
{
result = langLookup(path+"/index.html");
if (!result.isEmpty())
- {
+ {
KURL red( "help:/" );
red.setPath( path + "/index.html" );
red.setQuery( query );
redirection(red);
kdDebug( 7119 ) << "redirect to " << red.url() << endl;
redirect = true;
- }
+ }
else
- {
- unicodeError( i18n("There is no documentation available for %1." ).arg(path) );
- finished();
- return TQString::null;
- }
+ {
+ const TQString helpNotFound = "khelpcenter/helpnotfound/index.html";
+ if (!langLookup(helpNotFound).isEmpty())
+ {
+ KURL red;
+ red.setProtocol("help");
+ red.setPath(helpNotFound);
+ red.setQuery(query);
+ redirection(red);
+ kdDebug( 7119 ) << "redirect to " << red.url() << endl;
+ redirect = true;
+ }
+ else
+ {
+ unicodeError( i18n("There is no documentation available for %1." ).arg(path) );
+ finished();
+ return TQString::null;
+ }
+ }
} else
kdDebug( 7119 ) << "result " << result << endl;