Bug 440594 - Make qtwebengine optional for kmymoney
Summary: Make qtwebengine optional for kmymoney
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmymoney
Classification: Applications
Component: buildsystem (show other bugs)
Version: 5.1.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-04 17:00 UTC by Matthew Schultz
Modified: 2021-08-09 18:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2021-08-04 17:00:16 UTC
SUMMARY
I was wondering if it would be possible to make qtwebengine optional but not make the obsolete qtwebkit required as a consequence of disabling qtwebengine.  I run Gentoo and to install kmymoney, I have to compile qtwebengine because it's required and qtwebkit is currently deprecated and being removed.  qtwebengine takes an enormous amount of time to compile and it would be nice to avoid installing it especially if the functionality it provides in kmymoney is not something I need.


STEPS TO REPRODUCE
1. -DENABLE_WEBENGINE=OFF

OBSERVED RESULT
Disabling qtwebengine makes qtwebkit required and it looks for that library instead: 

CMake Error at CMakeLists.txt:224 (find_package):
  By not providing "FindKF5WebKit.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "KF5WebKit", but CMake did not find one.

  Could not find a package configuration file provided by "KF5WebKit" with
  any of the following names:

    KF5WebKitConfig.cmake
    kf5webkit-config.cmake

  Add the installation prefix of "KF5WebKit" to CMAKE_PREFIX_PATH or set
  "KF5WebKit_DIR" to a directory containing one of the above files.  If
  "KF5WebKit" provides a separate development package or SDK, be sure it has
  been installed.



EXPECTED RESULT
Don't require qtwebkit if qtwebengine is not enabled


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.21.5
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.15.2
Comment 1 Thomas Baumgart 2021-08-06 16:05:28 UTC
Currently it's an either one or the other. One of the two is needed for the home page to display and the reports to show up. Unless, someone rewrites these parts to use different technologies there is no chance for your request.
Comment 2 Matthew Schultz 2021-08-06 16:55:47 UTC
(In reply to Thomas Baumgart from comment #1)
> Currently it's an either one or the other. One of the two is needed for the
> home page to display and the reports to show up. Unless, someone rewrites
> these parts to use different technologies there is no chance for your
> request.

Bummer.  Thanks for the response.
Comment 3 Ralf Habacker 2021-08-06 18:53:44 UTC
(In reply to Matthew Schultz from comment #2)
> Unless, someone rewrites these parts to use different technologies
> there is no chance for your request.

QTextBrowser https://doc.qt.io/qt-5/qtextbrowser.html#details may be an alternative.
Comment 4 Ralf Habacker 2021-08-09 13:49:04 UTC
(In reply to Ralf Habacker from comment #3)
> (In reply to Matthew Schultz from comment #2)
> > Unless, someone rewrites these parts to use different technologies
> > there is no chance for your request.
> 
> QTextBrowser https://doc.qt.io/qt-5/qtextbrowser.html#details may be an
> alternative.

Since kmymoney uses the webengine/webkit in several places (check printing, reconciliation report, reports, homeview and kmymoneywebpage), it would make sense to extend the already existing MyQWebEnginePage class to a new class e.g. MyWebPage or MyMoneyWebPage and use this class in the other places.
Comment 5 Dawid Wróbel 2021-08-09 18:36:05 UTC
Ralf, for the record, I ported check printing in master to use QTextBrowser. I imagine our other usages of it don't require any advanced HTML/CSS over what QTextBrowser supports, so it may be worth looking into porting everything else, too.
Comment 6 Thomas Baumgart 2021-08-09 18:44:32 UTC
MyQWebEnginePage is either derived from qtwebengine or qtwebkit based classes whichever is selected. Simply extending them sure does not solve the original problem.