[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    RE: XDND decode sequence
From:       "Glen Parker" <glenebob () nwlink ! com>
Date:       1999-07-26 0:41:21
[Download RAW message or body]

> In kwrite, I can do a drop. But when checking the drop (canDecode() in
> void KWriteView::dropEvent( QDropEvent *event ) the code is made such
> that it test for QTextDrag::canDecode(event) first and then
> QUrlDrag::canDecode(event). What happens is that the
> QTextDrag::canDecode(event) returns True, so that the dragged url
> is printed as
> text in the editor, not the file contents.

Yeah, I know ;-)

> Should one always test for QUrlDrag::canDecode() first and then
> QTextDrag::canDecode() or is this an (Qt) error? When I switched the

My first reaction was that it was a Qt bug (the code worked when I wrote it,
before Qt2.0 final), but either way I think it makes more sense to check
QUrlDrag::canDecode() first, since that is the more specific case.  You
should commit your change if you haven't already.

BTW, you might check kedit also, IIRC it was written the same way.

> sequence (Url first, then text) in kwrite, I could open the file. A drop
> from the dragdrop Qt-example works as well (matched on text)

 --
Glen Parker
glenebob@nwlink.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic