| 385 | } |
| 386 | |
| 387 | QJsonDocument QJsonModel::genJsonByIndex(const QModelIndex& index) const { |
| 388 | if (!index.isValid()) |
| 389 | return {}; |
| 390 | |
| 391 | auto* item = static_cast<QJsonTreeItem*>(index.internalPointer()); |
| 392 | return QJsonDocument::fromVariant(genJson(item).toVariant()); |
| 393 | } |
no test coverage detected