MCPcopy Create free account
hub / github.com/IJHack/QtPass / parseDropData

Method parseDropData

src/storemodel.cpp:324–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324auto StoreModel::parseDropData(const QMimeData *data,
325 dragAndDropInfoPasswordStore *outInfo) -> bool {
326 QByteArray encodedData =
327 data->data("application/vnd+qtpass.dragAndDropInfoPasswordStore");
328 if (encodedData.isEmpty()) {
329 return false;
330 }
331
332 QDataStream stream(&encodedData, QIODevice::ReadOnly);
333 dragAndDropInfoPasswordStore info;
334 stream >> info;
335 if (stream.status() != QDataStream::Ok) {
336 return false;
337 }
338
339 *outInfo = info;
340 return true;
341}
342
343auto StoreModel::executeDropAction(const dragAndDropInfoPasswordStore &info,
344 Qt::DropAction action,

Callers

nothing calls this directly

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected