plasma: remove non-operational service monitor

was used for remote widgets and their services

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-05-22 02:58:28 +03:00
parent 8fb3054aa1
commit b91e927ffa
4 changed files with 6 additions and 65 deletions

View file

@ -44,6 +44,7 @@
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
#include <kwindowsystem.h>
#include <kdebug.h>
#ifndef PLASMA_NO_KIO
#include "kio/jobclasses.h" // for KIO::JobFlags

View file

@ -27,6 +27,8 @@
#include <QGraphicsLinearLayout>
#include <QPainter>
#include <kdebug.h>
#include "applet.h"
#include "containment.h"
#include "corona.h"

View file

@ -25,47 +25,13 @@
#include <kdebug.h>
#include <servicejob.h>
#include "plasma/dataenginemanager.h"
#include "servicejob.h"
namespace Plasma
{
ServiceMonitor::ServiceMonitor(DataEngineConsumer *consumer)
: m_consumer(consumer)
{
}
ServiceMonitor::~ServiceMonitor()
{
}
void ServiceMonitor::slotJobFinished(Plasma::ServiceJob *job)
{
const QString engineName = job->parameters()["EngineName"].toString();
const QString location = job->destination();
kDebug() << "engine ready!" << engineName << location;
}
void ServiceMonitor::slotServiceReady(Plasma::Service *plasmoidService)
{
kDebug() << "service ready!";
if (!m_consumer->m_engineNameForService.contains(plasmoidService)) {
kDebug() << "no engine name for service!";
kDebug() << "amount of services in map: " << m_consumer->m_engineNameForService.count();
} else {
kDebug() << "value = " << m_consumer->m_engineNameForService.value(plasmoidService);
}
kDebug() << "requesting dataengine!";
KConfigGroup op = plasmoidService->operationDescription("DataEngine");
op.writeEntry("EngineName", m_consumer->m_engineNameForService.value(plasmoidService));
plasmoidService->startOperationCall(op);
connect(plasmoidService, SIGNAL(finished(Plasma::ServiceJob*)),
this, SLOT(slotJobFinished(Plasma::ServiceJob*)));
}
DataEngineConsumer::DataEngineConsumer()
: m_monitor(new ServiceMonitor(this))
{
}
@ -74,8 +40,6 @@ DataEngineConsumer::~DataEngineConsumer()
foreach (const QString &engine, m_loadedEngines) {
DataEngineManager::self()->unloadEngine(engine);
}
delete m_monitor;
}
DataEngine *DataEngineConsumer::dataEngine(const QString &name)

View file

@ -24,31 +24,11 @@
#include <QtCore/QSet>
#include <kdebug.h>
#include "plasma/dataenginemanager.h"
#include <servicejob.h>
#include "plasma/dataengine.h"
namespace Plasma
{
class DataEngineConsumer;
class ServiceMonitor : public QObject
{
Q_OBJECT
public:
ServiceMonitor(DataEngineConsumer *consumer);
~ServiceMonitor();
public Q_SLOTS:
void slotJobFinished(Plasma::ServiceJob *job);
void slotServiceReady(Plasma::Service *service);
private:
DataEngineConsumer *m_consumer;
};
class DataEngineConsumer
{
public:
@ -58,14 +38,8 @@ public:
private:
QSet<QString> m_loadedEngines;
QMap<Service*, QString> m_engineNameForService;
ServiceMonitor *m_monitor;
friend class ServiceMonitor;
};
} // namespace Plasma
#endif