MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / canDrop

Method canDrop

Gui/SequenceFileDialog.cpp:2601–2617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2599}
2600
2601bool
2602UrlModel::canDrop(QDragEnterEvent* e)
2603{
2604 if ( !e->mimeData()->formats().contains( mimeTypes().first() ) ) {
2605 return false;
2606 }
2607
2608 const QList<QUrl> list = e->mimeData()->urls();
2609 for (int i = 0; i < list.count(); ++i) {
2610 QModelIndex idx = fileSystemModel->index( QtCompat::toLocalFileUrlFixed( list.at(i) ).toLocalFile() );
2611 if ( !fileSystemModel->isDir(idx) ) {
2612 return false;
2613 }
2614 }
2615
2616 return true;
2617}
2618
2619bool
2620UrlModel::dropMimeData(const QMimeData *data,

Callers 1

dragEnterEventMethod · 0.45

Calls 8

toLocalFileUrlFixedFunction · 0.85
atMethod · 0.80
isDirMethod · 0.80
containsMethod · 0.45
mimeDataMethod · 0.45
urlsMethod · 0.45
countMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected