yacreader icon indicating copy to clipboard operation
yacreader copied to clipboard

Get rid of legacy software pictureflow

Open selmf opened this issue 5 years ago • 1 comments

The implementation of pictureflow we're using is very old and suffers from multiple issues, including dead code for Qt2 and Qt3 as well as custom modifications. At this point, it is effectively a dead end in which as little work as possible should be invested.

As we still need a fallback for systems without proper OpenGL support this leaves the question what to do with the situation.

@vedgy has suggested in #56 to use a newer Qt4 implementation by the original author or a modified Qt4 example provided by the Qt company. This however is still outdated code, so it is not ideal for inclusion.

As it turns out, the pictureflow is still included in Qt's examples and there is also an actively maintained variant used by Calibre.

https://github.com/qt/qtsvg/tree/dev/examples/svg/embedded/fluidlauncher https://github.com/kovidgoyal/calibre/blob/master/src/calibre/gui2/pictureflow/pictureflow.h

I have not dug deep enough in the pictureflow code to say how much our version diverged from these, but goal should be to be as vanilla as possible.

selmf avatar Sep 04 '20 11:09 selmf

So I did a first analysis of our pictureflow compared to the Qt example and the last release by the original author. This is what I found out:

  • Our pictureflow was modified to add some features:
    • Bookmark symbols
    • Different flow styles
    • Changing flow direction
    • Frameskip mechanism
  • The Qt flow and the original flow were forked at a point before our flow was modified for YACReader uses
  • Both our flow and the original flow have more features than Qt flow
  • The Qt flow has seen some refactoring work to keep up with the changes in Qt

For cleaning up our software flow code this has these consequences:

  • We can't use the Qt flow as the codebase is too much diverged
  • The latest release of the original flow should be an improvement, but we need to port our features
  • We probably can use the Qt flow as a guideline to clean up and modernize the resulting code

selmf avatar Sep 05 '20 20:09 selmf