MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / mimeData

Method mimeData

src/document/UBDocumentController.cpp:723–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723QMimeData *UBDocumentTreeModel::mimeData (const QModelIndexList &indexes) const
724{
725 UBDocumentTreeMimeData *mimeData = new UBDocumentTreeMimeData();
726 QList <QModelIndex> indexList;
727 QList<QUrl> urlList;
728
729 foreach (QModelIndex index, indexes) {
730 if (index.isValid()) {
731 indexList.append(index);
732 urlList.append(QUrl());
733 }
734 }
735
736#if defined(Q_OS_OSX)
737 #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
738 if (QOperatingSystemVersion::current().majorVersion() == 10 && QOperatingSystemVersion::current().minorVersion() < 15) /* <= Mojave */
739 mimeData->setUrls(urlList);
740 #endif
741#else
742 mimeData->setUrls(urlList);
743#endif
744 mimeData->setIndexes(indexList);
745
746 return mimeData;
747}
748
749bool UBDocumentTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
750{

Callers 2

dragMoveEventMethod · 0.45
dropEventMethod · 0.45

Calls 1

setIndexesMethod · 0.80

Tested by

no test coverage detected