Review Request: FIXME part of quicklaunch
Sujith H
sujith.h at gmail.com
Thu May 7 07:55:41 CEST 2009
> On 2009-05-05 16:14:28, Aaron Seigo wrote:
> > trunk/KDE/kdebase/workspace/plasma/applets/quicklaunch/quicklaunchApplet.cpp, lines 379-381
> > <http://reviewboard.kde.org/r/649/diff/8/?file=6115#file6115line379>
> >
> > the easiest way i can think of doing this (even if its not super fast, which doesn't matter because there are small #s of items here):
> >
> > for (int i = 0; i < m_dialogLayout->count(); ++i) {
> > QGraphicsLayoutItem *item = m_dialogLayout->itemAt(i);
> > if (item->geometry().contains(pos)) {
> > m_dialogLayout->insertItem(dropedItem, i + 1);
> > break;
> > }
> > }
>
> wrote:
> dropItem is Plasma::IconWidget right? err thats again confusing :( And the insertItem would call addItem method of QGraphicsGridLayout.
>
> wrote:
> May I know how to get the droped item(or object)? Because dropApp method uses "QGraphicsSceneDragDropEvent *event".
>
> wrote:
> looking at the code, all you need to do is this:
>
> dropHandler(i + 1, event->mimeData());
The position used i.e, i+1, I think should be (i + 1 + m_visibleIcons). Else the issue is if I don't use m_visibleIcons, then :
If i is 0, then position becomes 1. And hence the dropedItem gets added in the applet not in the dialog box.
- Sujith
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/649/#review1070
-----------------------------------------------------------
On 2009-05-05 12:28:07, Sujith H wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/649/
> -----------------------------------------------------------
>
> (Updated 2009-05-05 12:28:07)
>
>
> Review request for Plasma and Aaron Seigo.
>
>
> Summary
> -------
>
> This patch is regarding the FIXME part of the quicklaunchApplet.cpp. I had added one more method named dropApp. Added the processDrop as per Aaron seigo.
>
>
> Diffs
> -----
>
> trunk/KDE/kdebase/workspace/plasma/applets/quicklaunch/quicklaunchApplet.h 963461
> trunk/KDE/kdebase/workspace/plasma/applets/quicklaunch/quicklaunchApplet.cpp 963461
>
> Diff: http://reviewboard.kde.org/r/649/diff
>
>
> Testing
> -------
>
> Done basic testing and it works.
>
>
> Thanks,
>
> Sujith
>
>
More information about the Plasma-devel
mailing list