diff --git a/plugins/deviceplugins/mock/devicepluginmock.cpp b/plugins/deviceplugins/mock/devicepluginmock.cpp index b3af9dcf..797bd2e6 100644 --- a/plugins/deviceplugins/mock/devicepluginmock.cpp +++ b/plugins/deviceplugins/mock/devicepluginmock.cpp @@ -109,6 +109,9 @@ DeviceManager::DeviceSetupStatus DevicePluginMock::setupDevice(Device *device) qCDebug(dcMockDevice) << "Setup Child mock device" << device->params(); device->setParentId(DeviceId(device->params().paramValue("parent uuid").toString())); return DeviceManager::DeviceSetupStatusSuccess; + } else if (device->deviceClassId() == mockInputTypeDeviceClassId) { + qCDebug(dcMockDevice) << "Setup InputType mock device" << device->params(); + return DeviceManager::DeviceSetupStatusSuccess; } return DeviceManager::DeviceSetupStatusFailure; diff --git a/plugins/deviceplugins/mock/devicepluginmock.json b/plugins/deviceplugins/mock/devicepluginmock.json index d9f4b69c..ef98cc17 100644 --- a/plugins/deviceplugins/mock/devicepluginmock.json +++ b/plugins/deviceplugins/mock/devicepluginmock.json @@ -439,6 +439,71 @@ "writable": true } ] + }, + { + "deviceClassId": "515ffdf1-55e5-498d-9abc-4e2fe768f3a9", + "idName": "mockInputType", + "name": "Mock Device (InputTypes)", + "basicTags": [ + "Device" + ], + "createMethods": ["user"], + "paramTypes": [ + { + "name": "Text line", + "type": "QString", + "inputType": "TextLine", + "defaultValue": "This is a text line" + }, + { + "name": "Text area", + "type": "QString", + "inputType": "TextArea", + "defaultValue": "This is a text area" + }, + { + "name": "Password text", + "type": "QString", + "inputType": "Password", + "defaultValue": "secret" + }, + { + "name": "Search text", + "type": "QString", + "inputType": "Search", + "defaultValue": "Search text..." + }, + { + "name": "Mail address", + "type": "QString", + "inputType": "Mail", + "defaultValue": "name@example.com" + }, + { + "name": "IPv4 address", + "type": "QString", + "inputType": "IPv4Address", + "defaultValue": "127.0.0.1" + }, + { + "name": "IPv6 address", + "type": "QString", + "inputType": "IPv6Address", + "defaultValue": "::1" + }, + { + "name": "URL", + "type": "QString", + "inputType": "Url", + "defaultValue": "http://guh.guru" + }, + { + "name": "Mac address", + "type": "QString", + "inputType": "MacAddress", + "defaultValue": "11:22:33:aa:bb:cc" + } + ] } ] }