D8211: KDevelop/Documentation : support using QTextBrowser (WIP/PoC)

René J.V. Bertin noreply at phabricator.kde.org
Sun Oct 8 21:02:36 UTC 2017


rjvbb created this revision.
rjvbb added a reviewer: KDevelop.
rjvbb added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  I've long thought it overkill to embed an almost full-fledged webbrowser inside KDevelop just for browsing Qt help (and even more so for the simpler CMake docs and man pages).
  
  Qt's Assistant uses QtTextBrowser by default; I have been adapting its implementation to KDevelop's document viewer.
  
  This is a first working draft patch, to be considered a work-in-progress or even just a proof-of-concept. It can probably be optimised some more, but as far as I can tell it works well enough to peruse the documentation the way I would in an embedded viewer. In fact, I find it distracts less from the source (I normally use dedicated documentation viewers).
  
  Using QTextBrowser is implemented as a fallback, you have to disable WebEngine and WebKit support (or not have either component installed) to activate this mode. I'd prefer to add a build option for this, evidently.

TEST PLAN
  HTML rendering aside this seems to work as well as the QtWebKit-based mode. Links to different QtHelp sections don't work in either mode (e.g. the link to the QMake docs in the QtCore "Getting Started" section). I think that's simply a limitation of the QtHelp plugin design.
  
  If this is considered of interest I'd probably appreciate a more collaborative approach on this one, supposing it still needs a lot of work.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D8211

AFFECTED FILES
  kdevplatform/documentation/CMakeLists.txt
  kdevplatform/documentation/standarddocumentationview.cpp
  kdevplatform/documentation/standarddocumentationview.h
  plugins/qthelp/CMakeLists.txt
  plugins/qthelp/qthelpdocumentation.cpp
  plugins/qthelp/tests/CMakeLists.txt

To: rjvbb, #kdevelop
Cc: kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171008/ec6b708c/attachment.html>


More information about the KDevelop-devel mailing list