summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/aspectratiolabel.cpp15
-rw-r--r--src/libs/installer/aspectratiolabel.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/src/libs/installer/aspectratiolabel.cpp b/src/libs/installer/aspectratiolabel.cpp
index b2cf2f7e8..7dea33cd5 100644
--- a/src/libs/installer/aspectratiolabel.cpp
+++ b/src/libs/installer/aspectratiolabel.cpp
@@ -52,7 +52,20 @@ AspectRatioLabel::AspectRatioLabel(QWidget *parent)
}
/*!
- Sets the \a pixmap shown on the label and an optional \a url. Setting a new
+ Sets the \a pixmap shown on the label. Setting a new pixmap clears
+ the previous content.
+
+ \note This redefines the non-virtual slot of the same signature from the
+ QLabel base class, which results in non polymorphic behavior when
+ called via a base class pointer.
+*/
+void AspectRatioLabel::setPixmap(const QPixmap &pixmap)
+{
+ setPixmapAndUrl(pixmap, QString());
+}
+
+/*!
+ Sets the \a pixmap shown on the label and an \a url. Setting a new
pixmap clears the previous content. When clicking the \a pixmap, \a url
is opened in a browser. If the \a url is a reference to a file, it will
be opened with a suitable application instead of a Web browser.
diff --git a/src/libs/installer/aspectratiolabel.h b/src/libs/installer/aspectratiolabel.h
index 5ce9593fa..bbe54d3a1 100644
--- a/src/libs/installer/aspectratiolabel.h
+++ b/src/libs/installer/aspectratiolabel.h
@@ -48,7 +48,8 @@ public:
QSize sizeHint() const override;
public slots:
- void setPixmapAndUrl (const QPixmap &pixmap, const QString &url = QString());
+ void setPixmap(const QPixmap &pixmap);
+ void setPixmapAndUrl (const QPixmap &pixmap, const QString &url);
void resizeEvent(QResizeEvent *event) override;
protected: