added Uint and Color to base types
This commit is contained in:
parent
d1647a6b20
commit
c1a0895a3f
@ -44,7 +44,7 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QStringList>
|
||||
|
||||
#define JSON_PROTOCOL_VERSION 12
|
||||
#define JSON_PROTOCOL_VERSION 13
|
||||
|
||||
JsonRPCServer::JsonRPCServer(QObject *parent):
|
||||
JsonHandler(parent),
|
||||
|
||||
@ -950,12 +950,18 @@ QPair<bool, QString> JsonTypes::validateBasicType(const QVariant &variant)
|
||||
if (variant.canConvert(QVariant::Int)) {
|
||||
return report(true, "");
|
||||
}
|
||||
if (variant.canConvert(QVariant::UInt)){
|
||||
return report(true, "");
|
||||
}
|
||||
if (variant.canConvert(QVariant::Double)) {
|
||||
return report(true, "");
|
||||
}
|
||||
if (variant.canConvert(QVariant::Bool)) {
|
||||
return report(true, "");
|
||||
}
|
||||
if (variant.canConvert(QVariant::Color)) {
|
||||
return report(true, "");
|
||||
}
|
||||
return report(false, QString("Error validating basic type %1.").arg(variant.toString()));
|
||||
}
|
||||
|
||||
|
||||
@ -81,9 +81,11 @@ public:
|
||||
Uuid,
|
||||
String,
|
||||
Int,
|
||||
Uint,
|
||||
Double,
|
||||
Bool,
|
||||
Variant,
|
||||
Color,
|
||||
Object
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
12
|
||||
13
|
||||
{
|
||||
"methods": {
|
||||
"Actions.ExecuteAction": {
|
||||
@ -401,9 +401,11 @@
|
||||
"Uuid",
|
||||
"String",
|
||||
"Int",
|
||||
"Uint",
|
||||
"Double",
|
||||
"Bool",
|
||||
"Variant",
|
||||
"Color",
|
||||
"Object"
|
||||
],
|
||||
"CreateMethod": [
|
||||
|
||||
Reference in New Issue
Block a user