mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 20:28:11 -05:00
Add more tests
This commit is contained in:
@@ -12,6 +12,9 @@ QString FormatJsonString(std::string s)
|
||||
QString FormatJsonString(QString json)
|
||||
{
|
||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||
if (doc.isNull()) {
|
||||
return "";
|
||||
}
|
||||
return QString::fromUtf8(doc.toJson(QJsonDocument::Indented));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user