* logging changes

* add configuration export status message
* prepare to release
This commit is contained in:
arcan1s
2015-10-20 00:34:29 +03:00
parent c161004640
commit 75ab84e993
39 changed files with 208 additions and 528 deletions

View File

@ -32,10 +32,10 @@ ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
: Plasma::DataEngine(parent, args)
{
Q_UNUSED(args)
qCDebug(LOG_ESM);
// logging
qSetMessagePattern(LOG_FORMAT);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
foreach (const QString metadata, getBuildData())
qCDebug(LOG_ESM) << metadata;
setMinimumPollingInterval(333);
readConfiguration();
@ -49,7 +49,7 @@ ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
ExtendedSysMon::~ExtendedSysMon()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
delete aggregator;
}
@ -57,15 +57,12 @@ ExtendedSysMon::~ExtendedSysMon()
QStringList ExtendedSysMon::sources() const
{
qCDebug(LOG_ESM);
return aggregator->sources();
}
bool ExtendedSysMon::sourceRequestEvent(const QString &source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
return updateSourceEvent(source);
@ -74,7 +71,6 @@ bool ExtendedSysMon::sourceRequestEvent(const QString &source)
bool ExtendedSysMon::updateSourceEvent(const QString &source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (aggregator->hasSource(source)) {
@ -90,8 +86,6 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
QStringList ExtendedSysMon::getAllHdd() const
{
qCDebug(LOG_ESM);
QStringList allDevices
= QDir(QString("/dev")).entryList(QDir::System, QDir::Name);
QStringList devices = allDevices.filter(QRegExp(QString("^[hms]d[a-z]$")));
@ -105,8 +99,6 @@ QStringList ExtendedSysMon::getAllHdd() const
QString ExtendedSysMon::getAutoGpu() const
{
qCDebug(LOG_ESM);
QString gpu = QString("disable");
QFile moduleFile(QString("/proc/modules"));
if (!moduleFile.open(QIODevice::ReadOnly))
@ -125,8 +117,6 @@ QString ExtendedSysMon::getAutoGpu() const
void ExtendedSysMon::readConfiguration()
{
qCDebug(LOG_ESM);
QString fileName
= QStandardPaths::locate(QStandardPaths::ConfigLocation,
QString("plasma-dataengine-extsysmon.conf"));
@ -166,7 +156,6 @@ void ExtendedSysMon::readConfiguration()
QHash<QString, QString>
ExtendedSysMon::updateConfiguration(QHash<QString, QString> rawConfig) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Raw configuration" << rawConfig;
// gpudev

View File

@ -18,7 +18,6 @@
#include "extsysmonaggregator.h"
#include "awdebug.h"
#include "version.h"
#include "sources/batterysource.h"
#include "sources/customsource.h"
#include "sources/desktopsource.h"
@ -33,13 +32,14 @@
#include "sources/updatesource.h"
#include "sources/upgradesource.h"
#include "sources/weathersource.h"
#include "version.h"
ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent,
const QHash<QString, QString> config)
: QObject(parent)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
init(config);
}
@ -47,7 +47,7 @@ ExtSysMonAggregator::ExtSysMonAggregator(QObject *parent,
ExtSysMonAggregator::~ExtSysMonAggregator()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_map.clear();
}
@ -55,7 +55,6 @@ ExtSysMonAggregator::~ExtSysMonAggregator()
QVariant ExtSysMonAggregator::data(const QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
return hasSource(source) ? m_map[source]->data(source) : QVariant();
@ -70,7 +69,6 @@ bool ExtSysMonAggregator::hasSource(const QString source) const
QVariantMap ExtSysMonAggregator::initialData(const QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
return hasSource(source) ? m_map[source]->initialData(source)
@ -80,8 +78,6 @@ QVariantMap ExtSysMonAggregator::initialData(const QString source) const
QStringList ExtSysMonAggregator::sources() const
{
qCDebug(LOG_ESM);
QStringList sorted = m_map.keys();
sorted.sort();
return sorted;
@ -90,7 +86,7 @@ QStringList ExtSysMonAggregator::sources() const
void ExtSysMonAggregator::init(const QHash<QString, QString> config)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Configuration" << config;
// battery
AbstractExtSysMonSource *batteryItem

View File

@ -27,7 +27,7 @@ BatterySource::BatterySource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 1);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_acpiPath = args.at(0);
m_sources = getSources();
@ -36,13 +36,12 @@ BatterySource::BatterySource(QObject *parent, const QStringList args)
BatterySource::~BatterySource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant BatterySource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("battery/ac"))
@ -53,7 +52,6 @@ QVariant BatterySource::data(QString source)
QVariantMap BatterySource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -83,8 +81,6 @@ QVariantMap BatterySource::initialData(QString source) const
void BatterySource::run()
{
qCDebug(LOG_ESM);
// adaptor
QFile acFile(QString("%1/AC/online").arg(m_acpiPath));
if (acFile.open(QIODevice::ReadOnly))
@ -121,16 +117,12 @@ void BatterySource::run()
QStringList BatterySource::sources() const
{
qCDebug(LOG_ESM);
return m_sources;
}
QStringList BatterySource::getSources()
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("battery/ac"));
sources.append(QString("battery/bat"));

View File

@ -26,7 +26,7 @@ CustomSource::CustomSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"));
m_sources = getSources();
@ -35,7 +35,7 @@ CustomSource::CustomSource(QObject *parent, const QStringList args)
CustomSource::~CustomSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
delete extScripts;
}
@ -43,7 +43,6 @@ CustomSource::~CustomSource()
QVariant CustomSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
// there are only one value
@ -53,7 +52,6 @@ QVariant CustomSource::data(QString source)
QVariantMap CustomSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -71,16 +69,12 @@ QVariantMap CustomSource::initialData(QString source) const
QStringList CustomSource::sources() const
{
qCDebug(LOG_ESM);
return m_sources;
}
QStringList CustomSource::getSources()
{
qCDebug(LOG_ESM);
QStringList sources;
foreach (ExtScript *item, extScripts->activeItems())
sources.append(QString("custom/%1").arg(item->tag(QString("custom"))));

View File

@ -27,19 +27,18 @@ DesktopSource::DesktopSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
DesktopSource::~DesktopSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant DesktopSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
int current = KWindowSystem::currentDesktop();
@ -64,7 +63,6 @@ QVariant DesktopSource::data(QString source)
QVariantMap DesktopSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -100,8 +98,6 @@ QVariantMap DesktopSource::initialData(QString source) const
QStringList DesktopSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("desktop/current/name"));
sources.append(QString("desktop/current/number"));

View File

@ -29,7 +29,7 @@ GPULoadSource::GPULoadSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 1);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_device = args.at(0);
}
@ -37,13 +37,12 @@ GPULoadSource::GPULoadSource(QObject *parent, const QStringList args)
GPULoadSource::~GPULoadSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant GPULoadSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("gpu/load")) {
@ -94,7 +93,6 @@ QVariant GPULoadSource::data(QString source)
QVariantMap GPULoadSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -112,8 +110,6 @@ QVariantMap GPULoadSource::initialData(QString source) const
QStringList GPULoadSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("gpu/load"));

View File

@ -30,7 +30,7 @@ GPUTemperatureSource::GPUTemperatureSource(QObject *parent,
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 1);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_device = args.at(0);
}
@ -38,13 +38,12 @@ GPUTemperatureSource::GPUTemperatureSource(QObject *parent,
GPUTemperatureSource::~GPUTemperatureSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant GPUTemperatureSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("gpu/temperature")) {
@ -93,7 +92,6 @@ QVariant GPUTemperatureSource::data(QString source)
QVariantMap GPUTemperatureSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -111,8 +109,6 @@ QVariantMap GPUTemperatureSource::initialData(QString source) const
QStringList GPUTemperatureSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("gpu/temperature"));

View File

@ -30,7 +30,7 @@ HDDTemperatureSource::HDDTemperatureSource(QObject *parent,
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 2);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_devices = args.at(0).split(QChar(','), QString::SkipEmptyParts);
m_cmd = args.at(1);
@ -42,13 +42,12 @@ HDDTemperatureSource::HDDTemperatureSource(QObject *parent,
HDDTemperatureSource::~HDDTemperatureSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant HDDTemperatureSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QString device = source.remove(QString("hdd/temperature"));
@ -88,7 +87,6 @@ QVariant HDDTemperatureSource::data(QString source)
QVariantMap HDDTemperatureSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QString device = source.remove(QString("hdd/temperature"));
@ -105,8 +103,6 @@ QVariantMap HDDTemperatureSource::initialData(QString source) const
QStringList HDDTemperatureSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
foreach (QString device, m_devices)
sources.append(QString("hdd/temperature%1").arg(device));

View File

@ -25,19 +25,18 @@ LoadSource::LoadSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
LoadSource::~LoadSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant LoadSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
source.remove(QString("load/load"));
@ -47,7 +46,6 @@ QVariant LoadSource::data(QString source)
QVariantMap LoadSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -65,8 +63,6 @@ QVariantMap LoadSource::initialData(QString source) const
QStringList LoadSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
for (int i = 0; i < 1000; i++)
sources.append(QString("load/load%1").arg(i));

View File

@ -27,19 +27,18 @@ NetworkSource::NetworkSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
NetworkSource::~NetworkSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant NetworkSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("network/current/name")) {
@ -66,7 +65,6 @@ QVariant NetworkSource::data(QString source)
QVariantMap NetworkSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -84,8 +82,6 @@ QVariantMap NetworkSource::initialData(QString source) const
QStringList NetworkSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("network/current/name"));

View File

@ -33,7 +33,7 @@ PlayerSource::PlayerSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 5);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
m_player = args.at(0);
m_mpdAddress = QString("%1:%2").arg(args.at(1)).arg(args.at(2));
@ -44,13 +44,12 @@ PlayerSource::PlayerSource(QObject *parent, const QStringList args)
PlayerSource::~PlayerSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant PlayerSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("player/title"))
@ -61,7 +60,6 @@ QVariant PlayerSource::data(QString source)
QVariantMap PlayerSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -148,8 +146,6 @@ QVariantMap PlayerSource::initialData(QString source) const
void PlayerSource::run()
{
qCDebug(LOG_ESM);
// initial data
if (m_player == QString("mpd")) {
// mpd
@ -187,8 +183,6 @@ void PlayerSource::run()
QStringList PlayerSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("player/album"));
sources.append(QString("player/dalbum"));
@ -221,8 +215,6 @@ QVariantHash PlayerSource::defaultInfo() const
QString PlayerSource::getAutoMpris() const
{
qCDebug(LOG_ESM);
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
QDBus::BlockWithGui, QString("ListNames"));
if (listServices.arguments().isEmpty())
@ -244,7 +236,6 @@ QString PlayerSource::getAutoMpris() const
QVariantHash PlayerSource::getPlayerMpdInfo(const QString mpdAddress) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "MPD" << mpdAddress;
QVariantHash info = defaultInfo();
@ -286,7 +277,6 @@ QVariantHash PlayerSource::getPlayerMpdInfo(const QString mpdAddress) const
QVariantHash PlayerSource::getPlayerMprisInfo(const QString mpris) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "MPRIS" << mpris;
QVariantHash info = defaultInfo();
@ -356,7 +346,6 @@ QVariantHash PlayerSource::getPlayerMprisInfo(const QString mpris) const
QString PlayerSource::buildString(const QString current, const QString value,
const int s) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Current value" << current;
qCDebug(LOG_ESM) << "New value" << value;
qCDebug(LOG_ESM) << "Strip after" << s;
@ -372,7 +361,6 @@ QString PlayerSource::buildString(const QString current, const QString value,
QString PlayerSource::stripString(const QString value, const int s) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "New value" << value;
qCDebug(LOG_ESM) << "Strip after" << s;

View File

@ -27,19 +27,18 @@ ProcessesSource::ProcessesSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
ProcessesSource::~ProcessesSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant ProcessesSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("ps/running/count"))
@ -50,7 +49,6 @@ QVariant ProcessesSource::data(QString source)
QVariantMap ProcessesSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -80,8 +78,6 @@ QVariantMap ProcessesSource::initialData(QString source) const
void ProcessesSource::run()
{
qCDebug(LOG_ESM);
QStringList allDirectories
= QDir(QString("/proc"))
.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
@ -109,8 +105,6 @@ void ProcessesSource::run()
QStringList ProcessesSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("ps/running/count"));
sources.append(QString("ps/running/list"));

View File

@ -26,7 +26,7 @@ QuotesSource::QuotesSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"));
m_sources = getSources();
@ -35,7 +35,7 @@ QuotesSource::QuotesSource(QObject *parent, const QStringList args)
QuotesSource::~QuotesSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
delete extQuotes;
}
@ -43,7 +43,6 @@ QuotesSource::~QuotesSource()
QVariant QuotesSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source.startsWith(QString("quotes/percpricechg"))) {
@ -58,7 +57,6 @@ QVariant QuotesSource::data(QString source)
QVariantMap QuotesSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
int ind = index(source);
@ -143,16 +141,12 @@ QVariantMap QuotesSource::initialData(QString source) const
QStringList QuotesSource::sources() const
{
qCDebug(LOG_ESM);
return m_sources;
}
QStringList QuotesSource::getSources()
{
qCDebug(LOG_ESM);
QStringList sources;
foreach (ExtQuotes *item, extQuotes->activeItems()) {
sources.append(QString("quotes/%1").arg(item->tag(QString("ask"))));

View File

@ -25,19 +25,18 @@ UpdateSource::UpdateSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
UpdateSource::~UpdateSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
}
QVariant UpdateSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
return true;
@ -46,7 +45,6 @@ QVariant UpdateSource::data(QString source)
QVariantMap UpdateSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -64,8 +62,6 @@ QVariantMap UpdateSource::initialData(QString source) const
QStringList UpdateSource::sources() const
{
qCDebug(LOG_ESM);
QStringList sources;
sources.append(QString("update"));

View File

@ -26,7 +26,7 @@ UpgradeSource::UpgradeSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"));
m_sources = getSources();
@ -35,7 +35,7 @@ UpgradeSource::UpgradeSource(QObject *parent, const QStringList args)
UpgradeSource::~UpgradeSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
delete extUpgrade;
}
@ -43,7 +43,6 @@ UpgradeSource::~UpgradeSource()
QVariant UpgradeSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
// there are only one value
@ -53,7 +52,6 @@ QVariant UpgradeSource::data(QString source)
QVariantMap UpgradeSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
QVariantMap data;
@ -71,16 +69,12 @@ QVariantMap UpgradeSource::initialData(QString source) const
QStringList UpgradeSource::sources() const
{
qCDebug(LOG_ESM);
return m_sources;
}
QStringList UpgradeSource::getSources()
{
qCDebug(LOG_ESM);
QStringList sources;
foreach (ExtUpgrade *item, extUpgrade->activeItems())
sources.append(

View File

@ -26,7 +26,7 @@ WeatherSource::WeatherSource(QObject *parent, const QStringList args)
: AbstractExtSysMonSource(parent, args)
{
Q_ASSERT(args.count() == 0);
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"));
m_sources = getSources();
@ -35,7 +35,7 @@ WeatherSource::WeatherSource(QObject *parent, const QStringList args)
WeatherSource::~WeatherSource()
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
delete extWeather;
}
@ -43,7 +43,6 @@ WeatherSource::~WeatherSource()
QVariant WeatherSource::data(QString source)
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
if (source.startsWith(QString("weather/weatherId"))) {
@ -58,7 +57,6 @@ QVariant WeatherSource::data(QString source)
QVariantMap WeatherSource::initialData(QString source) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Source" << source;
int ind = index(source);
@ -111,16 +109,12 @@ QVariantMap WeatherSource::initialData(QString source) const
QStringList WeatherSource::sources() const
{
qCDebug(LOG_ESM);
return m_sources;
}
QStringList WeatherSource::getSources()
{
qCDebug(LOG_ESM);
QStringList sources;
foreach (ExtWeather *item, extWeather->activeItems()) {
sources.append(