| 322 | } |
| 323 | |
| 324 | auto 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 | |
| 343 | auto StoreModel::executeDropAction(const dragAndDropInfoPasswordStore &info, |
| 344 | Qt::DropAction action, |