Fix Browser icon definition in introspect

This commit is contained in:
Michael Zanetti 2019-10-08 15:51:10 +02:00
parent 6aa624c261
commit 1f68389a85
3 changed files with 35 additions and 4 deletions

View File

@ -490,8 +490,8 @@ QVariantMap JsonTypes::allTypes()
allTypes.insert("UserError", userError()); allTypes.insert("UserError", userError());
allTypes.insert("TagError", tagError()); allTypes.insert("TagError", tagError());
allTypes.insert("CloudConnectionState", cloudConnectionState()); allTypes.insert("CloudConnectionState", cloudConnectionState());
allTypes.insert("BrowserIcon", browserIconRef()); allTypes.insert("BrowserIcon", browserIcon());
allTypes.insert("MediaBrowserIcon", mediaBrowserIconRef()); allTypes.insert("MediaBrowserIcon", mediaBrowserIcon());
allTypes.insert("StateType", stateTypeDescription()); allTypes.insert("StateType", stateTypeDescription());
allTypes.insert("StateDescriptor", stateDescriptorDescription()); allTypes.insert("StateDescriptor", stateDescriptorDescription());

View File

@ -1399,7 +1399,18 @@
"Time", "Time",
"Object" "Object"
], ],
"BrowserIcon": "$ref:BrowserIcon", "BrowserIcon": [
"BrowserIconNone",
"BrowserIconFolder",
"BrowserIconFile",
"BrowserIconMusic",
"BrowserIconVideo",
"BrowserIconPictures",
"BrowserIconApplication",
"BrowserIconDocument",
"BrowserIconPackage",
"BrowserIconFavorites"
],
"BrowserItem": { "BrowserItem": {
"actionTypeIds": [ "actionTypeIds": [
"Uuid" "Uuid"
@ -1607,7 +1618,26 @@
"LoggingSourceRules", "LoggingSourceRules",
"LoggingSourceBrowserActions" "LoggingSourceBrowserActions"
], ],
"MediaBrowserIcon": "$ref:MediaBrowserIcon", "MediaBrowserIcon": [
"MediaBrowserIconNone",
"MediaBrowserIconPlaylist",
"MediaBrowserIconRecentlyPlayed",
"MediaBrowserIconLibrary",
"MediaBrowserIconMusicLibrary",
"MediaBrowserIconVideoLibrary",
"MediaBrowserIconPictureLibrary",
"MediaBrowserIconDisk",
"MediaBrowserIconUSB",
"MediaBrowserIconNetwork",
"MediaBrowserIconAux",
"MediaBrowserIconSpotify",
"MediaBrowserIconAmazon",
"MediaBrowserIconTuneIn",
"MediaBrowserIconSiriusXM",
"MediaBrowserIconVTuner",
"MediaBrowserIconTidal",
"MediaBrowserIconAirable"
],
"MqttPolicy": { "MqttPolicy": {
"allowedPublishTopicFilters": "StringList", "allowedPublishTopicFilters": "StringList",
"allowedSubscribeTopicFilters": "StringList", "allowedSubscribeTopicFilters": "StringList",

View File

@ -616,6 +616,7 @@ void TestJSONRPC::introspect()
QString typeId = ref; QString typeId = ref;
typeId.remove("$ref:"); typeId.remove("$ref:");
QVERIFY2(types.contains(typeId), QString("Undefined ref: %1. Did you forget to add it to JsonTypes::allTypes()?").arg(ref).toLatin1().data()); QVERIFY2(types.contains(typeId), QString("Undefined ref: %1. Did you forget to add it to JsonTypes::allTypes()?").arg(ref).toLatin1().data());
QVERIFY2(!types.value(typeId).toString().startsWith("$ref:"), QString("Definition for %1 must not be a reference itself").arg(ref).toLatin1().data());
} }
} }
} }