Commit e681470c authored by shibakaneki's avatar shibakaneki

Fixed a drop issue from the web in the Library widget on Ubuntu. Need to test on Mac & Windows now

parent e2e99419
......@@ -364,10 +364,16 @@ void UBLibraryWidget::dropEvent(QDropEvent *event)
QList<QUrl> urlList = pMimeData->urls();
for (int i = 0; i < urlList.size() && i < 32; ++i){
QString filePath;
QString crntPath = urlList.at(i).toString();
#ifdef Q_WS_MACX
filePath = QUrl(urlList.at(i)).toString();
#else
filePath = QUrl(urlList.at(i).path()).toLocalFile();
if(crntPath.startsWith("file:") || crntPath.startsWith("/")){
filePath = QUrl(crntPath).toLocalFile();
}else{
filePath = crntPath;
}
#endif
mLibraryController->importItemOnLibrary(filePath);
bDropAccepted = true;
......
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