|
|
@ -362,16 +362,8 @@ void UBLibraryWidget::dropEvent(QDropEvent *event) |
|
|
|
if (pMimeData->hasUrls()){ |
|
|
|
if (pMimeData->hasUrls()){ |
|
|
|
QList<QUrl> urlList = pMimeData->urls(); |
|
|
|
QList<QUrl> urlList = pMimeData->urls(); |
|
|
|
for (int i = 0; i < urlList.size() && i < 32; ++i){ |
|
|
|
for (int i = 0; i < urlList.size() && i < 32; ++i){ |
|
|
|
QString filePath; |
|
|
|
|
|
|
|
QString crntPath = urlList.at(i).toString(); |
|
|
|
QString crntPath = urlList.at(i).toString(); |
|
|
|
|
|
|
|
mLibraryController->importItemOnLibrary(crntPath); |
|
|
|
if(crntPath.startsWith("file:") || crntPath.startsWith("/")){ |
|
|
|
|
|
|
|
filePath = QUrl(crntPath).toLocalFile(); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
filePath = crntPath; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLibraryController->importItemOnLibrary(filePath); |
|
|
|
|
|
|
|
bDropAccepted = true; |
|
|
|
bDropAccepted = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|