From cc0bd99d698b84aa0bb33809da34e11cb0c9a871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 22 May 2015 12:04:42 +0200 Subject: [PATCH] fixed edit openweathermap --- .../openweathermap/devicepluginopenweathermap.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp b/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp index a5dc9e55..83f652bf 100644 --- a/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp +++ b/plugins/deviceplugins/openweathermap/devicepluginopenweathermap.cpp @@ -95,12 +95,12 @@ DeviceManager::DeviceSetupStatus DevicePluginOpenweathermap::setupDevice(Device return DeviceManager::DeviceSetupStatusFailure; } - foreach (Device *deviceListDevice, deviceManager()->findConfiguredDevices(openweathermapDeviceClassId)) { - if(deviceListDevice->paramValue("id").toString() == device->paramValue("id").toString()){ - qWarning() << QString("Location " + device->paramValue("location").toString() + "already in added"); - return DeviceManager::DeviceSetupStatusFailure; - } - } + // foreach (Device *d, myDevices()) { + // if(d->paramValue("id").toString() == device->paramValue("id").toString()){ + // qWarning() << QString("ERROR: Location " + d->paramValue("location").toString() + " with id " + d->paramValue("id").toString() + ") " + " already added: "); + // return DeviceManager::DeviceSetupStatusFailure; + // } + // } device->setName("Weather from OpenWeatherMap (" + device->paramValue("location").toString() + ")"); update(device);