From 9c7e1896db5cc314a60a911ab97c4b59a1e07cb0 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 23 Jan 2016 03:31:36 +0200 Subject: [PATCH] plasma: inline resize method overload Signed-off-by: Ivailo Monev --- plasma/svg.cpp | 5 ----- plasma/svg.h | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/plasma/svg.cpp b/plasma/svg.cpp index 71b0836b..dd2de699 100644 --- a/plasma/svg.cpp +++ b/plasma/svg.cpp @@ -690,11 +690,6 @@ QSize Svg::size() const return d->size.toSize(); } -void Svg::resize(qreal width, qreal height) -{ - resize(QSize(width, height)); -} - void Svg::resize(const QSizeF &size) { if (qFuzzyCompare(size.width(), d->size.width()) && diff --git a/plasma/svg.h b/plasma/svg.h index 3ed3fa76..8f2e095e 100644 --- a/plasma/svg.h +++ b/plasma/svg.h @@ -177,10 +177,9 @@ class PLASMA_EXPORT Svg : public QObject * image will be scaled to this size and each element will be * scaled appropriately. * - * @param width the new width - * @param height the new height + * @param size the new size of the image **/ - Q_INVOKABLE void resize(qreal width, qreal height); + Q_INVOKABLE void resize(const QSizeF &size); /** * Resizes the rendered image. @@ -192,9 +191,10 @@ class PLASMA_EXPORT Svg : public QObject * image will be scaled to this size and each element will be * scaled appropriately. * - * @param size the new size of the image + * @param width the new width + * @param height the new height **/ - Q_INVOKABLE void resize(const QSizeF &size); + Q_INVOKABLE inline void resize(qreal width, qreal height) { resize(QSize(width, height)); } /** * Resizes the rendered image to the natural size of the SVG.