| Summary: | Kget Can not support Mozilla/firefox/netscape dropEvent | ||
|---|---|---|---|
| Product: | [Applications] kget | Reporter: | cjacker <cjacker> |
| Component: | general | Assignee: | KGet bugs <kget-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | l.lunak |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | kget mozilla support patch | ||
Created attachment 6988 [details]
kget mozilla support patch
This patch fix droptarget.cpp, kmainwidget.cpp and docking.cpp
also fix kget droptarget behavior, sometimes the drop window will stay below
other windows and will show a taskbar item.
This is a duplicate of bug #71084 (and therefore the QString part of the patch is not a proper solution and should be ignored). I'm leaving this bugreport open only because of the drop window part of the patch. This problem isn't anymore in KDE 3.4.1. |
Version: (using KDE KDE 3.2.92) Installed from: Compiled From Sources As we know, KGET can not support Mozilla/firefox/netscape drop in and download。 It can not get URL correctly, and will popup a Error MessageBox。 I had checked the source and tried to fix this problem. the problem is : void DropTarget::dropEvent(QDropEvent * event) function. Modified like this: void DropTarget::dropEvent(QDropEvent * event) { KURL::List list; QString str=NULL; QByteArray qb; if (KURLDrag::decode(event, list)) { kmain->addTransfers(list); } else { qb=event->encodedData("text/plain"); int url_length=qb.count(); str = QString(qb).left(url_length); kmain->addTransfer(str); } } then it works. I found that to use QString(QByteArry &) to construct a QString can not work correctly, so I calc the size of QByteArray and get the QString use left(url_length).