mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-23 10:39:56 +00:00
* logging changes
* add configuration export status message * prepare to release
This commit is contained in:
@ -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"));
|
||||
|
@ -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"))));
|
||||
|
@ -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"));
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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"));
|
||||
|
@ -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"))));
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user