KDE4todo #50

Will Entriken kde.org at 2006.phor.net
Fri Apr 28 01:47:28 BST 2006


Huge cleanup to kio::bookmarks

Summary:
* dptr is gone, the .h is slated for deletion
* KBookmarkManagerPrivate is gone, its members were promoted to KBookmarkManager
* RMB constructors are fixed so that:
* KBookmarkmenu, KBookmarkbar and RMB are decoupled/unfriended
* it compiles... with a million warnings about deprecation

Were all of these pointers and hashes and private magic classes all
used just to preserve binary compatibility while stuffing in more
member variables? If so, you think they would have a standard way of
doing that?

I would like to test this with something before committing it, is
kdeui ready for this yet?

Cheers,
Will Entriken


On 4/27/06, Daniel Teske <teske at squorn.de> wrote:
>
> > For the bookmark menu, I am using a slightly better constructor:
> > RMB(KBookmarkMenu *target)
> Well I'd say worse. RMB and KBookmarkMenu are too tightly coupled. RMB shouldn't directly access member variables of KBookmarkMenu.
>
> > I need to use the KBookmarkMenu * because (QMenu)
> > contextMenu->addAction(...) uses recv all over the place in
> > kbookmarkmenu.cc, so it's not as cool as the bookmarkbar solution.
> Well you have to set recv inside the other RMB constructor, too.
> Refactoring that part can wait a little bit. But it shouldn't use recv there.
>
> > As far as replacing all dPtrs: Without understanding much about the
> > code, I intend to replace them with QHashes. I think I'm starting to
> > understand this code, and at that, I would recommend that
> > KBookmarkMenu get a RMB *m_RMB and KBookmarkManager get a
> > KBookmarkManagerPrivate * m_kBookmarkManagerPrivate. What are your
> > thoughts here?
>
> Right. And then replace any rmbSelf(this) with m_rmb.
> And the constructor should then set his data and not that of rmbSelf(recv)
> When it's all done, dptrtemplate.h should be unused.
>
>  > Also, I'm making assumptions about KBookmarkMenu::d working the same
> > as KBookmarkBar::d. However, the former is in the header, but not
> > implemented !?!?!
>
> Right. KBookmarkMenuPrivate isn't defined anywhere. Uhm, I'd say bitrot. For now add the pointer to RMB to KBookmarkMenu
>
> > 2) use d->m_rmb instead of rmbSelf(this)
> Use m_rmb instead of rmbSelf(this). You'll need to add a declaration for m_rmb to KBookmarkMenu.
>
> daniel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bookmarkscleanup.patch
Type: application/octet-stream
Size: 17157 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060427/48997812/attachment.obj>
-------------- next part --------------
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


More information about the kde-core-devel mailing list