From 8760c046f3d59d6f4abe9c4a7c4db936b390c9fd Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE <0xfeedc0de64@gmail.com> Date: Sun, 11 Mar 2018 14:50:27 +0100 Subject: [PATCH] QLineEdit now shows weather api url --- plugins/weatherplugin/weathersettingswidget.cpp | 2 +- plugins/weatherplugin/weathersettingswidget.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/weatherplugin/weathersettingswidget.cpp b/plugins/weatherplugin/weathersettingswidget.cpp index 78fef05..bbc1ae8 100644 --- a/plugins/weatherplugin/weathersettingswidget.cpp +++ b/plugins/weatherplugin/weathersettingswidget.cpp @@ -11,7 +11,7 @@ WeatherSettingsWidget::WeatherSettingsWidget(ZeiterfassungSettings &settings, QW auto layout = new QFormLayout(this); layout->setMargin(0); - m_lineEdit = new QLineEdit(this); + m_lineEdit = new QLineEdit(m_settings.url().toString(), this); layout->addRow(tr("Weather API:"), m_lineEdit); setLayout(layout); diff --git a/plugins/weatherplugin/weathersettingswidget.h b/plugins/weatherplugin/weathersettingswidget.h index ffc8920..d962a33 100644 --- a/plugins/weatherplugin/weathersettingswidget.h +++ b/plugins/weatherplugin/weathersettingswidget.h @@ -1,10 +1,12 @@ -#ifndef WEATHERSETTINGS_H -#define WEATHERSETTINGS_H +#ifndef WEATHERSETTINGSWIDGET_H +#define WEATHERSETTINGSWIDGET_H #include #include "settingswidget.h" +#include "weathersettings.h" + class QLineEdit; class ZeiterfassungSettings; @@ -21,9 +23,9 @@ public Q_SLOTS: void apply() Q_DECL_OVERRIDE; private: - ZeiterfassungSettings &m_settings; + WeatherSettings m_settings; QLineEdit *m_lineEdit; }; -#endif // WEATHERSETTINGS_H +#endif // WEATHERSETTINGSWIDGET_H