Commit eaa29d73 authored by Maik Qualmann's avatar Maik Qualmann

fix empty file name QWarning message from Qt

parent 1c45d121
Pipeline #26920 failed with stage
in 60 minutes
......@@ -41,7 +41,13 @@ DActiveLabel::DActiveLabel(const QUrl& url, const QString& imgPath, QWidget* con
setFocusPolicy(Qt::NoFocus);
setTextInteractionFlags(Qt::LinksAccessibleByMouse);
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
QImage img = QImage(imgPath);
QImage img;
if (!imgPath.isEmpty())
{
img.load(imgPath);
}
updateData(url, img);
}
......
......@@ -48,7 +48,7 @@ class DIGIKAM_EXPORT DActiveLabel : public QLabel
public:
explicit DActiveLabel(const QUrl& url=QUrl(), const QString& imgPath=QString(), QWidget* const parent=nullptr);
explicit DActiveLabel(const QUrl& url = QUrl(), const QString& imgPath = QString(), QWidget* const parent = nullptr);
virtual ~DActiveLabel();
void updateData(const QUrl& url, const QImage& img);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment