Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22695 → Rev 22694

/trunk/Scribus/scribus/ui/filedialogeventcatcher.cpp
57,32 → 57,34
break;
}
}
else if (e->type() == QEvent::DragEnter)
{
e->accept();
return true;
}
else if (e->type() == QEvent::Drop)
{
QDropEvent *dropEvent = static_cast<QDropEvent *>(e);
if (dropEvent)
else
if (e->type() == QEvent::DragEnter)
{
if (dropEvent->mimeData()->hasFormat("text/uri-list"))
e->accept();
return true;
}
else
if (e->type() == QEvent::Drop)
{
QString fileUrl;
QList<QUrl> fileUrls = dropEvent->mimeData()->urls();
if (fileUrls.count() > 0)
QDropEvent *dropEvent = static_cast<QDropEvent *>(e);
if (dropEvent)
{
fileUrl = fileUrls[0].toLocalFile();
if (fileUrls[0].isLocalFile())
if ( dropEvent->mimeData()->hasFormat("text/uri-list"))
{
emit dropLocation(fileUrl);
QString fileUrl;
QList<QUrl> fileUrls = dropEvent->mimeData()->urls();
if (fileUrls.count()>0)
{
fileUrl = fileUrls[0].toLocalFile();
if (fileUrls[0].isLocalFile())
{
emit dropLocation(fileUrl);
}
}
}
}
e->accept();
return true;
}
}
e->accept();
return true;
}
return QObject::eventFilter(o, e);
}