MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / retrieveData

Method retrieveData

launcher/minecraft/WorldList.cpp:327–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325 QVariant retrieveData(const QString &mimetype, QMetaType type) const
326#else
327 QVariant retrieveData(const QString &mimetype, QVariant::Type type) const
328#endif
329 {
330 QList<QUrl> urls;
331 for(auto &world: m_worlds)
332 {
333 if(!world.isValid() || !world.isOnFS())
334 continue;
335 QString worldPath = world.container().absoluteFilePath();
336 qDebug() << worldPath;
337 urls.append(QUrl::fromLocalFile(worldPath));
338 }
339 const_cast<WorldMimeData*>(this)->setUrls(urls);
340 return QMimeData::retrieveData(mimetype, type);
341 }
342private:
343 QList<World> m_worlds;
344};

Callers

nothing calls this directly

Calls 4

isOnFSMethod · 0.80
containerMethod · 0.80
appendMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected