| 189 | } |
| 190 | |
| 191 | bool InfoComicsView::canDropUrls(const QList<QUrl> &urls, Qt::DropAction action) |
| 192 | { |
| 193 | if (action == Qt::CopyAction) { |
| 194 | QString currentPath; |
| 195 | for (const auto &url : urls) { |
| 196 | // comics or folders are accepted, folders' content is validate in dropEvent (avoid any lag before droping) |
| 197 | currentPath = url.toLocalFile(); |
| 198 | if (Comic::fileIsComic(currentPath) || QFileInfo(currentPath).isDir()) |
| 199 | return true; |
| 200 | } |
| 201 | } |
| 202 | return false; |
| 203 | } |
| 204 | |
| 205 | void InfoComicsView::droppedFiles(const QList<QUrl> &urls, Qt::DropAction action) |
| 206 | { |