This patch changes KLook from dead to zombie mode. The bare minimum was done to
make it compile, and then some functionality was changed to make it actually
work in the brave new Qt5 world (for displaying text and video).
What does work:
- It can open images, play music, display text
- In theory it plays videos, though resizing doesn't work so part of the video
is not displayed
- KLook can be started from dolphin by pressing space
What doesn't work:
- The media control is broken
- Cannot scroll text
- Okular/PDF support
- Videos are not displayed correctly, as stated above
- When started from Dolphin, KLook always opens the first item in the directory, instead of the currently selected one (as the handling of the -i parameter is broken)
- As stated above, -i is not correctly handled, as KUniqueApplication::newInstance is apparently not called on the initial start of the application (only on recurring starts). Should be ported away from KUniqueApplication anway
- If KLook is started while an instance is already running, many things break: For instance, the current item is treated as an image
What needs to be done:
- The code needs some general cleanup
- It needs to be ported away from KDELibs4Support
- Video and Text have lost functionality, and don't really work. This should be
fixable with a bit effort.
- Embedding QWidgets into QML was clunky in the 1.0 days, and is just not
possible with the SceneGraph so far. That means anything using
QGraphicsProxyWidget needs to be replaced. Luckily, by using already existing
components, Video and Text don't need to depend on QWidgets (though for now
they lost some functionality/are buggy).
In the current framework, it will however be impossible to embed a KPart, so
the Okular integration is a no-go. It might be possible to use Poppler
directly and render into a QQuickPaintedItem. Alternatively, if KLook had a
QWidget at the top level, and would embed the QQuickView, we might be able to
use KPart.
- There are some custom QML elements, which can most likely be replaced with
equivalents from Controls 2 or Kirigami
- Lastly, some visual overhaul might be a good idea (and for that, some input from VDG might be useful)
Nothing was tested regarding embedding, or that dolphin patch. (not sure what the use case for this was anyway)