plasma: remove noop Svg::elementAtPoint() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-02-01 21:14:35 +02:00
parent d74d49f008
commit 7c3acec445
2 changed files with 0 additions and 30 deletions

View file

@ -645,24 +645,6 @@ bool Svg::hasElement(const QString &elementId) const
return d->elementRect(elementId).isValid();
}
QString Svg::elementAtPoint(const QPoint &point) const
{
Q_UNUSED(point)
return QString();
/*
FIXME: implement when Qt can support us!
d->createRenderer();
QSizeF naturalSize = d->renderer->defaultSize();
qreal dx = d->size.width() / naturalSize.width();
qreal dy = d->size.height() / naturalSize.height();
//kDebug() << point << "is really"
// << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy));
*/
}
bool Svg::isValid() const
{
if (d->path.isNull() && d->themePath.isNull()) {

View file

@ -235,18 +235,6 @@ class PLASMA_EXPORT Svg : public QObject
**/
Q_INVOKABLE bool hasElement(const QString &elementId) const;
/**
* Returns the element (by id) at the given point.
*
* An empty string is returned if there no element is at @p point.
*
* NOTE: not implemented! This will currently return an empty string!
*
* @param point a point in SVG co-ordinates
* @return an empty string
*/
Q_INVOKABLE QString elementAtPoint(const QPoint &point) const;
/**
* Check whether this object is backed by a valid SVG file.
*