plasma: remove scripting leftovers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-10-21 19:28:06 +03:00
parent fbfb374b9c
commit 73d767817d
17 changed files with 13 additions and 70 deletions

View file

@ -713,11 +713,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
*/
void newStatus(Plasma::ItemStatus status);
/**
* Emitted when an ExtenderItem in a scripting applet needs to be initialized
*/
void extenderItemRestored(Plasma::ExtenderItem *item);
/**
* Emitted when the immutability changes
* @since 4.4

View file

@ -1252,10 +1252,7 @@ void ContainmentPrivate::dropData(QPointF scenePos, QPoint screenPos, QGraphicsS
item->setExtender(applet->extender());
}
} else if (KUrl::List::canDecode(mimeData)) {
//TODO: collect the mimetypes of available script engines and offer
// to create widgets out of the matching URLs, if any
const KUrl::List urls = KUrl::List::fromMimeData(mimeData);
foreach (const KUrl &url, urls) {
foreach (const KUrl &url, KUrl::List::fromMimeData(mimeData)) {
#ifndef PLASMA_NO_KIO
KMimeType::Ptr mime = KMimeType::findByUrl(url);
QString mimeName = mime->name();

View file

@ -507,7 +507,6 @@ Q_SIGNALS:
void configChanged();
protected:
//FIXME plasma2: those should be public to allow scripted containments access them
/**
* Sets the type of this containment.
*/

View file

@ -21,7 +21,6 @@
#include "containment.h"
#include "private/dataengineconsumer_p.h"
#include "private/packages_p.h"
#include "private/containmentactions_p.h"
#include "private/containment_p.h"
@ -39,8 +38,6 @@
namespace Plasma
{
PackageStructure::Ptr ContainmentActionsPrivate::s_packageStructure(0);
ContainmentActions::ContainmentActions(QObject * parentObject)
: d(new ContainmentActionsPrivate(KService::serviceByStorageId(QString()), this))
{
@ -111,15 +108,6 @@ ContainmentActions *ContainmentActions::load(Containment *parent, const KPluginI
return load(parent, info.pluginName(), args);
}
PackageStructure::Ptr ContainmentActions::packageStructure()
{
if (!ContainmentActionsPrivate::s_packageStructure) {
ContainmentActionsPrivate::s_packageStructure = new ContainmentActionsPackage();
}
return ContainmentActionsPrivate::s_packageStructure;
}
Containment *ContainmentActions::containment()
{
if (d->containment) {

View file

@ -27,7 +27,6 @@
#include <kdeversion.h>
#include <plasma/plasma.h>
#include <plasma/packagestructure.h>
namespace Plasma
{
@ -101,11 +100,6 @@ class PLASMA_EXPORT ContainmentActions : public QObject
**/
static ContainmentActions *load(Containment *parent, const KPluginInfo &info, const QVariantList &args = QVariantList());
/**
* Returns the Package specialization for containmentactions.
*/
static PackageStructure::Ptr packageStructure();
/**
* Returns the user-visible name for the containmentactions, as specified in the
* .desktop file.
@ -254,7 +248,6 @@ class PLASMA_EXPORT ContainmentActions : public QObject
void paste(QPointF scenePos, QPoint screenPos);
private:
friend class ContainmentActionsPackage;
friend class ContainmentActionsPrivate;
ContainmentActionsPrivate *const d;
};

View file

@ -34,7 +34,6 @@ namespace Plasma
{
class DataContainer;
class Package;
class Service;
class DataEnginePrivate;
@ -176,10 +175,7 @@ NoAlignment) const;
/**
* Retrieves a pointer to the DataContainer for a given source. This method
* should not be used if possible. An exception is for script engines that
* can not provide a QMetaObject as required by connectSource for the initial
* call to dataUpdated. Using this method, such engines can provide their own
* connectSource API.
* should not be used if possible.
*
* @param source the name of the source.
* @return pointer to a DataContainer, or zero on failure

View file

@ -29,7 +29,6 @@
#include "applet.h"
#include "abstractrunner.h"
#include "containment.h"
#include "packagestructure.h"
#include "popupapplet.h"
#include "private/applet_p.h"
#include "private/extenderapplet_p.h"

View file

@ -42,7 +42,6 @@
#include "plasma/dialog.h"
#include "plasma/extenders/extender.h"
#include "plasma/extenders/extenderitem.h"
#include "plasma/package.h"
#include "plasma/theme.h"
#include "plasma/tooltipmanager.h"
#include "plasma/widgets/iconwidget.h"

View file

@ -197,7 +197,7 @@ public:
bool hasConfigurationInterface;
bool failed;
bool isContainment;
bool transient ;
bool transient;
bool needsConfig;
bool started;
};

View file

@ -31,24 +31,20 @@ public:
ContainmentActionsPrivate(KService::Ptr service, ContainmentActions *containmentActions) :
q(containmentActions),
containmentActionsDescription(service),
package(0),
initialized(false),
needsConfig(false),
containment(0)
containment(nullptr)
{
};
static PackageStructure::Ptr s_packageStructure;
ContainmentActions *q;
KPluginInfo containmentActionsDescription;
Package *package;
KServiceAction mode;
bool initialized : 1;
bool needsConfig : 1;
bool initialized;
bool needsConfig;
Containment *containment;
};
} // namespace Plasma
#endif //PLASMA_CONTAINMENTACTIONSPRIVATE_H
#endif //PLASMA_CONTAINMENTACTIONSPRIVATE_H

View file

@ -257,12 +257,6 @@ void WallpaperPackage::paperDestroyed()
m_paper = 0;
}
ContainmentActionsPackage::ContainmentActionsPackage(QObject *parent)
: Plasma::PackageStructure(parent, QString("ContainmentActions"))
{
//FIXME how do I do the mimetypes stuff?
}
} // namespace Plasma
#include "moc_packages_p.cpp"

View file

@ -64,14 +64,6 @@ private:
Wallpaper::ResizeMethod m_resizeMethod;
};
class ContainmentActionsPackage : public PackageStructure
{
Q_OBJECT
public:
explicit ContainmentActionsPackage(QObject *parent = 0);
};
} // namespace Plasma
#endif // LIBS_PLASMA_PACKAGES_P_H

View file

@ -53,11 +53,11 @@ public:
QSizeF targetSize;
QList<KUrl> pendingUrls;
QList<QAction*> contextActions;
bool cacheRendering : 1;
bool initialized : 1;
bool needsConfig : 1;
bool previewing : 1;
bool needsPreviewDuringConfiguration : 1;
bool cacheRendering;
bool initialized;
bool needsConfig;
bool previewing;
bool needsPreviewDuringConfiguration;
};
} // namespace Plasma

View file

@ -28,7 +28,6 @@
#include <plasma/plasma_export.h>
#include <plasma/plasma.h>
#include "packagemetadata.h"
#include <QGraphicsObject>
#include <QIODevice>
@ -274,7 +273,6 @@ private:
friend class Applet;
friend class DataEnginePrivate;
friend class PackagePrivate;
};
} // namespace Plasma

View file

@ -35,7 +35,6 @@
#include <ksharedptr.h>
#include "applet.h"
#include "package.h"
#include "theme.h"
namespace Plasma

View file

@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA. *
*******************************************************************************/
#ifndef PACKAGEMETADATATEST_H
#ifndef RUNNERCONTEXTTEST_H
#include <qtest_kde.h>

View file

@ -556,8 +556,6 @@ class PLASMA_EXPORT Wallpaper : public QObject
private:
friend class WallpaperPackage;
friend class WallpaperPrivate;
friend class WallpaperScript;
friend class WallpaperWithPaint;
friend class ContainmentPrivate;
WallpaperPrivate *const d;
};