refactoring in pageview class
habruening
hb_kde at brueningserver.de
Mon Feb 13 20:13:55 UTC 2017
Hi Okular developers!
I am trying to start with KDE development. It is my first open source
initiative. I think, Okular is an interesting point to start. My first
patch (https://git.reviewboard.kde.org/r/129773/) was not accepted.
Anyway, I carry on.
I think, I could try some code cleanup work. So please let me know if
the following idea is welcome.
When I see pageview.cpp, there is an object PageViewPrivate *d.
Obviously it is PIMPL. But I cannot see a private implementation.
Everything is done in PageView. PageViewPrivate is just a data class. I
would like to make PageViewPrivate really a private implementation. I
don't know yet how far I can separate PageView and PageViewPrivate. But
I think they could have individual responsibles. One is the interface to
the outside world and the other is all the implementation details.
Following the single-responsibility-principle, I cannot believe that
pageview.cpp must have 5000 lines of code.
But one question: Is there a technical reason for hiding all the data in
a d-pointer? The code looks as if the author did not want to use a
d-pointer but was forced to it.
Best regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20170213/8a4e837d/attachment.html>
More information about the Okular-devel
mailing list