plasma: remove unused private Plasma::DataEngineService and Plasma::GetSource classes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-02 23:39:43 +03:00
parent 700d1f4317
commit 5289e1e95a
10 changed files with 3 additions and 255 deletions

View file

@ -86,11 +86,9 @@ set(plasma_LIB_SRCS
private/datacontainer_p.cpp
private/dataenginebindings.cpp
private/dataengineconsumer.cpp
private/dataengineservice.cpp
private/extenderapplet.cpp
private/extenderitemmimedata.cpp
private/focusindicator.cpp
private/getsource.cpp
private/nativetabbar.cpp
private/packages.cpp
private/plasmoidservice.cpp

View file

@ -34,7 +34,6 @@
#include "datacontainer.h"
#include "service.h"
#include "private/dataengineservice_p.h"
#include "private/service_p.h"
namespace Plasma

View file

@ -20,8 +20,6 @@
#ifndef PLASMA_DATACONTAINER_P_H
#define PLASMA_DATACONTAINER_P_H
#include "servicejob.h"
#include <QtCore/qcoreevent.h>
#include <QtCore/QElapsedTimer>
#include <QtCore/QBasicTimer>
@ -30,7 +28,6 @@
namespace Plasma
{
class ServiceJob;
class SignalRelay;
class DataContainerPrivate

View file

@ -1,66 +0,0 @@
/*
* Copyright © 2009 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "dataengineservice_p.h"
#include "../dataengine.h"
#include "getsource_p.h"
#include <kdebug.h>
namespace Plasma
{
DataEngineService::DataEngineService(DataEngine *engine)
: Plasma::Service(engine),
m_engine(engine)
{
setName("dataengineservice");
setOperationNames(
QStringList()
<< "GetSource" // SourceName, UUID
<< "GetSourceNames"
<< "ServiceForSource" // SourceName
);
engine->connectAllSources(this, 1000);
connect(engine, SIGNAL(sourceAdded(QString)), this, SLOT(sourceAdded(QString)));
}
Plasma::ServiceJob* DataEngineService::createJob(const QString& operation,
const QMap<QString,QVariant>& parameters)
{
return new GetSource(m_engine, operation, parameters, this);
}
void DataEngineService::dataUpdated(QString source, Plasma::DataEngine::Data data)
{
if (data != m_data[source]) {
m_data[source] = data;
m_peersAlreadyUpdated[source] = QStringList();
}
}
void DataEngineService::sourceAdded(QString source)
{
m_engine->connectSource(source, this, 1000);
}
}
#include "moc_dataengineservice_p.cpp"

View file

@ -1,60 +0,0 @@
/*
* Copyright © 2009 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PLASMA_DATAENGINESERVICE_P_H
#define PLASMA_DATAENGINESERVICE_P_H
#include <QStringList>
#include "../dataengine.h"
#include "../service.h"
namespace Plasma
{
class DataEngine;
class GetSource;
class DataEngineService : public Plasma::Service
{
Q_OBJECT
public:
DataEngineService(DataEngine *engine);
public Q_SLOTS:
void dataUpdated(QString source, Plasma::DataEngine::Data data);
protected:
Plasma::ServiceJob* createJob(const QString& operation,
const QMap<QString,QVariant>& parameters);
private Q_SLOTS:
void sourceAdded(QString source);
private:
DataEngine *m_engine;
QMap<QString, QStringList> m_peersAlreadyUpdated;
QMap<QString, DataEngine::Data> m_data;
friend class GetSource;
};
}
#endif // PLASMA_DATAENGINESERVICE_P_H

View file

@ -1,70 +0,0 @@
/*
* Copyright © 2008 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "getsource_p.h"
#include "dataengineservice_p.h"
#include "service_p.h"
#include "../dataengine.h"
#include "../service.h"
#include <kdebug.h>
namespace Plasma
{
GetSource::GetSource(DataEngine *engine, const QString& operation,
const QMap<QString,QVariant>& parameters,
DataEngineService *service)
: ServiceJob(QString::fromLatin1("publickey"), operation, parameters, service),
m_engine(engine),
m_service(service)
{
}
void GetSource::start()
{
kDebug() << "Trying to perform the action" << operationName();
//TODO: check with capabilities before performing actions.
if (operationName() == "GetSource") {
QString source = parameters().value("SourceName").toString();
QString UUID = parameters().value("UUID").toString();
if (!m_service->m_peersAlreadyUpdated[source].contains(UUID)) {
m_service->m_peersAlreadyUpdated[source].append(UUID);
setResult(m_service->m_data[source]);
} else {
setResult(false); //no update needed
}
} else if (operationName() == "GetSourceNames") {
setResult(m_engine->sources());
} else if (operationName() == "ServiceForSource") {
QString source = parameters().value("SourceName").toString();
Service *service = m_engine->serviceForSource(source);
QString serviceName = "plasma-service-" + service->name();
kDebug() << "serviceForSource: getting source " << serviceName;
setResult(serviceName);
}
}
}
#include "moc_getsource_p.cpp"

View file

@ -1,48 +0,0 @@
/*
* Copyright © 2009 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GETSOURCE_H
#define GETSOURCE_H
#include "../servicejob.h"
namespace Plasma
{
class DataEngine;
class DataEngineService;
class GetSource : public Plasma::ServiceJob
{
Q_OBJECT
public:
GetSource(DataEngine *engine, const QString& operation,
const QMap<QString,QVariant>& parameters,
DataEngineService *service = 0);
void start();
private:
DataEngine *m_engine;
DataEngineService *m_service;
};
}
#endif //JOBVIEW_H

View file

@ -274,7 +274,6 @@ private:
friend class Applet;
friend class DataEnginePrivate;
friend class GetSource;
friend class PackagePrivate;
};

View file

@ -70,7 +70,7 @@ public:
};
ToolTipContent::ToolTipContent()
: d(new ToolTipContentPrivate)
: d(new ToolTipContentPrivate())
{
}
@ -93,7 +93,7 @@ ToolTipContent &ToolTipContent::operator=(const ToolTipContent &other)
ToolTipContent::ToolTipContent(const QString &mainText,
const QString &subText,
const QPixmap &image)
: d(new ToolTipContentPrivate)
: d(new ToolTipContentPrivate())
{
setMainText(mainText);
setSubText(subText);
@ -103,7 +103,7 @@ ToolTipContent::ToolTipContent(const QString &mainText,
ToolTipContent::ToolTipContent(const QString &mainText,
const QString &subText,
const QIcon &icon)
: d(new ToolTipContentPrivate)
: d(new ToolTipContentPrivate())
{
setMainText(mainText);
setSubText(subText);

View file

@ -448,7 +448,6 @@ void WallpaperPrivate::renderWallpaper(const QString &sourceImagePath, const QIm
pos = QPoint((size.width() - scaledSize.width()) / 2,
(size.height() - scaledSize.height()) / 2);
}
break;
}
case Wallpaper::MaxpectResize: {