Reactivate wikipedia applet
ClosedPublic

Authored by malteveerman on Mar 15 2018, 10:21 AM.

Details

Summary

This patch reactivates the wikipedia applet. It also puts all applet icons into their respective kpackages instead of installing them to the application data folder. For the wikipedia icon I took this icon from the wikipedia webpage. It is under the CC BY-SA 3.0 license. I hope that is all right.
The applet requires QtWebEngine which I made an optional dependency.

Diff Detail

Repository
R181 Amarok
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
malteveerman requested review of this revision.Mar 15 2018, 10:21 AM
malteveerman created this revision.
markey requested changes to this revision.Mar 18 2018, 6:43 PM
markey added a subscriber: markey.

Fails to build here:

/home/mark/devel/src/amarok/src/context/AppletModel.cpp: In member function ‘QUrl Context::AppletModel::imageUrl(const QString&, const QString&)’:
/home/mark/devel/src/amarok/src/context/AppletModel.cpp:217:24: error: ‘class Context::AppletPackage’ has no member named ‘fileUrl’; did you mean ‘files’?

return package.fileUrl("images", imageName);
               ^~~~~~~
               files

src/CMakeFiles/amaroklib.dir/build.make:844: recipe for target 'src/CMakeFiles/amaroklib.dir/context/AppletModel.cpp.o' failed
make[2]: * [src/CMakeFiles/amaroklib.dir/context/AppletModel.cpp.o] Error 1
make[2]:
* Waiting for unfinished jobs....
CMakeFiles/Makefile2:6852: recipe for target 'src/CMakeFiles/amaroklib.dir/all' failed
make[1]: * [src/CMakeFiles/amaroklib.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make:
* [all] Error 2

This revision now requires changes to proceed.Mar 18 2018, 6:43 PM

The method is only available since kpackage-5.42.0.

Changed fileUrl() to filePath(). Builds now with older KPackage.

markey requested changes to this revision.Mar 20 2018, 4:12 AM

Generally this works for me now, but there are two more issues that I found:

If the optional Qt5WebEngine is not found, we get a CMake error anyway:

-- The following OPTIONAL packages have not been found:

 * Qt5WebEngine
   Needed by the wikipedia applet
 * LibLastFm, Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists, <http://cdn.last.fm/client/liblastfm-1.0.3.tar.gz>
 * Mygpo-qt5 (required version >= 1.0.9), A Qt/C++ library wrapping the gpodder.net Webservice., <http://wiki.gpodder.org/wiki/Libmygpo-qt>
   Synchronize podcast subscriptions with gpodder.net

-- The following REQUIRED packages have not been found:

 * Qt5 (required version >= 5.8.0)

CMake Error at /usr/share/cmake-3.9/Modules/FeatureSummary.cmake:459 (message):
  feature_summary() Error: REQUIRED package(s) are missing, aborting CMake
  run.
Call Stack (most recent call first):
  CMakeLists.txt:260 (feature_summary)

If Qt5WebEngine is found, but the qml-module-qtwebengine is not installed, then the build works, but at runtime the Wikipedia applet will be empty:

file:///home/mark/kde/share/kpackage/amarok/org.kde.amarok.wikipedia/contents/ui/main.qml:20:1: module "QtWebEngine" is not installed
This revision now requires changes to proceed.Mar 20 2018, 4:12 AM

Fixed issue with missing optional dependency Qt5WebEngine.

I managed to fix the issue with missing QtWebEngine but I'm not sure what I can do about the missing qml module. Isn't it part of the WebEngine package?

This revision was not accepted when it landed; it landed in state Needs Review.Mar 20 2018, 3:57 PM
Closed by commit R181:7a63540fc23a: Reactivate wikipedia applet (authored by malteveerman, committed by markey). · Explain Why
This revision was automatically updated to reflect the committed changes.