storagehelper: avoid using QFontDatabase

Change-Id: Ia5045de44b598d2b0c8d813436b8574b54aeb1a9
parent 54068968
......@@ -151,7 +151,10 @@ QString
compressedAvatar(const QString& image)
{
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) {
qDebug() << "vCard image loading failed";
return image;
......
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