| 3 | #include <QFile> |
| 4 | |
| 5 | std::vector<uint8_t> ResourceHelper::GetResource(const std::string &url) { |
| 6 | auto file = QFile(QString::fromUtf8(url)); |
| 7 | if(!file.open(QIODevice::ReadOnly)) |
| 8 | throw std::runtime_error(fmt::format("Failed to open resource '{}'.", url)); |
| 9 | auto data = file.readAll(); |
| 10 | return {data.begin(), data.end()}; |
| 11 | } |
nothing calls this directly
no outgoing calls
no test coverage detected