Keep compatiable slot createApplet with Frameworks 5.24

Commit bb70febdbe changed the slot for
adding createApplet, turning the final argument from QPoint to QRect.

If the rectangle size is nothing, it acts like the original code.

Despite this being private API (ish) there is a hacks in plasma-
workspace that call methods on the view via QMetaObject invoke. This
obviously fails. As we need compatibility for Plasma/5.7 and earlier a
compatibility slot needs to stay.

REVIEW: 128640
This commit is contained in:
David Edmundson 2016-08-10 00:40:42 +01:00 committed by David Edmundson
parent 8031d80df5
commit 1ace6a46de
2 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,11 @@ QRect ContainmentInterface::availableScreenRect() const
return rect; return rect;
} }
Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const QVariantList &args, const QPoint &pos)
{
return createApplet(plugin, args, QRectF(pos, QSize()));
}
Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const QVariantList &args, const QRectF &geom) Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const QVariantList &args, const QRectF &geom)
{ {
//HACK //HACK

View File

@ -204,6 +204,7 @@ protected Q_SLOTS:
void mimeTypeRetrieved(KIO::Job *job, const QString &mimetype); void mimeTypeRetrieved(KIO::Job *job, const QString &mimetype);
private Q_SLOTS: private Q_SLOTS:
Plasma::Applet *createApplet(const QString &plugin, const QVariantList &args, const QPoint &pos);
Plasma::Applet *createApplet(const QString &plugin, const QVariantList &args, const QRectF &geom); Plasma::Applet *createApplet(const QString &plugin, const QVariantList &args, const QRectF &geom);
private: private: