Commit 791f000c authored by Edric Milaret's avatar Edric Milaret

contact: fix image to contact

- Jpeg were not loaded because a dll was missing
- Also fix default image for empty url

Issue: #80570
Change-Id: I7996fe4034466bc97e8a902485038bbb824892e9
parent 5f316da2
......@@ -161,12 +161,12 @@ win32 {
$$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll
QTRUNTIME.path = $$OUT_PWD/release
QTDEPSRUNTIME.files = $$RUNTIMEDIR/zlib1.dll $$RUNTIMEDIR/iconv.dll \
QTDEPSRUNTIME.files = $$RUNTIMEDIR/zlib1.dll \
$$RUNTIMEDIR/libfreetype-6.dll $$RUNTIMEDIR/libglib-2.0-0.dll \
$$RUNTIMEDIR/libharfbuzz-0.dll \
$$RUNTIMEDIR/libintl-8.dll $$RUNTIMEDIR/libpcre-1.dll \
$$RUNTIMEDIR/libpcre16-0.dll $$RUNTIMEDIR/libpng16-16.dll \
$$RUNTIMEDIR/libjpeg-62.dll $$RUNTIMEDIR/libiconv-2.dll
$$RUNTIMEDIR/libjpeg-8.dll $$RUNTIMEDIR/libiconv-2.dll
QTDEPSRUNTIME.path = $$OUT_PWD/release
QTPLATFORMS.files = $$(QTDIR)/plugins/platforms/qwindows.dll
......
......@@ -288,8 +288,9 @@ WindowsContactBackend::getPersonFromContactFile(const QDir& contactDir,
QString photoValue = reader.readElementText();
QImage photo;
photo.load(photoValue);
p->setPhoto(photo.scaled(sizePhoto_,sizePhoto_, Qt::KeepAspectRatio,
Qt::SmoothTransformation));
if (not photo.isNull())
p->setPhoto(photo.scaled(sizePhoto_,sizePhoto_, Qt::KeepAspectRatio,
Qt::SmoothTransformation));
}
}
else if (name == "EmailAddress") {
......
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