MCPcopy Create free account
hub / github.com/YACReader/yacreader / canDropUrls

Method canDropUrls

YACReaderLibrary/info_comics_view.cpp:191–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191bool 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
205void InfoComicsView::droppedFiles(const QList<QUrl> &urls, Qt::DropAction action)
206{

Callers

nothing calls this directly

Calls 1

isDirMethod · 0.45

Tested by

no test coverage detected