fix androidservice

pull/547/head
Michael Zanetti 2021-02-28 22:17:01 +01:00
parent f82fc9056d
commit 0c205e3edc
3 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ void DeviceControlApplication::handleNdefMessage(QNdefMessage message, QNearFiel
connectToNymea(nymeaId);
m_qmlEngine->rootContext()->setContextProperty("controlledThingId", thingId);
connect(m_engine->thingManager(), &DeviceManager::fetchingDataChanged, [this](){
connect(m_engine->thingManager(), &ThingManager::fetchingDataChanged, [this](){
if (m_engine->jsonRpcClient()->connected() && !m_engine->thingManager()->fetchingData()) {
qDebug() << "Ready to process commands";
runNfcAction();
@ -160,7 +160,7 @@ void DeviceControlApplication::runNfcAction()
}
QUuid thingId = QUuid(QUrlQuery(url).queryItemValue("t"));
Device *thing = m_engine->thingManager()->things()->getThing(thingId);
Thing *thing = m_engine->thingManager()->things()->getThing(thingId);
if (!thing) {
qDebug() << "Thing" << thingId.toString() << "from" << url.toString() << "doesn't exist on nymea host" << nymeaId.toString();
return;

View File

@ -54,7 +54,7 @@ bool AndroidBinder::onTransact(int code, const QAndroidParcel &data, const QAndr
}
QVariantList thingsList;
for (int i = 0; i < engine->thingManager()->things()->rowCount(); i++) {
Device *thing = engine->thingManager()->things()->get(i);
Thing *thing = engine->thingManager()->things()->get(i);
QVariantMap thingMap;
thingMap.insert("id", thing->id());
thingMap.insert("name", thing->name());

View File

@ -42,7 +42,7 @@ NymeaAppService::NymeaAppService(int argc, char **argv):
m_engines.insert(host->uuid(), engine);
QObject::connect(engine->thingManager(), &DeviceManager::thingStateChanged, [=](const QUuid &thingId, const QUuid &stateTypeId, const QVariant &value){
QObject::connect(engine->thingManager(), &ThingManager::thingStateChanged, [=](const QUuid &thingId, const QUuid &stateTypeId, const QVariant &value){
QVariantMap params;
params.insert("nymeaId", engine->jsonRpcClient()->currentHost()->uuid());
params.insert("thingId", thingId);
@ -51,7 +51,7 @@ NymeaAppService::NymeaAppService(int argc, char **argv):
sendNotification("ThingStateChanged", params);
});
connect(engine->thingManager(), &DeviceManager::fetchingDataChanged, [=]() {
connect(engine->thingManager(), &ThingManager::fetchingDataChanged, [=]() {
qDebug() << "Fetching data changed";
QVariantMap params;
params.insert("nymeaId", engine->jsonRpcClient()->currentHost()->uuid());