mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
* seed for random numbers per thread * added function to get all user metatypes as string * added new read file function per path/name * removed DBus operators for pixmap * JSON operators for byte array * util function for JSON string
This commit is contained in:
committed by
Mathew Sutcliffe
parent
19df8a5d71
commit
a725ce2181
@@ -131,6 +131,13 @@ namespace BlackMisc
|
||||
return json;
|
||||
}
|
||||
|
||||
//! Convenience function JSON as string
|
||||
QString toJsonString(QJsonDocument::JsonFormat format = QJsonDocument::Indented) const
|
||||
{
|
||||
QJsonDocument jsonDoc(toJson());
|
||||
return jsonDoc.toJson(format);
|
||||
}
|
||||
|
||||
//! \copydoc CValueObject::convertFromJson
|
||||
void convertFromJson(const QJsonObject &json)
|
||||
{
|
||||
@@ -144,6 +151,12 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
//! Assign from JSON object string
|
||||
void convertFromJson(const QString &jsonString)
|
||||
{
|
||||
convertFromJson(BlackMisc::Json::jsonObjectFromString(jsonString));
|
||||
}
|
||||
|
||||
//! \copydoc BlackMisc::CValueObject::convertToQString
|
||||
QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user