fix settings loading

This commit is contained in:
Michael Zanetti 2019-05-21 17:31:09 +02:00
parent d6990d3e91
commit cf40525e22

View File

@ -68,8 +68,8 @@ DevicePluginOpenweathermap::DevicePluginOpenweathermap()
// max 50000 calls/day
m_apiKey = "c1b9d5584bb740804871583f6c62744f";
QSettings settings(NymeaSettings::settingsPath());
settings.beginGroup("openweathermap");
QSettings settings(NymeaSettings::settingsPath() + "/nymead.conf", QSettings::IniFormat);
settings.beginGroup("OpenWeatherMap");
if (settings.contains("apiKey")) {
m_apiKey = settings.value("apiKey").toString();
qCDebug(dcOpenWeatherMap()) << "Using custom API key:" << m_apiKey.replace(m_apiKey.length() - 10, 10, "**********");