Commit 6e152e70 authored by Jan Möbius's avatar Jan Möbius

Drag and Drop for Windows

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8200 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d4f89eb3
......@@ -161,6 +161,16 @@ void CoreWidget::dropEvent ( QDropEvent* _event ) {
PluginFunctions::setActiveExaminer(examinerId);
if ( _event->mimeData()->hasUrls() ) {
QList<QUrl> urls = _event->mimeData()->urls();
for ( int j = 0 ; j < urls.size() ; ++j ) {
emit log(LOGWARN , tr("Dropped URL: %1").arg(urls[j].toLocalFile()));
emit dragOpenFile(urls[j].toLocalFile());
}
return;
}
if ( _event->mimeData()->hasFormat ( "text/plain" ) ) {
QString view ( _event->mimeData()->text() );
......@@ -176,13 +186,15 @@ void CoreWidget::dropEvent ( QDropEvent* _event ) {
if ( view.left ( 7 ) == QString("file://") ) {
_event->acceptProposedAction();
emit dragOpenFile(view.remove(0,7));
return;
}
emit log(LOGERR , tr("Unknown drop event! Unable to handle the dropped data! Received data: %1").arg(view));
}
emit log(LOGERR , tr("Unknown drop event!"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment