Patch for KEditToolbar dnd support
Olivier Goffart
ogoffart at tiscalinet.be
Sun May 16 11:22:18 BST 2004
Le Dimanche 16 Mai 2004 00:28, Sandro Giessl a écrit :
> Hello,
>
> Would anyone mind reviewing the following patch? It adds drag&drop
> support to KEditToolbarWidget.
> http://sandro.giessl.com/files/kedittoolbar_dnd.diff
>
> Sorry, it's quite long. Basically what it does is:
> - Replace the KListViews with a subclass enabled for dnd using a custom
> QStoredDrag subclass.
> - Move the private list view mmbers to the d pointer, but keeps the old
> members. This hopefully keeps binary compatibility.
> - Some code to handle dropped() signals...
>
> Especially why I'm CCing to kde-core-devel is because I'm unsure about
> the DragObject stuff. For example, is it ok to simply choose a random
> "data/x-kde.toolbar.item" mime type name for the toolbar item data or
> is there anything to consider when creating a new mime type?
Nice patch.
Is it possible to imagine drag and dorp dirrectly on the toolbar ?
Anyway, i noticed something reading the patch:
> +void KEditToolbarWidget::slotDropped(KListView *list, QDropEvent *e,
> QListViewItem *after)
> +{
> + ToolbarItem *item = new ToolbarItem(d->m_inactiveList);
> + if(!ToolbarItemDrag::decode(e, *item))
> + return;
I think the *item should be deleted before the return. no ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040516/b71914bc/attachment.sig>
More information about the kde-core-devel
mailing list