From c0fcf6bea223c891186b26c3aaf5b287fa81c03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 9 Feb 2016 18:59:18 +0100 Subject: [PATCH] update datetime --- .../datetime/deviceplugindatetime.cpp | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/plugins/deviceplugins/datetime/deviceplugindatetime.cpp b/plugins/deviceplugins/datetime/deviceplugindatetime.cpp index 5be8b5df..8f2bae6e 100644 --- a/plugins/deviceplugins/datetime/deviceplugindatetime.cpp +++ b/plugins/deviceplugins/datetime/deviceplugindatetime.cpp @@ -121,7 +121,6 @@ DevicePluginDateTime::DevicePluginDateTime() : m_currentDateTime = QDateTime(QDate::currentDate(), QTime::currentTime(), m_timeZone); connect(m_timer, &QTimer::timeout, this, &DevicePluginDateTime::onSecondChanged); - connect(this, &DevicePluginDateTime::configValueChanged, this, &DevicePluginDateTime::onConfigValueChanged); } DeviceManager::HardwareResources DevicePluginDateTime::requiredHardware() const @@ -129,21 +128,6 @@ DeviceManager::HardwareResources DevicePluginDateTime::requiredHardware() const return DeviceManager::HardwareResourceNetworkManager; } -//QList DevicePluginDateTime::configurationDescription() const -//{ -// QList params; -// ParamType timezoneParamType("timezone", QVariant::String, "Europe/Vienna"); - -// QList allowedValues; -// foreach (QByteArray timeZone, QTimeZone::availableTimeZoneIds()) { -// allowedValues.append(timeZone); -// } -// timezoneParamType.setAllowedValues(allowedValues); - -// params.append(timezoneParamType); -// return params; -//} - DeviceManager::DeviceSetupStatus DevicePluginDateTime::setupDevice(Device *device) { // check timezone @@ -332,14 +316,14 @@ void DevicePluginDateTime::processGeoLocationData(const QByteArray &data) qCWarning(dcDateTime) << "failed to request geo location:" << response.value("status"); } - // check timezone - QString timeZone = response.value("timezone").toString(); - if (QString(m_timeZone.id()) != timeZone) { - qCWarning(dcDateTime) << "error: configured timezone does not match the discovered timezone"; - qCWarning(dcDateTime) << " configured:" << m_timeZone.id(); - qCWarning(dcDateTime) << " discovered:" << timeZone; - return; - } +// // check timezone +// QString timeZone = response.value("timezone").toString(); +// if (QString(m_timeZone.id()) != timeZone) { +// qCWarning(dcDateTime) << "error: configured timezone does not match the discovered timezone"; +// qCWarning(dcDateTime) << " configured:" << m_timeZone.id(); +// qCWarning(dcDateTime) << " discovered:" << timeZone; +// return; +// } qCDebug(dcDateTime) << "---------------------------------------------"; qCDebug(dcDateTime) << "autodetected location for" << response.value("query").toString();