Dependency on the deprecated libraries is removed (I hope). Includes in the affected files are sorted alphabetically.
Details
- Reviewers
cfeck - Group Reviewers
KDE Edu - Commits
- R334:551b41c77a11: Port KmPlot away from deprecated KStatusBar and kdelibs4support at all
- Create some plot (e.g. y=x^2 in the Cartesian coordinates).
- Move the mouse pointer into the plot area and left-click on the curve.
- Move the pointer to x=0.
- Make sure that all labels on the status bar are working again (function name does not work in the unpatched version).
- Try to export the image, save the plot file, add a parameter and animate the plot, whatever you want... All should work as expected.
Diff Detail
- Repository
- R334 KmPlot
- Lint
Lint Skipped - Unit
Unit Tests Skipped
CMakeLists.txt | ||
---|---|---|
21 ↗ | (On Diff #43402) | #include <KIconLoader> (transformed from #include <kiconloader.h>). It compiles and runs without it. I removed the dependency in the updated version of the patch. |
kmplot/kmplot.cpp | ||
---|---|---|
268 ↗ | (On Diff #43402) | Did you actually test this assert? QList indexes start with 0, so if I understand it correctly, it would 'crash' with debugging enabled. |
Checking the previous statusbar code, the id's have a range of 1 ... 4, so there should be 4 sections at list index 0 ... 3, accessed by at(id - 1). The current patch adds 5 sections, and label at index 0 is never used.
I have not tested the patch, but the code to keep the status bar items at fixed sizes was removed, and I fear that hovering over the graphs makes the items all jump around due to sizes changing. Correct?
Yes, it is correct. But there is no jumping. First labels are coordinates, they do not change much in size (I can record a screencast if you like to confirm). The other two labels are jumping in the same manner as in the unpatched version. The original behavior can be easily mimicked by adding several lines of ugly code to asses the width of 16 characters and a condition.
Yes, one label is empty all the time. The code is simpler, I guess that's what we call "the progress" in the new version. Should it be changed to mimic the original by shifting index by one in all the files to remove this extra label?
Recreate alignment of the status bar labels to be identical with the unpatched version.
kmplot/kmplot.cpp | ||
---|---|---|
259–269 ↗ | (On Diff #43402) | Now that you have changed the enum, I would prefer for (int i = 0; i < SectionCount; ++i) and add a SectionCount last item in the enum. |