Somoe type fixes

This commit is contained in:
Michael Zanetti 2020-06-29 23:20:11 +02:00
parent c7f957f201
commit 85c9d93ccd
3 changed files with 4 additions and 4 deletions

View File

@ -14,13 +14,13 @@ PyObject *QVariantToPyObject(const QVariant &value)
switch (value.type()) {
case QVariant::Bool:
pyValue = PyBool_FromLong(*(long*)value.data());
pyValue = PyBool_FromLong(value.toBool());
break;
case QVariant::Int:
case QVariant::UInt:
case QVariant::LongLong:
case QVariant::ULongLong:
pyValue = PyLong_FromLong(*(long*)value.data());
pyValue = PyLong_FromLong(value.toLongLong());
break;
case QVariant::String:
case QVariant::ByteArray:

View File

@ -8,7 +8,7 @@
"name": "autoThingCount",
"displayName": "Number of auto things",
"type": "int",
"defaultValue": 0
"defaultValue": "fds"
}
],
"vendors": [

View File

@ -10,7 +10,7 @@ def configValueChanged(paramTypeId, value):
def startMonitoringAutoThings():
logger.log("Start monitoring auto things. Already have", len(myThings()))
logger.log("Start monitoring auto things. Already have", len(myThings()), configValue(pyMockPluginAutoThingCountParamTypeId))
for i in range(configValue(pyMockPluginAutoThingCountParamTypeId), len(myThings())):
logger.log("auto thing")
# descriptor = nymea.