Skip to content
Snippets Groups Projects
Commit 791f000c authored by Edric Milaret's avatar Edric Milaret
Browse files

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
Branches
Tags
No related merge requests found
...@@ -161,12 +161,12 @@ win32 { ...@@ -161,12 +161,12 @@ win32 {
$$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll $$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll
QTRUNTIME.path = $$OUT_PWD/release 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/libfreetype-6.dll $$RUNTIMEDIR/libglib-2.0-0.dll \
$$RUNTIMEDIR/libharfbuzz-0.dll \ $$RUNTIMEDIR/libharfbuzz-0.dll \
$$RUNTIMEDIR/libintl-8.dll $$RUNTIMEDIR/libpcre-1.dll \ $$RUNTIMEDIR/libintl-8.dll $$RUNTIMEDIR/libpcre-1.dll \
$$RUNTIMEDIR/libpcre16-0.dll $$RUNTIMEDIR/libpng16-16.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 QTDEPSRUNTIME.path = $$OUT_PWD/release
QTPLATFORMS.files = $$(QTDIR)/plugins/platforms/qwindows.dll QTPLATFORMS.files = $$(QTDIR)/plugins/platforms/qwindows.dll
......
...@@ -288,6 +288,7 @@ WindowsContactBackend::getPersonFromContactFile(const QDir& contactDir, ...@@ -288,6 +288,7 @@ WindowsContactBackend::getPersonFromContactFile(const QDir& contactDir,
QString photoValue = reader.readElementText(); QString photoValue = reader.readElementText();
QImage photo; QImage photo;
photo.load(photoValue); photo.load(photoValue);
if (not photo.isNull())
p->setPhoto(photo.scaled(sizePhoto_,sizePhoto_, Qt::KeepAspectRatio, p->setPhoto(photo.scaled(sizePhoto_,sizePhoto_, Qt::KeepAspectRatio,
Qt::SmoothTransformation)); Qt::SmoothTransformation));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment