Implement drag and drop for Trash applet
Review Request #124112 - Created June 16, 2015 and submitted
|Kai Uwe Broulik|
This allows to drag files onto the trash applet to trash them.
Also, the code is cleaned up a bit and it is given a sensible minimum size (so the label always fits) as well as the query dialog has been replaced by the standard KIO dialog.
Trashed one or multiple files on both desktop and panel.
When I dismiss the message box, however, Plasma will create an applet for the file dragged. How can I tell it I accepted the drop? Also, it crashes in Client::~Client() () from /usr/lib/x86_64-linux-gnu/libQPulseAudioPrivate.so at times after dismissing the dialog.
|maybe an hasurls here too?||Marco Martin|
Only accept local file drops, filter out non-locals and only highlight when drag is acceptable. There's no way to "reject" a drop.
Revision 2 (+181 -31)
QFile::isWritable() is confusing, it falls back to QIODevice::isWritable(), which tells you whether the object is /opened for writing/, not if you're allowed to write. The right API to use here is QFileInfo::isWritable(), which should do the right thing.
minor one, but please add spaces around the ==
spaces around comparison ops
I think we still want to delete this one somewhere?