Review Request 122911: dolphin: SpaceInfoToolsMenu: introduce KMoreTools

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Fri Apr 24 14:16:18 BST 2015



> On April 17, 2015, 10:19 a.m., Emmanuel Pescosta wrote:
> > src/statusbar/spaceinfotoolsmenu.h, line 45
> > <https://git.reviewboard.kde.org/r/122911/diff/5/?file=359838#file359838line45>
> >
> >     Maybe make this class a menu factory?
> 
> Gregor Mi wrote:
>     What would be the advantage? (i.e. I don't know exactly what is meant)

Factory pattern http://www.oodesign.com/factory-pattern.html

The advantages are:
* Hides away the instantiation logic from the client
* Avoids client side changes when things in KMoreTools are changed/extended
* You can move it into KMoreTools -> We only need 3 loc in Dolphin and other applications can make use of it too

KMoreToolsMenuFactory factory;
QMenu menu = factory.create({"disk-usage", "disk-partitions"}, url);
menu.exec(QCursor::pos());


- Emmanuel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122911/#review79102
-----------------------------------------------------------


On April 18, 2015, 12:34 a.m., Gregor Mi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122911/
> -----------------------------------------------------------
> 
> (Updated April 18, 2015, 12:34 a.m.)
> 
> 
> Review request for Dolphin and Emmanuel Pescosta.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Moved from old dolphin repo (kde-baseapps, https://git.reviewboard.kde.org/r/122352/)
> 
> 
> Diffs
> -----
> 
>   src/statusbar/statusbarspaceinfo.cpp 127641e601d1468479ef925f9539ecd31dc12fb7 
>   src/statusbar/statusbarspaceinfo.h 326c419ab3dc709f5bc4ab23f73e727d1106b3a4 
>   src/statusbar/spaceinfotoolsmenu.cpp 40ca56e19ebec33518bae0c94dcb56318b473290 
>   src/statusbar/spaceinfotoolsmenu.h 3ca2e184f03b31d10d661c5a931644485ffc46e6 
> 
> Diff: https://git.reviewboard.kde.org/r/122911/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> less entries by default than before
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/04/10/77cb7101-49ae-4812-9958-373cc3961a73__less_entries_by_default_than_before.png
> more entries in submenu
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/04/10/64a2f205-2db1-4f39-a252-74832f8bb196__more_entries_in_submenu.png
> configure menu dialog
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/04/10/e0a46310-7090-4d95-a0c9-198d5783a5eb__configure_menu_dialog.png
> 
> 
> Thanks,
> 
> Gregor Mi
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20150424/e30ac5ec/attachment.htm>


More information about the kfm-devel mailing list