Bug#720950: qt4-doc-html: search does not work: missing file scripts/jquery.js
Package: qt4-doc-html
Version: 4:4.8.5+dfsg-2
Severity: normal
Dear Maintainer,
when viewing /usr/share/qt4/doc/html/index.html in a web browser, the search box
does not work. There a two reasons which cause this:
* The page tries to load the missing file
/usr/share/qt4/doc/html/scripts/jquery.js. Since the package already depends
on libjs-jquery, only the appropriate symlink from /usr/share/qt4/doc/html/scripts/jquery.js to
/usr/share/javascript/jquery/jquery.js is missing.
* The much bigger reason is that the search box relies on an external search
service, whose URL is determined by looking at location.host (see
scripts/functions.js, line 232), which of course is empty if the page is
viewed over a file:// URL. However, even when viewing the page via
http://localhost, the search URL would expand to
http://localhost/nokiasearch/GetDataServlet, which is also non-existing, and I
don't suppose it is provided by any Debian package. Also, the online search on
the Qt project homepage currently relies on Google.
Since the HTML documentation is mostly intended for offline usage, and I mostly
use it when I don't have Internet access, I would like a JavaScript-based search
engine which loads the search index from disk. However, I notice that the HTML
documentation is auto-generated by qdoc, so this solution is probably not the
simplest. Also, qdoc is instructed to build online documentation in
qt4-x11-4.8.5+dfsg/doc/doc.pri, so eventually, it is probably best to let qdoc
generate offline documentation and thus removing the search box from the files.
For the latter solution, see the attached patch, which might probably work, but
is untested.
-- System Information:
Debian Release: jessie/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (1, 'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.10-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages qt4-doc-html depends on:
ii libjs-jquery 1.7.2+dfsg-3
qt4-doc-html recommends no packages.
Versions of packages qt4-doc-html suggests:
ii chromium [www-browser] 28.0.1500.95-3
ii conkeror [www-browser] 1.0~~pre+git130522-2
ii epiphany-browser [www-browser] 3.4.2-2.1
ii iceweasel [www-browser] 23.0-2
ii libqt4-dev 4:4.8.5+dfsg-2
ii qt-assistant-compat 4.6.3-6
ii w3m [www-browser] 0.5.3-11
-- no debconf information
Author: Roland Hieber <rohieb@rohieb.name>
Subject: Build HTML documentation suited for offline usage
Currently, the generated documentation includes a search box which relies on an
external search service, and which does not work for local usage. Therefore, the
generated search box does not work and confuses users, so it is best to build
the documentation in offline format which does not include the search box, but
does also not confuse users.
Index: qt4-x11-4.8.5+dfsg/doc/doc.pri
===================================================================
--- qt4-x11-4.8.5+dfsg.orig/doc/doc.pri 2013-06-07 07:16:49.000000000 +0200
+++ qt4-x11-4.8.5+dfsg/doc/doc.pri 2013-08-26 16:49:44.000000000 +0200
@@ -35,7 +35,7 @@
EXAMPLESMANIFESTTARGET = $$replace(EXAMPLESMANIFESTTARGET, "/", "\\")
DEMOSMANIFESTTARGET = $$replace(DEMOSMANIFESTTARGET, "/", "\\")
}
-ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf
+ADP_DOCS_QDOCCONF_FILE = qt-build-docs.qdocconf
DITA_DOCS_QDOCCONF_FILE = qt-ditaxml.qdocconf
QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \
linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \
Reply to: