Skip to content
Snippets Groups Projects
Unverified Commit d07c7934 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

storagehelper: avoid using QFontDatabase

Change-Id: Ia5045de44b598d2b0c8d813436b8574b54aeb1a9
parent 54068968
Branches
No related tags found
No related merge requests found
...@@ -151,7 +151,10 @@ QString ...@@ -151,7 +151,10 @@ QString
compressedAvatar(const QString& image) compressedAvatar(const QString& image)
{ {
QImage qimage; QImage qimage;
const bool ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), 0); // Avoid to use all formats. Some seems bugguy, like libpbf, asking
// for a QGuiApplication for QFontDatabase
auto ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), "JPEG");
if (!ret) ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), "PNG");
if (!ret) { if (!ret) {
qDebug() << "vCard image loading failed"; qDebug() << "vCard image loading failed";
return image; return image;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment