Review Request: drag to desktop/panel support in kickoff

Aaron Seigo aseigo at kde.org
Mon Feb 25 21:31:57 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/220/#review194
-----------------------------------------------------------


not sure off-hand what the issue with the search mdoel would be, but there are a few things to probably clean up in the patch as is...



/trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffabstractmodel.cpp
<http://mattr.info/r/220/#comment132>

    please watch the coding style: braces on single liners too =)



/trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffabstractmodel.cpp
<http://mattr.info/r/220/#comment131>

    what is stream for?



/trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffmodel.cpp
<http://mattr.info/r/220/#comment134>

    stream again =)



/trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffmodel.cpp
<http://mattr.info/r/220/#comment133>

    i don't think you need this line since urls.populateMimeData sets the mimetype for you. there are standard mimetypes for uri lists, as well.



/trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/flipscrollview.cpp
<http://mattr.info/r/220/#comment135>

    might be worth splitting this into a few lines for readability? e.g.
    
    QModelIndex idx = selectionModel()->selectedIndexes().first();
    QIcon icon = idx.data(Qt::DecorationRole).value<QIcon>();
    drag->setPixmap(icon..pixmap(IconSize(KIconLoader::Desktop));


- Aaron


On 2008-02-25 12:59:30, Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://mattr.info/r/220/
> -----------------------------------------------------------
> 
> (Updated 2008-02-25 12:59:30)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> This add the possibility to drag items from kickoff to dektop or to panel, by making the models descend from a KickoffModel class that adds the support to drag and drop.
> It works with items in all tabs (except for applications categories and the leave tab, wich doesn't make sense)
> It has the problem that it has three carbon copy classes KickoffModel, KickoffProxyModel and KickoffAbstractModel, that kinda sucks :( is there a way to do it a little bit better?
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/CMakeLists.txt
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/applicationmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/applicationmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/favoritesmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/favoritesmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffabstractmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffabstractmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffproxymodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/kickoffproxymodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/recentlyusedmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/recentlyusedmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/searchmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/searchmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/systemmodel.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/systemmodel.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/flipscrollview.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/flipscrollview.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/urlitemview.cpp
> 
> Diff: http://mattr.info/r/220/diff
> 
> 
> Testing
> -------
> 
> tried to drag on desktop and panel various items from various tabs
> the only problem is in the search result, when i try to drag an item nothing happens and
> "Can't select indexes from different model or with different parents"
> is written on standard output
> 
> 
> Thanks,
> 
> Marco
> 
>



More information about the Panel-devel mailing list